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-15 17:39:44 +01:00
|
|
|
# install the other tools: prek, mise
|
2025-12-09 21:26:27 +01:00
|
|
|
|
2026-02-15 17:39:44 +01:00
|
|
|
# builds a package (tgz and whl)
|
|
|
|
|
build:
|
|
|
|
|
uv build
|
|
|
|
|
|
|
|
|
|
# console to observe log messages
|
2025-12-09 21:25:44 +01:00
|
|
|
console:
|
|
|
|
|
uv run textual console
|
|
|
|
|
|
2026-02-14 23:17:36 +01:00
|
|
|
|
2025-12-09 21:25:44 +01:00
|
|
|
# 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:
|
|
|
|
|
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 .
|
|
|
|
|
|
2025-12-09 21:26:27 +01:00
|
|
|
# remove artefacts from dist/
|
|
|
|
|
clean:
|
|
|
|
|
rm dist/*.whl dist/*.tar.gz
|
2026-02-19 21:16:14 +01:00
|
|
|
# consider xargs, or something that won't explode on many files
|
2025-12-09 21:26:27 +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 }}
|