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

Move Action Name into Action Model #42

Open
ghickman opened this issue May 24, 2022 · 0 comments
Open

Move Action Name into Action Model #42

ghickman opened this issue May 24, 2022 · 0 comments

Comments

@ghickman
Copy link
Contributor

We currently store actions as a dict[str, Action] structure on Pipeline, where the str key is the name of the action. This makes some Action validation a little harder (and requires it's done on Pipeline instead of Action) since we want the name in the validator. We want to keep our existing YAML structure of:

actions:
  action_name:
    …

It's clear to users and we don't want to have to deal with keeping backwards compatibility.

So that leaves us with changing the structure of Actions inside the pipeline.

I've already tried mutating the dictionary coming out of parsed_yaml_file() but this led to having to change the dictionary nearly every test used which felt like a step backwards as the test data no longer looked similar to what a valid YAML file would look like.

The next step for this is to investigate if this can be done inside of the pydantic models and if so what niceties of pydantic are we opting out of, if any.

Potentially #31 might be a route to take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant