Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
65 lines (53 loc) · 2.11 KB
/
Copy pathjustfile
File metadata and controls
65 lines (53 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Run all the formatting, linting, and testing commands
qa:
uv run --python=3.13 --extra test ruff format .
uv run --python=3.13 --extra test ruff check . --fix
uv run --python=3.13 --extra test ruff check --select I --fix .
uv run --python=3.13 --extra test ty check .
uv run --python=3.13 --extra test pytest .
# Run all the checks for CI
ci:
uv run --python=3.13 --extra test ruff format --check .
uv run --python=3.13 --extra test ruff check .
uv run --python=3.13 --extra test ruff check --select I .
uv run --python=3.13 --extra test ty check .
uv run --python=3.13 --extra test pytest .
# Run all the tests for all the supported Python versions
testall:
uv run --python=3.10 --extra test pytest
uv run --python=3.11 --extra test pytest
uv run --python=3.12 --extra test pytest
uv run --python=3.13 --extra test pytest
# Run all the tests, but allow for arguments to be passed
test *ARGS:
@echo "Running with arg: {{ARGS}}"
uv run --python=3.13 --extra test pytest {{ARGS}}
# Run all the tests, but on failure, drop into the debugger
pdb *ARGS:
@echo "Running with arg: {{ARGS}}"
uv run --python=3.13 --extra test pytest --pdb --maxfail=10 --pdbcls=IPython.terminal.debugger:TerminalPdb {{ARGS}}
# Run coverage, and build to HTML
coverage:
uv run --python=3.13 --extra test coverage run -m pytest .
uv run --python=3.13 --extra test coverage report -m
uv run --python=3.13 --extra test coverage html
# Build the project, useful for checking that packaging is correct
build:
rm -rf build
rm -rf dist
uv build
VERSION := `grep -m1 '^version' pyproject.toml | sed -E 's/version = "(.*)"/\1/'`
# Print the current version of the project
version:
@echo "Current version is {{VERSION}}"
# Tag the current version in git and put to github
tag:
echo "Tagging version v{{VERSION}}"
git tag -a v{{VERSION}} -m "Creating version v{{VERSION}}"
git push origin v{{VERSION}}
# Serve docs locally
doc:
uv run --extra docs mkdocs serve -a localhost:3000
# Build and deploy docs
doc-build:
uv run --extra docs mkdocs gh-deploy --force