-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reworks Markus to use uv and just for project commands. This simplifies a lot of things like dealing with virtual environments.
- Loading branch information
Showing
4 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ build/ | |
dist/ | ||
.eggs/ | ||
.python-version | ||
uv.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters