Ticket #326 (closed enhancement: wontfix)

Opened 12 years ago

Last modified 7 years ago

Please support new format for arrays of Policy

Reported by: rhl Owned by: RayPlante
Priority: minor Milestone:
Component: mwi Keywords:
Cc: Blocked By:
Blocking: Project: LSST
Version Number:
How to repeat:

not applicable

Description (last modified by RayPlante) (diff)

The current format for an array of Policy is:

Note from RayPlante: This is not quite correct and will produce an error as written; see attached response.

{
    Defects: {
        col0: 962                       # Starting column
        ncol: 2                         # number of columns
        row0: 0                         # Starting row
        nrow: 4611                      # number of rows
    }
    
    Defects: {
        col0: 1316                      # Starting column
        ncol: 2                         # number of columns
        row0: 0                         # Starting row
        nrow: 4611                      # number of rows
    }
}

It would be nice to also support:

Defects: {
    {
        col0: 962                       # Starting column
        ncol: 2                         # number of columns
        row0: 0                         # Starting row
        nrow: 4611                      # number of rows
    }
    
    {
        col0: 1316                      # Starting column
        ncol: 2                         # number of columns
        row0: 0                         # Starting row
        nrow: 4611                      # number of rows
    }
}

Change History

comment:1 Changed 12 years ago by ktl

  • Owner changed from ktl to RayPlante
  • Status changed from new to assigned

Ray still owns Policy for now...

comment:2 Changed 12 years ago by RayPlante

  • Status changed from assigned to closed
  • Resolution set to wontfix
  • Description modified (diff)

This suggestion may come from a misunderstanding of the format (documented at PolicyFormats. In particular, the format for a policy array is:

Defects: {
     col0: 962                       # Starting column
     ncol: 2                         # number of columns
     row0: 0                         # Starting row
     nrow: 4611                      # number of rows
}
    
Defects: {
     col0: 1316                      # Starting column
     ncol: 2                         # number of columns
     row0: 0                         # Starting row
     nrow: 4611                      # number of rows
}

The format given in the request description includes an outer set of braces, { }, which is not part of the syntax and will produce an error. In particular, the { indicates the start of a subPolicy structure. If a { appears without a preceding name, an error is raised.

The PAF has a 2 ways of handling array values. One is to list all of the values on the same line as the parameter name, after the colon. Since, the sub-Policy values are inherently multi-line, this method is not applicable. The other way is to repeat the same parameter name on multiple lines but with different values. This format allows each parameter entry to be processed independently of any other entry (apart from checking type consistency).

The suggested format involves the insertion of an extra set of braces that are not only syntactically not necessary but would actually break the current meaning of the brace. This suggestion probably comes from the desire to more tightly group the elements of the array together (perhaps because we are used to writing Python). If this were really important, we should apply the new syntax to all types of parameters for consistency sake. However, in my opinion, given the correct way of specifying policy arrays, I don't think the extra set of braces add any clarity.

Given that I think this change is not necessary and makes the syntax more complicated/obscure, I'm going to close it with a "won't fix". I would recommend improved documentation (some of which I've done).

comment:3 Changed 7 years ago by robyn

  • Milestone DC3 Infrastructure Prep deleted

Milestone DC3 Infrastructure Prep deleted

Note: See TracTickets for help on using tickets.