Skip to content

Commit 6d1c871

Browse files
Address comments in PR #21
1 parent 7d37d6b commit 6d1c871

File tree

5 files changed

+948
-18
lines changed

5 files changed

+948
-18
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY pyproject.toml uv.lock* ./
1515
# Copy CLI application
1616
COPY my_app ./my_app
1717

18-
# Install package into system python, includes "marimo-launcher" script
18+
# Install package into the system Python environment
1919
RUN uv pip install --system .
2020

2121
ENTRYPOINT ["my-app"]

Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,4 @@ ruff-apply: # Resolve 'fixable errors' with 'ruff'
7070
# CLI convenience commands
7171
##############################
7272
my-app: # CLI without any arguments, utilizing uv script entrypoint
73-
uv run my-app
74-
75-
76-
####################################
77-
# Docker
78-
####################################
79-
docker-build: # Build local image for testing
80-
docker build -t python-cli-template:latest .
81-
82-
docker-shell: # Shell into local container for testing
83-
docker run -it --entrypoint='bash' python-cli-template:latest
84-
85-
docker-run: # Run main entrypoint + command without arguments
86-
docker run python-cli-template:latest
73+
uv run my-app

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A template repository for creating Python CLI applications.
44

55
## App Setup (delete this section and above after initial application setup)
66

7-
1. Rename "my_app" and "python-cli-template" to the desired app name across the repo. (May be helpful to do a project-wide find-and-replace).
7+
1. Rename "my_app" to the desired app name across the repo. (May be helpful to do a project-wide find-and-replace).
88
2. Update Python version if needed.
99
3. Install all dependencies with `make install` to create initial Pipfile.lock with latest dependency versions.
1010
4. Add initial app description to README and update initial required ENV variable documentation as needed.
@@ -31,7 +31,12 @@ 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` (Note the hyphen `-` vs underscore `_` that matches the `project.scripts` in `pyproject.toml`)
34+
- To run the app:
35+
- `make my-app`
36+
- Utilizes `uv` built entrypoint (see `project.scripts` in [`pyproject.toml`](pyproject.toml))
37+
- Does not support loading a `.env` file
38+
- `uv run --env-file .env my-app`
39+
- More verbose but supports loading a `.env` file
3540

3641
## Environment Variables
3742

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://mitlibraries.atlassian.net/wiki/spaces/IN/pages/3432415247/Python+Project+Linters#Template-for-pyproject.toml
44

55
[project]
6-
name = "python-cli-template"
6+
name = "my-app"
77
version = "2.0.0"
88
requires-python = ">=3.12"
99

0 commit comments

Comments
 (0)