Skip to content

Commit a8da61f

Browse files
authored
Update documentation and packages (#18)
## Describe your changes Updated the above packages and implemented the correct version of default into the `Makefile`. ## Checklist before requesting a review - [x] The code runs successfully. ```console michaelp@Mac python-project-template % make env uv venv Using CPython 3.12.0 interpreter at: /Users/michaelp/.pyenv/versions/3.12.0/bin/python3.12 Creating virtual environment at: .venv Activate with: source .venv/bin/activate michaelp@Mac python-project-template % source .venv/bin/activate (python-project-template) michaelp@Mac python-project-template % make uv pip compile --generate-hashes pyproject.toml > requirements.txt Resolved 19 packages in 17ms pre-commit run --all-files [INFO] Installing environment for https://github.com/nbQA-dev/nbQA. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/nbQA-dev/nbQA. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/nbQA-dev/nbQA. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/PyCQA/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... nbqa-ruff................................................................Passed nbqa-black...............................................................Passed nbqa-isort...............................................................Passed trim trailing whitespace.................................................Passed check docstring is first.................................................Passed check that executables have shebangs.................(no files to check)Skipped check json...........................................(no files to check)Skipped check for case conflicts.................................................Passed check toml...............................................................Passed check for merge conflicts................................................Passed check xml............................................(no files to check)Skipped check yaml...............................................................Passed fix end of files.........................................................Passed check for broken symlinks............................(no files to check)Skipped mixed line ending........................................................Passed sort simple yaml files...............................(no files to check)Skipped fix python encoding pragma (deprecated)..................................Passed pretty format json...................................(no files to check)Skipped check blanket noqa.......................................................Passed check for not-real mock methods..........................................Passed check for eval().........................................................Passed use logger.warning(......................................................Passed Run isort to sort imports................................................Passed ruff.....................................................................Passed ruff-format..............................................................Passed (python-project-template) michaelp@Mac python-project-template % make test pytest -vs tests/ ============================================================================================= test session starts ============================================================================================== platform darwin -- Python 3.11.11, pytest-7.3.1, pluggy-1.0.0 -- /opt/homebrew/opt/[email protected]/bin/python3.11 cachedir: .pytest_cache rootdir: /Users/michaelp/Documents/GitHub/python-project-template plugins: anyio-3.6.2 collected 1 item tests/test_example.py::test_example PASSED ============================================================================================== 1 passed in 0.00s =============================================================================================== (python-project-template) michaelp@Mac python-project-template % make test-and-fail pytest -vsx tests/ ============================================================================================= test session starts ============================================================================================== platform darwin -- Python 3.11.11, pytest-7.3.1, pluggy-1.0.0 -- /opt/homebrew/opt/[email protected]/bin/python3.11 cachedir: .pytest_cache rootdir: /Users/michaelp/Documents/GitHub/python-project-template plugins: anyio-3.6.2 collected 1 item tests/test_example.py::test_example PASSED ============================================================================================== 1 passed in 0.00s =============================================================================================== (python-project-template) michaelp@Mac python-project-template % make run python -m project oh, what up? (python-project-template) michaelp@Mac python-project-template % ```
1 parent bfa8e12 commit a8da61f

File tree

5 files changed

+140
-153
lines changed

5 files changed

+140
-153
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ your repository's standards.
1818
--->
1919
- [ ] The code runs successfully.
2020

21-
```commandline
21+
```console
2222
HERE IS SOME COMMAND LINE OUTPUT
2323
```

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/nbQA-dev/nbQA
3-
rev: 1.8.5
3+
rev: 1.9.1
44
hooks:
55
- id: nbqa-ruff
66
args:
@@ -17,7 +17,7 @@ repos:
1717
- --profile=black
1818

1919
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v4.4.0
20+
rev: v5.0.0
2121
hooks:
2222
- id: trailing-whitespace
2323
- id: check-docstring-first
@@ -48,7 +48,7 @@ repos:
4848
- id: python-no-log-warn
4949

5050
- repo: https://github.com/PyCQA/isort
51-
rev: 5.12.0
51+
rev: 6.0.1
5252
hooks:
5353
- id: isort
5454
name: Run isort to sort imports
@@ -61,7 +61,7 @@ repos:
6161
- --line-length=80
6262

6363
- repo: https://github.com/astral-sh/ruff-pre-commit
64-
rev: v0.4.10
64+
rev: v0.11.6
6565
hooks:
6666
- id: ruff
6767
types_or: [python,pyi]

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Here is some general information on Makefile's so that you can grow this out:
22
# https://www.gnu.org/software/make/manual/html_node/Introduction.html
3-
default: create-requirements lint
3+
.DEFAULT_GOAL := lint
44

55
.PHONY: env
66
env:
77
uv venv
88

9-
.PHONY: lint
10-
lint:
11-
uv run pre-commit run --all-files
12-
139
.PHONY: create-requirements
1410
create-requirements:
1511
uv pip compile --generate-hashes pyproject.toml > requirements.txt
1612

13+
.PHONY: lint
14+
lint: create-requirements
15+
pre-commit run --all-files
16+
1717
.PHONY: test
1818
test:
19-
uv run pytest -vs tests/
19+
pytest -vs tests/
2020

2121
.PHONY: test-and-fail
2222
test-and-fail:
23-
uv run pytest -vsx tests/
23+
pytest -vsx tests/
2424

2525
.PHONY: run
2626
run:
27-
uv run python -m project
27+
python -m project

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lifting for a python project so that people can hit the ground running with thei
2727

2828
## Standard Commands
2929
- `make create-requirements`: Creates and/or updates the `requirements.txt` file.
30-
- `make env`: Creates or activates a `uv` virtual environment.
30+
- `make env`: Creates a `uv` virtual environment.
3131
- `make lint`: Runs `pre-commit`.
3232
- `make run`: Runs the `main` function in the `project` folder.
3333
- `make test`: Runs test cases in the `tests` directory.

0 commit comments

Comments
 (0)