teilchensammler-cli/justfile

70 lines
1.5 KiB
Makefile
Raw Normal View History

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]
default:
@just --list
2026-02-15 17:39:44 +01:00
# create venv, install dependencies
setup:
uv sync
2026-02-15 17:39:44 +01:00
# install the other tools: prek, mise
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
# upload to Package Registry
upload: build
python -m twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
2026-02-15 17:39:44 +01:00
# console to observe log messages
console:
uv run textual console
# run app with logs going to console
2026-02-19 21:02:02 +01:00
run-console:
uv run textual run --dev {{ the_app }}
2026-02-15 17:39:44 +01:00
# run the app
run:
uv run python -m {{ the_app }}
2026-02-15 17:39:44 +01:00
# 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
2026-02-15 17:39:44 +01:00
# Update dependencies to new versions
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:
uv run ruff check .
markdownlint-cli2 .
# remove artefacts from dist/
clean:
rm dist/*.whl dist/*.tar.gz
# consider xargs, or something that won't explode on many files
2026-02-15 17:39:44 +01:00
# pretend we are CI
2026-02-15 17:25:19 +01:00
ci: lint
prek run --all-files
# 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 }}