-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathjustfile
More file actions
55 lines (44 loc) · 1.42 KB
/
justfile
File metadata and controls
55 lines (44 loc) · 1.42 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
# list recipes
default:
@just --list --unsorted
# install dependencies and set up all pre-commit hooks
install:
poetry install
poetry run pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
# update dependencies and pre-commit hook revisions
update:
poetry update
poetry run pre-commit autoupdate
# regenerate poetry.lock without upgrading dependencies
lock:
poetry lock --no-update
# remove Python file artifacts
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
# run ruff linting and fix all fixable errors
lint:
poetry run ruff check --fix .
# run docformatter and ruff formatter
format:
poetry run ruff format .
# run pyright type checking
typecheck:
poetry run pyright
# run tests with coverage
test:
poetry run pytest --cov=deeptab tests/
# build HTML docs locally (warnings treated as errors)
docs:
poetry run sphinx-build -b html docs/ docs/_build/html -W --keep-going
# run all pre-commit hooks on all files (commit + push stage)
# if ruff-format modifies files, stage and commit them before pushing:
# git add -u && git commit -m "style: apply ruff formatting"
check:
poetry run pre-commit run --all-files
poetry run pre-commit run --all-files --hook-stage push
# create a conventional commit using commitizen
commit:
poetry run cz commit