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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
ad03377
Add `pydantic-argparse` dependency
simeoncarstens Jan 14, 2024
1b08809
Add pydantic model scaffold for top-level parser
simeoncarstens Jan 10, 2024
bbf3c75
Add entrypoint
simeoncarstens Jan 11, 2024
d2ac184
Add scaffold for dynamic command model generation
simeoncarstens Jan 11, 2024
44fa244
Validate type of `default` field
simeoncarstens Jan 11, 2024
7b9273a
Allow `None` as value next to allowed argument types
simeoncarstens Jan 11, 2024
2333870
[WIP] Add missing arguments for hello_looper to run
simeoncarstens Jan 11, 2024
2ecef80
Add `cli_pydantic.py` script to setuptools scripts
simeoncarstens Jan 14, 2024
bed8292
Rework design
simeoncarstens Jan 14, 2024
dfb07cf
Fix typo
simeoncarstens Jan 15, 2024
bc5c78f
Use **kwargs in Argument and ArgumentEnum
zz1874 Jan 16, 2024
c4a20d9
Update looper/cli_pydantic.py
zz1874 Jan 16, 2024
c45deb9
Polish docstring of class Argument
zz1874 Jan 16, 2024
82f84d8
Explicitly list `default` and `description` as args for Argument
simeoncarstens Jan 16, 2024
1e6620f
Refactor into separate module
simeoncarstens Jan 16, 2024
71593e4
Add `CONFIG_FILE` argument
simeoncarstens Jan 16, 2024
b990e62
Add `pydantic` fields
simeoncarstens Jan 16, 2024
74e89db
Add a `with_reduced_default` method to `Argument`
simeoncarstens Jan 16, 2024
a498889
Add `SETTINGS` argument
simeoncarstens Jan 16, 2024
b20ab57
Converted manual `pep_config` option into `Argument`
simeoncarstens Jan 16, 2024
5753a2a
Converted manual `output_dir` option into `Argument`
simeoncarstens Jan 16, 2024
da94064
Converted manual `config_file` option into `Argument`
simeoncarstens Jan 16, 2024
6a6c28d
Converted manual `sample_pipeline_interfaces` option into `Argument`
simeoncarstens Jan 16, 2024
6dcf3dd
Converted manual `project_pipeline_interfaces` option into `Argument`
simeoncarstens Jan 16, 2024
88b1fcf
Converted manual `amend` option into `Argument`
simeoncarstens Jan 16, 2024
6e8aa34
Converted manual `sel_flag` option into `Argument`
simeoncarstens Jan 16, 2024
1339d42
Converted manual `exc_flag` option into `Argument`
simeoncarstens Jan 16, 2024
2aa3a03
Make `sample_pipeline_interfaces` optional
simeoncarstens Jan 16, 2024
c9974c4
Make `project_pipeline_interfaces` optional
simeoncarstens Jan 16, 2024
bb10f1b
Make `amend` optional
simeoncarstens Jan 16, 2024
701afab
Replace dashes by underscores in argument names
simeoncarstens Jan 16, 2024
3fc08b6
Fix argument accessions in `Runner`
simeoncarstens Jan 16, 2024
3fb1aef
Fix `lump` argument type
simeoncarstens Jan 16, 2024
6438a35
Print separator line for better visibility
simeoncarstens Jan 16, 2024
e786ea2
Formatting changes
simeoncarstens Jan 17, 2024
5644b7f
Add LOOPER_CONFIG as an argument
simeoncarstens Jan 17, 2024
a0bf3ff
`run` special treatment: `enrich_args_via_cfg`
simeoncarstens Jan 17, 2024
0845d2f
Add `DIVVY` argument
simeoncarstens Jan 17, 2024
3836613
Fix `divvy` argument accession
simeoncarstens Jan 17, 2024
ea95529
Clean up imports
simeoncarstens Jan 17, 2024
b3debfb
Add docstring to `cli_pydantic.py`
simeoncarstens Jan 17, 2024
f2f3669
Add docstrings
simeoncarstens Jan 17, 2024
7a6495e
Refactor to easily support future commands
simeoncarstens Jan 17, 2024
c6319a4
Run formatter
simeoncarstens Jan 18, 2024
8fc9590
Infer currently used subcommand instead of hardcoding it
simeoncarstens Jan 19, 2024
c2e7ca3
Format `setup.py`
simeoncarstens Jan 19, 2024
4b715c3
Loosen `pydantic-argparse` version constraint
simeoncarstens Jan 19, 2024
b2a1e1c
Apply suggestions from code review
simeoncarstens Jan 19, 2024
2eb2e77
Fix typing to support Python 3.8
zz1874 Jan 26, 2024
8b39b76
Add logging setup
simeoncarstens Jan 29, 2024
97d0e57
Make CLI script accept `looper-config` argument
simeoncarstens Jan 29, 2024
ea11a4f
Add arguments for logging
zz1874 Jan 22, 2024
f2f4cc8
Add `SKIP_FILE_CHECKS`, `PACKAGE` and `COMPUTE` arguments
simeoncarstens Jan 26, 2024
5963357
`run` special treatment: move arguments to a second-level namespace
zz1874 Jan 31, 2024
dfc4664
`run` special treatment: adapt `divvy` argument retrieval
zz1874 Jan 31, 2024
712f08d
Move `limit` and `skip` arguments from `run` to top-level model
simeoncarstens Feb 1, 2024
363cb20
Add `settings` argument to `run` model
simeoncarstens Feb 1, 2024
fcb70e5
`run` special treatment: `_proc_resources_spec`
simeoncarstens Jan 31, 2024
0182e43
`run` special treatment: `validate_post_parse`
simeoncarstens Jan 31, 2024
e3bc215
`run` special treatment: project CLI attributes
simeoncarstens Jan 31, 2024
c21d8ed
Remove debug print statements
simeoncarstens Feb 1, 2024
2229334
Run formatter
simeoncarstens Feb 1, 2024
b0d5b4a
Appease `black` version in CI
simeoncarstens Feb 1, 2024
1601fdd
Add necessary arguments: sel_attr, sel_incl, sel_excl
zz1874 Jan 26, 2024
5f7b822
Merge pull request #448 from pepkit/tweag/remaining-run-arguments
simeoncarstens Feb 1, 2024
6d70a69
Add Developer documentation for adding new models
zz1874 Feb 1, 2024
bb30bae
Add section: special treatment for the `run` command
zz1874 Feb 2, 2024
d74d608
Detail locations of `run` command special treatments in DEVELOPER.md
simeoncarstens Feb 2, 2024
3e9127a
Fix some capitalizations
simeoncarstens Feb 2, 2024
56c3ccc
Merge pull request #449 from pepkit/tweag/add-developer-documentation
simeoncarstens Feb 7, 2024
dce12d5
Merge pull request #440 from pepkit/tweag/run-hello-world
simeoncarstens Feb 8, 2024
1c7d6ff
Begin skeleton to rethink testing #464
donaldcampbelljr Feb 21, 2024
ad02083
Add cloning hello looper and executing run #464
donaldcampbelljr Feb 22, 2024
6b2c599
Attempt to change test directory to fix pipestat results reporting
donaldcampbelljr Feb 22, 2024
d4cfe23
Modify derived attribute path before running samples #464
donaldcampbelljr Feb 26, 2024
cf74a6d
Add check, report, destroy, and table to tests, add returning debug …
donaldcampbelljr Feb 26, 2024
19a24c2
begin adding more pydantic args: rerun and runp #438
donaldcampbelljr Feb 26, 2024
d3f5505
Add table, report, destroy, check #438
donaldcampbelljr Feb 27, 2024
ca77d58
add remaining commands #438
donaldcampbelljr Feb 27, 2024
10cce80
check for none values during pydantic arg parsing #438
donaldcampbelljr Feb 27, 2024
4ad60db
get rerun to work
donaldcampbelljr Feb 28, 2024
5614975
get runp to work, tests are broken for the time being
donaldcampbelljr Feb 28, 2024
c4c3fde
add init functionality to new cli in cli_pydantic.py
donaldcampbelljr Feb 28, 2024
2ff51e1
add init_piface
donaldcampbelljr Feb 28, 2024
492a4ed
add working destroy to cli_pydantic.py
donaldcampbelljr Feb 28, 2024
3981849
add working table command to cli_pydantic.py
donaldcampbelljr Feb 28, 2024
87d70bd
add working report, link, check, clean commands to cli_pydantic.py
donaldcampbelljr Feb 28, 2024
24bdbbd
switch to using cli_pydantic only
donaldcampbelljr Feb 29, 2024
bdd5ee2
fix bug with getattr being False with default of 0
donaldcampbelljr Feb 29, 2024
89f0da7
fix test via test_args
donaldcampbelljr Feb 29, 2024
c165de3
fix more tests, rethink test_args expansion
donaldcampbelljr Feb 29, 2024
b68cb8c
Merge branch 'drc_feature-pydantic-argparse-cli' into dev_rethink_tes…
donaldcampbelljr Feb 29, 2024
935ce5a
Merge pull request #473 from pepkit/dev_rethink_testing
donaldcampbelljr Feb 29, 2024
d59de5e
lint
donaldcampbelljr Feb 29, 2024
973e660
re-add lumpj to pydantic arguments
donaldcampbelljr Feb 29, 2024
1e2e50b
Fix portable argument for report
donaldcampbelljr Feb 29, 2024
e924682
Add tests skipping for tests using outdated pep
donaldcampbelljr Feb 29, 2024
066e661
Switch to pydantic2-argparse
donaldcampbelljr Mar 1, 2024
eaafb64
Fix comprehensive looper-pipestat test
donaldcampbelljr Mar 1, 2024
5287863
Fix comprehensive looper-basic test
donaldcampbelljr Mar 1, 2024
2249711
attempt to fix selecting multiple flags, does not work
donaldcampbelljr Mar 1, 2024
9fdf85a
Add exc_flag and sel_flag to Run command as a poc #438
donaldcampbelljr Mar 4, 2024
debb45c
Move all optional arguments to be under each command as appropriate …
donaldcampbelljr Mar 4, 2024
0589a03
Re-add optional commands to ensure manual tests pass, refactor #438
donaldcampbelljr Mar 5, 2024
83950e9
re-arrange arguments to be consistent
donaldcampbelljr Mar 5, 2024
ebc2eb7
remove unused code
donaldcampbelljr Mar 5, 2024
b447b5c
fix comprehensive tests per refactor
donaldcampbelljr Mar 5, 2024
1219451
fix broken tests, change SEL_FLAG and SEL_INCL to default to lists
donaldcampbelljr Mar 5, 2024
6c61500
refactor to reduce code duplication
donaldcampbelljr Mar 5, 2024
f1eac9c
remove original looper cli
donaldcampbelljr Mar 5, 2024
a9c38f7
implement temp_pep from hello_looper repo, begin fixing tests
donaldcampbelljr Mar 6, 2024
153ec4c
lint
donaldcampbelljr Mar 6, 2024
e3dce56
re-add validating and checking for mutually exclusive commands post p…
donaldcampbelljr Mar 7, 2024
6c9a78e
fix more tests within test_run
donaldcampbelljr Mar 7, 2024
1f09f70
remove redundant test
donaldcampbelljr Mar 7, 2024
6f5ae24
finish TestLooperRunBehavior fixes
donaldcampbelljr Mar 7, 2024
a3eb5eb
finish TestLooperRunPBehavior fixes
donaldcampbelljr Mar 7, 2024
0f8055f
fix Compute Tests
donaldcampbelljr Mar 7, 2024
5333436
fix TestLooperRunPreSubmissionHooks
donaldcampbelljr Mar 7, 2024
b8e2f8e
fix config tests
donaldcampbelljr Mar 7, 2024
14cdfa0
add shell script to download hello_looper branch
donaldcampbelljr Mar 11, 2024
61cea90
replace cloning repo with copying local hello_looper copy
donaldcampbelljr Mar 11, 2024
faba7c8
remove skips if not connected, add prep_temp_pep_basic, and refactor …
donaldcampbelljr Mar 11, 2024
fabe283
fix check tests with new pipestat PEP
donaldcampbelljr Mar 11, 2024
8f72506
fix Selector tests, add advanced pipestat fixture
donaldcampbelljr Mar 11, 2024
cded639
fix test_looper_cfg_required
donaldcampbelljr Mar 11, 2024
30c54a1
use local pep for pipestat comprehensive test
donaldcampbelljr Mar 11, 2024
1275d15
Merge branch 'dev_rethink_testing' into feature-pydantic-argparse-cli
donaldcampbelljr Mar 12, 2024
246c5ef
Merge branch 'feature-pydantic-argparse-cli' into drc_feature-pydanti…
donaldcampbelljr Mar 12, 2024
4125b78
Update tests/conftest.py
donaldcampbelljr Mar 12, 2024
54f0b1f
add todo
donaldcampbelljr Mar 12, 2024
5da3fc9
use == instead of in for assessing subcommands
donaldcampbelljr Mar 12, 2024
3d277c8
add one line function explanations
donaldcampbelljr Mar 12, 2024
98ef5f2
re-add inspect command and information
donaldcampbelljr Mar 12, 2024
953d6d9
revert lumpj, lumpn to lump-j and lump-n
donaldcampbelljr Mar 12, 2024
a3a736d
Merge pull request #472 from pepkit/drc_feature-pydantic-argparse-cli
donaldcampbelljr Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ __pycache__/
*ipynb_checkpoints*
hello_looper-master*
/pipeline/
/tests/data/hello_looper-dev_derive/
2 changes: 1 addition & 1 deletion looper/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from .cli_looper import main
from .cli_pydantic import main
from .cli_divvy import main as divvy_main

if __name__ == "__main__":
Expand Down
Loading
Loading