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

Feature pydantic argparse cli #477

Merged
merged 136 commits into from
Mar 12, 2024
Merged

Conversation

donaldcampbelljr
Copy link
Contributor

Just continuing to merge down this work to the dev branch, see #472

simeoncarstens and others added 30 commits January 14, 2024 19:54
- make arguments inherit from `pydantic.fields.FieldInfo` and augment
them with a `name` attribute
- make a `Command` class that generates a `pydantic` model with the
arguments the command takes
- make commands take lists of specific arguments they take instead of
having arguments know by which commands they are supported
Co-authored-by: Zhihan Zhang <[email protected]>
Co-authored-by: Nathan Sheffield <[email protected]>
Co-authored-by: Zhihan Zhang <[email protected]>
This method returns the same data, but with the `default`
tuple (<type>, <value>) replaced by only <value>. This allows
`Argument`s to be used when directly defining `pydantic` models
instead of using `create_model()`.
donaldcampbelljr and others added 25 commits March 6, 2024 17:02
# Conflicts:
#	looper/looper.py
#	requirements/requirements-all.txt
…c-argparse-cli

# Conflicts:
#	looper/looper.py
#	requirements/requirements-all.txt
Co-authored-by: Nathan Sheffield <[email protected]>
Adding pydantic argparse cli and Refactor Looper Tests
@donaldcampbelljr
Copy link
Contributor Author

This is failing pytest because we migrated to using a local instance of hello_looper that is pulled from github manually. Pytesting via Github actions cannot find the repository (because I gitignored the folder). Merging to dev for now. I will fix it there.

@donaldcampbelljr donaldcampbelljr marked this pull request as ready for review March 12, 2024 20:58
@donaldcampbelljr donaldcampbelljr merged commit 676ad6b into dev Mar 12, 2024
1 of 3 checks passed
@donaldcampbelljr
Copy link
Contributor Author

donaldcampbelljr commented Mar 12, 2024

And I confirmed all tests pass locally in both this branch and dev branch before and after merge.

@donaldcampbelljr donaldcampbelljr deleted the feature-pydantic-argparse-cli branch August 19, 2024 13:15
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

Successfully merging this pull request may close these issues.

3 participants