Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9397

Config should support enum type fields

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: pex_config
    • Labels:
      None
    • Templates:
    • Epic Link:
    • Team:
      Data Access and Database

      Description

      Config fields support type int but not int-valued enums. With SWIG this was only a mild nuisance because it treated enums as ints, but pybind11 is more careful. This leads to a need to explicitly cast values for enum fields to int (in the field) and from int to the enum type (when passed to pybind11-wrapped code), which is messy.

      I suggest that enum types be explicitly supported. I suspect the only tricky part will be persistence (which may require casting from between int and the enum type) and specifying arguments on the command line. For single-valued enums one can might be able to persist by name (with an appropriate include at the top of the file) but that would be harder for mask fields (where various enum constants are "or"ed together).

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rowen Russell Owen
                Watchers:
                Kian-Tat Lim, Krzysztof Findeisen, Pim Schellart [X] (Inactive), Russell Owen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel