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

Don't allow arbitrary kwargs in options #1066

Closed
jyu00 opened this issue Sep 8, 2023 · 0 comments · Fixed by #1108
Closed

Don't allow arbitrary kwargs in options #1066

jyu00 opened this issue Sep 8, 2023 · 0 comments · Fixed by #1108
Assignees
Labels
enhancement New feature or request priority: medium Medium Priority issue (must have for current release)

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Sep 8, 2023

What is the expected feature or enhancement?

Each of the classes in options is decorated with @_flexible, which "is used to dynamically create a new dataclass with the arbitrary kwargs input". This was done because the options were still in flux at the time.

However, validation was added to disallow arbitrary kwargs input (for example), which contradicts with _flexible.

Since options are more settled, we don't really need to force option classes to accept arbitrary kwargs. If we remove that, we also don't need this additional validation, since dataclass would take care of that for us.

We can still allow arbitrary kwargs in run() that will be merged into the final dictionary.

We still need the part of _flexible that converts input dictionary to objects.

Acceptance criteria

Options classes no longer need to accept arbitrary kwargs, which can still be specified in run().

@jyu00 jyu00 added the enhancement New feature or request label Sep 8, 2023
@kt474 kt474 added this to the 0.12.2 milestone Sep 13, 2023
@jyu00 jyu00 added the priority: medium Medium Priority issue (must have for current release) label Sep 18, 2023
@kt474 kt474 modified the milestones: 0.12.2, 0.13.0 Sep 28, 2023
@kt474 kt474 removed this from the 0.13.0 milestone Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: medium Medium Priority issue (must have for current release)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants