-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJustfile
61 lines (46 loc) · 1.37 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
package := 'blacksmith'
default_test_suite := 'tests/unittests'
install:
uv sync --group doc
doc:
uv sync --group dev --group doc
cd docs && uv run make html
xdg-open docs/build/html/index.html
cleandoc:
cd docs && uv run make clean
gensync: && fmt
uv run python scripts/gen_unasync.py
lint:
uv run ruff check .
test: gensync lint typecheck unittest functest
unittest test_suite=default_test_suite:
uv run pytest -sxv {{test_suite}}
lf:
uv run pytest -sxvvv --lf
cov test_suite=default_test_suite:
rm -f .coverage
rm -rf htmlcov
uv run pytest --cov-report=html --cov={{package}} {{test_suite}}
xdg-open htmlcov/index.html
functest:
uv run pytest -sxv tests/functionals
typecheck:
uv run mypy src/ tests/
fmt:
uv run ruff check --fix .
uv run ruff format src tests
release major_minor_patch: test && changelog
#! /bin/bash
uvx --with=pdm,pdm-bump --python-preference system pdm bump {{major_minor_patch}}
uv sync --group dev --frozen
changelog:
uv run python scripts/write_changelog.py
cat CHANGELOG.rst >> CHANGELOG.rst.new
rm CHANGELOG.rst
mv CHANGELOG.rst.new CHANGELOG.rst
$EDITOR CHANGELOG.rst
publish:
git commit -am "Release $(uv run scripts/get_version.py)"
git tag "v$(uv run scripts/get_version.py)"
git push
git push origin "v$(uv run scripts/get_version.py)"