ci: add ruff static gate to make check and Gitea workflow
Adds ruff as a dev dependency with an explicit py312 E/F rule set, so the gate stays stable across ruff releases. make check now runs uv sync --frozen, ruff, compileall, and pytest; make lint runs ruff alone. The Gitea job splits the same checks into named steps for readable failures and has a 10-minute timeout. No secrets, image push, or cluster access.
This commit is contained in:
1 parent
8656d9bc8a
commit
2b9617fd71
6 files changed
+63
-10
No files matched your search
@@ -1,13 +1,14 @@
|
||||
UV ?= uv
|
||||
|
||||
.PHONY: help data train test check serve docker clean
|
||||
.PHONY: help data train test lint check serve docker clean
|
||||
|
||||
help:
|
||||
@printf '%s\n' \
|
||||
'make data parse/clean the raw CSV, join weather + holidays, export JSON' \
|
||||
'make train fit the 28-day holdout model, export metrics/forecasts/model' \
|
||||
'make test run pytest' \
|
||||
'make check CI gate: uv sync --frozen, compileall, pytest' \
|
||||
'make lint run ruff static checks' \
|
||||
'make check CI gate: sync --frozen, ruff, compileall, pytest' \
|
||||
'make serve run the FastAPI service on :8000' \
|
||||
'make docker build the multi-stage image (pulsecast-ml:local)' \
|
||||
'make clean remove caches and generated artifacts (keeps data/raw)'
|
||||
@@ -21,8 +22,12 @@ train:
|
||||
test:
|
||||
$(UV) run pytest
|
||||
|
||||
lint:
|
||||
$(UV) run ruff check src tests main.py
|
||||
|
||||
check:
|
||||
$(UV) sync --frozen
|
||||
$(UV) run ruff check src tests main.py
|
||||
$(UV) run python -m compileall src
|
||||
$(UV) run pytest -q
|
||||
|
||||
|
||||
Reference in new issue
Block a user