-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjustfile
More file actions
executable file
·66 lines (52 loc) · 1.28 KB
/
Copy pathjustfile
File metadata and controls
executable file
·66 lines (52 loc) · 1.28 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
66
#!/usr/bin/env just --justfile
uv := require('uv')
@_default:
just --list
# run all checks, tests, and type checks
[group('contribute')]
all: check test typing
# run all pre-commit hooks, including Ruff
[group('contribute')]
check: (test 'style')
# generate coverage report
[group('contribute')]
coverage:
uv run pytest --cov=advent_of_code_ocr --cov-report=xml
# build documentation with Sphinx
[group('contribute')]
docs: (test 'docs')
# format code with Ruff
[group('contribute')]
format:
uv run ruff format
# set up pre-commit hooks
[group('contribute')]
install-hooks:
uv run pre-commit install
# lint and auto-fix code with Ruff
[group('contribute')]
lint:
uv run ruff check --fix
# run both linting and formatting with Ruff
[group('contribute')]
ruff: lint format
# run tests (across all Python versions by default, runs in CI)
[group('contribute')]
test env='':
#!/usr/bin/env bash
if [[ '{{env}}' == '' ]]; then
uv run tox
else
uv run tox -e {{env}}
fi
# run type checking with mypy (runs in CI)
[group('contribute')]
typing: (test 'typing')
# bump the version number
[group('maintain')]
bump type:
uv version --bump {{type}}
# upgrade GitHub Actions, pre-commit hooks, and uv.lock
[group('maintain')]
upgrade:
uv run tox -m update