generated from ShigureLab/python-lib-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
61 lines (46 loc) · 1.01 KB
/
justfile
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
VERSION := `uv run python -c "import sys; from dochooks import __version__ as version; sys.stdout.write(version)"`
install:
uv sync --all-extras --dev
test:
uv run pytest
just clean
fmt:
uv run ruff format .
lint:
uv run pyright dochooks tests
uv run ruff check .
fmt-docs:
prettier --write '**/*.md'
build:
uv build
release:
@echo 'Tagging v{{VERSION}}...'
git tag "v{{VERSION}}"
@echo 'Push to GitHub to trigger publish process...'
git push --tags
publish:
uv build
uv publish
git push --tags
just clean-builds
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -f
rm -rf .pytest_cache/
rm -rf .mypy_cache/
find . -maxdepth 3 -type d -empty -print0 | xargs -0 -r rm -r
clean-builds:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
hooks-update:
uv run pre-commit autoupdate
ci-install:
just install
ci-fmt-check:
uv run ruff format --check --diff .
prettier --check '**/*.md'
ci-lint:
just lint
ci-test:
uv run pytest --reruns 3 --reruns-delay 1
just clean