2026-02-19 21:14:19 +01:00
|
|
|
the_app := "teilchensammler_cli.main"
|
|
|
|
|
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
|
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
[private]
|
2025-12-09 21:24:55 +01:00
|
|
|
default:
|
|
|
|
|
@just --list
|
|
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# create venv, install dependencies
|
2025-12-09 21:26:27 +01:00
|
|
|
setup:
|
|
|
|
|
uv sync
|
|
|
|
|
|
2026-02-19 22:52:51 +01:00
|
|
|
# builds a package
|
2026-02-15 17:39:44 +01:00
|
|
|
build:
|
2026-02-19 22:52:51 +01:00
|
|
|
uv build --wheel --clear
|
2026-02-15 17:39:44 +01:00
|
|
|
|
2026-02-19 22:55:33 +01:00
|
|
|
# upload to Package Registry
|
|
|
|
|
upload: build
|
2026-02-19 23:08:00 +01:00
|
|
|
uv run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
2026-02-19 22:55:33 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# console to observe log messages
|
2025-12-09 21:25:44 +01:00
|
|
|
console:
|
|
|
|
|
uv run textual console
|
|
|
|
|
|
|
|
|
|
# run app with logs going to console
|
2026-02-19 21:02:02 +01:00
|
|
|
run-console:
|
2025-12-28 21:56:21 +01:00
|
|
|
uv run textual run --dev {{ the_app }}
|
2025-12-09 21:25:44 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# run the app
|
2025-12-26 18:16:07 +01:00
|
|
|
run:
|
2025-12-28 21:56:21 +01:00
|
|
|
uv run python -m {{ the_app }}
|
2025-12-26 18:16:07 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# export dependencies into requirements files
|
2025-12-05 17:07:19 +01:00
|
|
|
exports-deps:
|
|
|
|
|
uv export {{ uv_export_options }} --output-file requirements.txt
|
2026-02-14 19:40:59 +01:00
|
|
|
uv export {{ uv_export_options }} --output-file requirements.dev.txt --only-dev
|
2025-12-05 17:07:19 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# Update dependencies to new versions
|
2026-02-14 23:17:36 +01:00
|
|
|
update-deps:
|
|
|
|
|
uv lock --upgrade
|
|
|
|
|
uv sync
|
|
|
|
|
|
2026-02-19 21:15:18 +01:00
|
|
|
# Run tests, ARGS are passed-through to pytest
|
2026-02-14 18:56:30 +01:00
|
|
|
test *ARGS:
|
2026-02-20 21:26:34 +01:00
|
|
|
uv run pytest tests.py -m "not final" {{ ARGS }}
|
|
|
|
|
|
|
|
|
|
alltests *ARGS:
|
2026-02-14 18:56:30 +01:00
|
|
|
uv run pytest tests.py {{ ARGS }}
|
2025-12-09 21:24:08 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# run tests and create coverage reports
|
2025-12-09 21:24:08 +01:00
|
|
|
coverage:
|
|
|
|
|
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
|
|
|
|
|
2026-02-19 21:14:46 +01:00
|
|
|
# run python and markdown
|
|
|
|
|
lint:
|
2025-12-05 17:07:19 +01:00
|
|
|
uv run ruff check .
|
|
|
|
|
markdownlint-cli2 .
|
2026-02-19 23:08:00 +01:00
|
|
|
uv run twine check --strict dist/*
|
2025-12-05 17:07:19 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# pretend we are CI
|
2026-02-15 17:25:19 +01:00
|
|
|
ci: lint
|
2026-02-14 23:17:36 +01:00
|
|
|
prek run --all-files
|
2025-12-09 21:26:27 +01:00
|
|
|
# woodpecker-cli exec "whatever"
|
2026-02-14 23:46:13 +01:00
|
|
|
|
2026-02-19 21:02:02 +01:00
|
|
|
[private]
|
2026-02-19 21:14:46 +01:00
|
|
|
bump segment:
|
|
|
|
|
uv version --bump {{ segment }}
|
2026-02-21 01:23:38 +01:00
|
|
|
|
|
|
|
|
[private]
|
2026-02-22 11:15:25 +01:00
|
|
|
release segment *release_name:
|
|
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
test -f releasenotes.md; and set -l body "$(cat releasenotes.md)"; or set -l body ""
|
|
|
|
|
set -l tag (uv version --short --output-format text --bump {{ segment }})
|
2026-02-21 13:28:05 +01:00
|
|
|
|
2026-02-21 01:29:01 +01:00
|
|
|
git add pyproject.toml uv.lock
|
|
|
|
|
git commit -m "Release version $tag"
|
2026-02-22 11:15:25 +01:00
|
|
|
git tag "v$tag"
|
2026-02-21 13:28:05 +01:00
|
|
|
|
|
|
|
|
git push
|
2026-02-22 11:15:25 +01:00
|
|
|
git push origin tag "v$tag"
|
2026-02-21 13:28:05 +01:00
|
|
|
|
2026-02-21 01:29:01 +01:00
|
|
|
uv build --wheel --clear
|
2026-02-21 13:28:05 +01:00
|
|
|
|
2026-02-22 11:15:25 +01:00
|
|
|
fj release create "v$tag: $release_name" --pre-release --tag "v$tag" --attach dist/*.whl --body "$body"
|
|
|
|
|
# uv run twine upload --config-file ~/.config/pypirc --repository code.cbo dist/*.whl
|