File tree Expand file tree Collapse file tree 4 files changed +104
-90
lines changed
Expand file tree Collapse file tree 4 files changed +104
-90
lines changed Original file line number Diff line number Diff line change @@ -65,3 +65,9 @@ black-apply: # Apply changes with 'black'
6565
6666ruff-apply : # Resolve 'fixable errors' with 'ruff'
6767 uv run ruff check --fix .
68+
69+ # #############################
70+ # CLI convenience commands
71+ # #############################
72+ my-app : # CLI without any arguments, utilizing uv script entrypoint
73+ uv run my-app
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Description of the app
3131- To update dependencies: ` make update `
3232- To run unit tests: ` make test `
3333- To lint the repo: ` make lint `
34- - To run the app: ` uv run my_app --help `
34+ - To run the app: ` uv run my-app --help ` (Note the hyphen ` - ` vs underscore ` _ ` that matches the ` project.scripts ` in ` pyproject.toml ` )
3535
3636## Environment Variables
3737
Original file line number Diff line number Diff line change 33# https://mitlibraries.atlassian.net/wiki/spaces/IN/pages/3432415247/Python+Project+Linters#Template-for-pyproject.toml
44
55[project ]
6- name = " python-lambda -template"
6+ name = " python-cli -template"
77version = " 2.0.0"
88requires-python = " >=3.13"
99
@@ -83,3 +83,10 @@ max-doc-length = 90
8383
8484[tool .ruff .lint .pydocstyle ]
8585convention = " google"
86+
87+ [project .scripts ]
88+ my-app = " my_app.cli:main"
89+
90+ [build-system ]
91+ requires = [" setuptools>=61" ]
92+ build-backend = " setuptools.build_meta"
You can’t perform that action at this time.
0 commit comments