forked from genewildish/Mainline
- Add pyproject.toml with modern Python packaging (PEP 517/518) - Add uv-based dependency management replacing inline venv bootstrap - Add requirements.txt and requirements-dev.txt for compatibility - Add mise.toml with dev tasks (test, lint, run, sync, ci) - Add .python-version pinned to Python 3.12 - Add comprehensive pytest test suite (73 tests) for: - engine/config, filter, terminal, sources, mic, ntfy modules - Configure pytest with coverage reporting (16% total, 100% on tested modules) - Configure ruff for linting with Python 3.10+ target - Remove redundant venv bootstrap code from mainline.py - Update .gitignore for uv/venv artifacts Run 'uv sync' to install dependencies, 'uv run pytest' to test.
45 lines
1.1 KiB
TOML
45 lines
1.1 KiB
TOML
[tools]
|
|
python = "3.12"
|
|
|
|
[tasks]
|
|
# =====================
|
|
# Development
|
|
# =====================
|
|
|
|
test = "uv run pytest"
|
|
test-v = "uv run pytest -v"
|
|
test-cov = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html"
|
|
test-cov-open = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html && open htmlcov/index.html"
|
|
|
|
lint = "uv run ruff check engine/ mainline.py"
|
|
lint-fix = "uv run ruff check --fix engine/ mainline.py"
|
|
format = "uv run ruff format engine/ mainline.py"
|
|
|
|
# =====================
|
|
# Runtime
|
|
# =====================
|
|
|
|
run = "uv run mainline.py"
|
|
run-poetry = "uv run mainline.py --poetry"
|
|
run-firehose = "uv run mainline.py --firehose"
|
|
|
|
# =====================
|
|
# Environment
|
|
# =====================
|
|
|
|
sync = "uv sync"
|
|
sync-all = "uv sync --all-extras"
|
|
install = "uv sync"
|
|
install-dev = "uv sync --group dev"
|
|
|
|
bootstrap = "uv sync && uv run mainline.py --help"
|
|
|
|
clean = "rm -rf .venv htmlcov .coverage tests/.pytest_cache"
|
|
|
|
# =====================
|
|
# CI/CD
|
|
# =====================
|
|
|
|
ci = "uv sync --group dev && uv run pytest --cov=engine --cov-report=term-missing --cov-report=xml"
|
|
ci-lint = "uv run ruff check engine/ mainline.py"
|