Skip to content

EXTRAS-95 - Add support for string values in addition to symbolic numeric constants in the Python API #13

Open

Description

@tclarke

Currently, when using the Python API, enums are represented either as bare numbers:

e.g.
0 - BSQ interleave
1 - BIP interleave
2 - BIL interleave

or symbolic constants

opticks.data.types.InterleaveFormat.BSQ
opticks.data.types.InterleaveFormat.BIP
opticks.data.types.InterleaveFormat.BIL

However, Python traditionally favors string values of either of the above. So, support should be added for string values, for example:

"BSQ"
"BIP"
"BIL"

This change should be added across the entire Python Scripting API for all enum equivalents from the SimpleAPI being wrapped.

Original Issue: EXTRAS-95
Status: Deferred
Feature Interpretation:
The Python API should allow string values for the equivalent C enums in addition to numeric values and Python symbolic constants.

Suggested Solution:
The Python API will be updated to allow passing of string constants anywhere a numeric enum value of symbolic constant is allowed. There are a few different ways to provide this capability, the alternatives will be discussed and evaluated during design.

Actual Solution:

Severity:
Version Control:
Environment:
Linked:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions