the_app := "teilchensammler_cli.main" uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project" releasenotes := "releasenotes.md" [private] default: @just --list # create venv, install dependencies setup: uv sync # console to observe log messages console: uv run textual console # run app with logs going to console run-console: uv run textual run --dev {{ the_app }} # run the app run: uv run python -m {{ the_app }} # Update dependencies to new versions update-deps: uv lock --upgrade uv sync # export dependencies into requirements files exports-deps: uv export {{ uv_export_options }} --output-file requirements.txt uv export {{ uv_export_options }} --output-file requirements.dev.txt --only-dev # Run tests, ARGS are passed-through to pytest test *ARGS: uv run pytest tests.py -m "not final" {{ ARGS }} alltests *ARGS: uv run pytest tests.py {{ ARGS }} # run tests and create coverage reports coverage: uv run pytest tests.py -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml # lint python, markdown, wheel file names, prek config lint: uv run ruff check . markdownlint-cli2 . uv run twine check --strict dist/* prek validate-config prek.toml release *release_name: #!/usr/bin/env fish test -f {{ releasenotes }}; and set -l body "$(cat {{ releasenotes }})"; or begin echo Release notes are missing!; exit 2; end set -l tag (uv version --short --output-format text) git add pyproject.toml uv.lock git commit -m "Release version $tag" git tag "v$tag" git push git push origin tag "v$tag" just build fj release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body" # just upload mv {{ releasenotes }} {{ releasenotes }}.$tag # builds a package build: uv build --wheel --clear # upload to Package Registry upload: uv run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl