-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathjustfile
More file actions
91 lines (77 loc) · 2.8 KB
/
Copy pathjustfile
File metadata and controls
91 lines (77 loc) · 2.8 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# List available recipes
default:
@just --list --unsorted
# Build HTML docs
[group('doc')]
doc:
uv run --group doc sphinx-apidoc --no-toc --module-first -f -e -o ./doc/sphinx/source/python-api ./src/pointcloudset ./src/pointcloudset/config.py ./src/pointcloudset/io/dataset/commandline.py
uv run --group doc --directory doc/sphinx sphinx-build -b html source build/html
# Check docstring coverage
[group('doc')]
doccoverage:
uv run --group dev docstr-coverage src/pointcloudset --skip-magic --fail-under 68
# Run test suite
[group('qa')]
test:
uv run --group dev pytest --cov=pointcloudset tests
uv run --group dev pytest --cov-append --nbval-current-env --nbval-lax doc/sphinx/source/tutorial_notebooks/usage.ipynb
uv run --group dev pytest --cov-append --nbval-current-env --nbval-lax doc/sphinx/source/tutorial_notebooks/reading_las_pcd.ipynb
uv run --group dev pytest --cov-append --nbval-current-env --nbval-lax tests/notebooks/test_plot_plane.ipynb
uv run --group dev pytest --cov-append --nbval-current-env --nbval-lax tests/notebooks/test_readme.ipynb
uv run --group dev pytest --cov-append --nbval-current-env --nbval-lax tests/notebooks/test_animate.ipynb
uv run --group dev python -m coverage report -i
uv run --group dev python -m coverage html -i
# Run core unit/integration tests only
[group('qa')]
test-core:
uv run --group dev pytest tests
# Lint with ruff
[group('qa')]
ruff:
uv run --group dev ruff check src tests
# Auto-fix lint issues
[group('qa')]
ruff_fix:
uv run --group dev ruff check src tests --fix
# Sort imports and format code
[group('qa')]
ruff_format:
uv run --group dev ruff check --select I --fix .
uv run --group dev ruff format .
# Remove local artifacts
[group('qa')]
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -exec rm -rf {} +
rm -rf doc/sphinx/build doc/sphinx/source/python-api
# Bump patch release
[group('release')]
patch:
uv version --bump patch
git add pyproject.toml uv.lock CHANGELOG.rst
git commit -m "bump version to $(uv version --short)"
git tag "v$(uv version --short)"
git push
git push --tags
# Bump minor release
[group('release')]
minor:
uv version --bump minor
git add pyproject.toml uv.lock CHANGELOG.rst
git commit -m "bump version to $(uv version --short)"
git tag "v$(uv version --short)"
git push
git push --tags
# Build release image locally
[group('release')]
docker-local:
docker build --rm -f docker/release.Dockerfile -t "tgoelles/pointcloudset:v$(uv version --short)" .
# Build Python distribution
[group('release')]
build-dist:
uv build
# Publish distribution to PyPI
[group('release')]
publish-pypi:
uv publish --token "${PYPI_TOKEN:?PYPI_TOKEN is required}"