1- PYTHON_BINARY := " python3"
2- VIRTUAL_ENV := " venv"
1+ VIRTUAL_ENV := " .venv"
32VIRTUAL_BIN := VIRTUAL_ENV / " bin"
43PROJECT_NAME := " github_archive"
54TEST_DIR := " test"
@@ -12,14 +11,6 @@ bandit:
1211build :
1312 {{ VIRTUAL_BIN}} / python -m build
1413
15- # Runs the Black Python formatter against the project
16- black :
17- {{ VIRTUAL_BIN}} / black {{ PROJECT_NAME}} / {{ TEST_DIR}} /
18-
19- # Checks if the project is formatted correctly against the Black rules
20- black-check :
21- {{ VIRTUAL_BIN}} / black {{ PROJECT_NAME}} / {{ TEST_DIR}} / --check
22-
2314# Test the project and generate an HTML coverage report
2415coverage :
2516 {{ VIRTUAL_BIN}} / pytest --cov={{ PROJECT_NAME}} --cov-branch --cov-report=html --cov-report=lcov --cov-report=term-missing --cov-fail-under=90
@@ -29,28 +20,19 @@ clean:
2920 rm -rf {{ VIRTUAL_ENV}} dist *.egg-info .coverage htmlcov .*cache
3021 find . -name ' *.pyc' -delete
3122
32- # Run flake8 checks against the project
33- flake8 :
34- {{ VIRTUAL_BIN}} / flake8 {{ PROJECT_NAME}} / {{ TEST_DIR}} /
35-
36- # Lints the project
37- lint : black-check isort-check flake8 mypy bandit
23+ lint :
24+ {{ VIRTUAL_BIN}} / ruff check {{ PROJECT_NAME}} / {{ TEST_DIR}} /
25+ {{ VIRTUAL_BIN}} / ruff format --check {{ PROJECT_NAME}} / {{ TEST_DIR}} /
3826
39- # Runs all formatting tools against the project
40- lint-fix : black isort
27+ # Fixes lint issues
28+ lint-fix :
29+ {{ VIRTUAL_BIN}} / ruff check --fix {{ PROJECT_NAME}} / {{ TEST_DIR}} /
30+ {{ VIRTUAL_BIN}} / ruff format {{ PROJECT_NAME}} / {{ TEST_DIR}} /
4131
4232# Install the project locally
4333install :
44- {{ PYTHON_BINARY}} -m venv {{ VIRTUAL_ENV}}
45- {{ VIRTUAL_BIN}} / pip install -e ." [dev]"
46-
47- # Sorts imports throughout the project
48- isort :
49- {{ VIRTUAL_BIN}} / isort {{ PROJECT_NAME}} / {{ TEST_DIR}} /
50-
51- # Checks that imports throughout the project are sorted correctly
52- isort-check :
53- {{ VIRTUAL_BIN}} / isort {{ PROJECT_NAME}} / {{ TEST_DIR}} / --check-only
34+ uv venv
35+ uv pip install -e ' .[dev]'
5436
5537# Run mypy type checking on the project
5638mypy :
0 commit comments