-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJustfile
56 lines (43 loc) · 1.21 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
package := 'plaster_yaml'
default_unittest_suite := 'tests'
install:
uv sync --group dev --group uwsgi
lint:
uv run ruff check .
test: lint unittest
unittest test_suite=default_unittest_suite:
uv run pytest -sxv {{test_suite}}
#[doc("write eggs for testing")]
write_eggs:
#!/bin/bash
for app in tests/dummy_packages/*; do
pushd . > /dev/null
cd $app && python setup.py egg_info
popd > /dev/null
done
lf:
uv run pytest -sxvvv --lf
cov test_suite=default_unittest_suite:
rm -f .coverage
rm -rf htmlcov
uv run pytest --cov-report=html --cov={{package}} {{test_suite}}
xdg-open htmlcov/index.html
fmt:
uv run ruff check --fix .
uv run ruff format src tests
mypy:
uv run mypy src/ tests/
release major_minor_patch: test && changelog
uvx pdm bump {{major_minor_patch}}
uv sync
changelog:
uv run python scripts/write_changelog.py
cat CHANGELOG.md >> CHANGELOG.md.new
rm CHANGELOG.md
mv CHANGELOG.md.new CHANGELOG.md
$EDITOR CHANGELOG.md
publish:
git commit -am "Release $(uv run scripts/get_version.py)"
git push
git tag "v$(uv run scripts/get_version.py)"
git push origin "v$(uv run scripts/get_version.py)"