-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: Options api rework #671
Conversation
also implement ability for options to be mutually exclusive
for more information, see https://pre-commit.ci
refactor generation system to use handler classes
…into options-api-rework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
This also required handling of "shared fields" across options. Shared fields are when multiple cards use the same field conceptually, but pydyna-keywords is designed that each field in each card is it's own object. The code generation did not account for that so I had to work that into this fix. I started to refactor the generation system around handler objects. It still isn't that straightforward but I think it's moving more in that direction. |
Fixes #667
The implementation of options was a bit awkward. It still is, but this should be easier to follow now.
The main fix here is to make options with the same title/card index mutually exlcusive. Meaning when one such option is activated all other options are deactivated.
An example of this is the two options "TITLE" and "ID" of
*CONSTRAINED_BEAM_IN_SOLID
which have the same meaning.