69 lines
1.5 KiB
Makefile
69 lines
1.5 KiB
Makefile
the_app := "teilchensammler_cli.main"
|
|
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
|
|
|
[private]
|
|
default:
|
|
@just --list
|
|
|
|
# create venv, install dependencies
|
|
setup:
|
|
uv sync
|
|
# install the other tools: prek, mise
|
|
|
|
# builds a package
|
|
build:
|
|
uv build --wheel --clear
|
|
|
|
# upload to Package Registry
|
|
upload: build
|
|
python -m twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
|
|
|
# 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 }}
|
|
|
|
# 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
|
|
|
|
# Update dependencies to new versions
|
|
update-deps:
|
|
uv lock --upgrade
|
|
uv sync
|
|
|
|
# Run tests, ARGS are passed-through to pytest
|
|
test *ARGS:
|
|
uv run pytest tests.py {{ ARGS }}
|
|
|
|
# run tests and create coverage reports
|
|
coverage:
|
|
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
|
|
|
# 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
|
|
|
|
# pretend we are CI
|
|
ci: lint
|
|
prek run --all-files
|
|
# woodpecker-cli exec "whatever"
|
|
|
|
[private]
|
|
bump segment:
|
|
uv version --bump {{ segment }}
|