Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tclarke opened this issue Mar 16, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@tclarke
Copy link
Member

tclarke commented Mar 16, 2018

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:

@tclarke tclarke added the enhancement New feature or request label Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant