-
Notifications
You must be signed in to change notification settings - Fork 15
/
justfile
44 lines (36 loc) · 1.18 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
sphinxbuild := "../.venv/bin/sphinx-build"
@_default:
just --list
# Build a development environment
devenv:
uv sync --extra sphinx --extra ini --extra yaml --extra dev --refresh --upgrade
# Run tests, linting, and static typechecking
test: devenv
uv run tox
# Format files
format: devenv
uv run tox exec -e py39-lint -- ruff format
# Lint files
lint: devenv
uv run tox -e py39-lint
# Wipe devenv and build artifacts
clean:
rm -rf .venv uv.lock
rm -rf build dist src/everett.egg-info .tox .pytest_cache .mypy_cache
rm -rf docs/_build/*
find src/ tests/ -name __pycache__ | xargs rm -rf
find src/ tests/ -name '*.pyc' | xargs rm -rf
# Runs cog and builds Sphinx docs
docs: devenv
uv run python -m cogapp -r README.rst
uv run python -m cogapp -r docs/components.rst
uv run python -m cogapp -r docs/configmanager.rst
uv run python -m cogapp -r docs/configuration.rst
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ clean
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ doctest
SPHINXBUILD={{sphinxbuild}} make -e -C docs/ html
# Build files for relase
build: devenv
rm -rf build/ dist/
uv run python -m build
uv run twine check dist/*