1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
version := `python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])"`
default:
@echo "\"just publish\"?"
publish:
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
gh release create "v{{version}}"
clean:
@find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
@rm -rf src/*.egg-info/ build/ dist/ .tox/ .mypy_cache/
format:
ruff --fix src/ tests/
black src/ tests/
blacken-docs README.md
lint:
pre-commit run --all
|