-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjustfile
41 lines (33 loc) · 1001 Bytes
/
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
# Relative to docs/ directory
sphinxbuild := "../.venv/bin/sphinx-build"
@_default:
just --list
# Build a development environment
devenv:
uv sync --extra dev --extra datadog --extra statsd --refresh --upgrade
# Run tests and linting
test *args: devenv
uv run tox {{args}}
# Format files
format: devenv
uv run tox exec -e py39-lint -- ruff format
# Lint files
lint: devenv
uv run tox -e py39-lint
# Build docs
docs: devenv
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ clean
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ doctest
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ html
# Wipe dev environment and build artifacts
clean:
rm -rf .venv uv.lock
rm -rf build dist src/markus.egg-info .tox
rm -rf docs/_build/*
find src/markus/ tests/ -name __pycache__ | xargs rm -rf
find src/markus/ tests/ -name '*.pyc' | xargs rm -rf
# Build files for relase
build: devenv
rm -rf build/ dist/
uv run python -m build
uv run twine check dist/*