Skip to content

Commit

Permalink
Merge pull request #159 from jedie/tyro
Browse files Browse the repository at this point in the history
Replace click by tyro in uv-python
  • Loading branch information
jedie authored Nov 21, 2024
2 parents e9e2dae + 70a336e commit 690a4fb
Show file tree
Hide file tree
Showing 22 changed files with 417 additions and 519 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Usage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...
[comment]: <> (✂✂✂ auto generated history start ✂✂✂)

* [v0.5.0](https://github.com/jedie/cookiecutter_templates/compare/v0.3.0...v0.5.0)
* 2024-11-21 - Replace click by tyro in uv-python
* 2024-11-14 - New template: "make-uv-python"
* 2024-11-13 - Migrate to uv
* 2024-11-13 - Bugfix uv-python
Expand Down
73 changes: 44 additions & 29 deletions generated_templates/uv-python/your_cool_package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ A minimal Python package

[comment]: <> (✂✂✂ auto generated main help start ✂✂✂)
```
Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ update-readme-history Update project history base on git commits/tags in README.md │
│ version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
usage: ./cli.py [-h] {update-readme-history,version}
╭─ options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ {update-readme-history,version} │
│ update-readme-history │
│ Update project history base on git commits/tags in README.md Will be exited with 1 if the │
│ README.md was updated otherwise with 0. │
│ │
│ Also, callable via e.g.: │
│ python -m cli_base update-readme-history -v │
│ version Print version and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
[comment]: <> (✂✂✂ auto generated main help end ✂✂✂)

Expand All @@ -29,26 +37,33 @@ Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...

[comment]: <> (✂✂✂ auto generated dev help start ✂✂✂)
```
Usage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ check-code-style Check code style by calling darker + flake8 │
│ coverage Run tests and show coverage report. │
│ fix-code-style Fix code style of all your_cool_package source code files via darker │
│ install Install requirements and 'your_cool_package' via pip as editable. │
│ mypy Run Mypy (configured in pyproject.toml) │
│ pip-audit Run pip-audit check against current requirements files │
│ publish Build and upload this project to PyPi │
│ test Run unittests │
│ tox Run tox │
│ update Update "requirements*.txt" dependencies files │
│ update-test-snapshot-files Update all test snapshot files (by remove and recreate all snapshot │
│ files) │
│ version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
usage: ./dev-cli.py [-h]
{check-code-style,coverage,fix-code-style,install,mypy,pip-audit,publish,test,tox,update,update-te
st-snapshot-files,version}
╭─ options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ {check-code-style,coverage,fix-code-style,install,mypy,pip-audit,publish,test,tox,update,update-test-snapshot-fil… │
│ check-code-style │
│ Check code style by calling darker + flake8 │
│ coverage Run tests and show coverage report. │
│ fix-code-style │
│ Fix code style of all your_cool_package source code files via darker │
│ install Install requirements and 'your_cool_package' via pip as editable. │
│ mypy Run Mypy (configured in pyproject.toml) │
│ pip-audit Run pip-audit check against current requirements files │
│ publish Build and upload this project to PyPi │
│ test Run unittests │
│ tox Run tox │
│ update Update "requirements*.txt" dependencies files │
│ update-test-snapshot-files │
│ Update all test snapshot files (by remove and recreate all snapshot files) │
│ version Print version and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
[comment]: <> (✂✂✂ auto generated dev help end ✂✂✂)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ requires-python = ">=3.11"
dependencies = [
"cli-base-utilities>=0.8.0", # https://github.com/jedie/cli-base-utilities
"bx_py_utils", # https://github.com/boxine/bx_py_utils
"click", # https://github.com/pallets/click/
"rich-click", # https://github.com/ewels/rich-click
"tyro", # https://github.com/brentyi/tyro
"rich", # https://github.com/Textualize/rich
]

Expand Down
Loading

0 comments on commit 690a4fb

Please sign in to comment.