teilchensammler-cli/justfile

75 lines
1.6 KiB
Makefile
Raw Normal View History

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-15 17:39:44 +01:00
# builds a package (tgz and whl)
build:
uv build
# console to observe log messages
console:
uv run textual console
the_app := "teilchensammler_cli.main"
# 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 }}
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
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-15 17:39:44 +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-15 17:39:44 +01:00
# lint python code
lint-python:
uv run ruff check .
2026-02-15 17:39:44 +01:00
# lint markdown documents
lint-markdown:
markdownlint-cli2 .
2026-02-15 17:39:44 +01:00
# run python and markdown
lint: lint-python lint-markdown
# remove artefacts from dist/
clean:
rm dist/*.whl dist/*.tar.gz
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-15 17:39:44 +01:00
# create a new realese [CURRENTLY USELESS]
2026-02-19 21:02:02 +01:00
[private]
2026-02-14 23:46:13 +01:00
release:
@echo remember to git tag and update pyproject.toml
uv build
2026-02-15 17:25:19 +01:00
# upload to package registry
# send newsletter
# take over the world