fix(ci): restore green backend CI — ruff config + unused import cleanup #117

Merged
pyr0ball merged 6 commits from fix/ci-ruff-lint into main 2026-05-21 12:05:51 -07:00

6 commits

Author SHA1 Message Date
02d79e6727 fix(ci): install ruff before lint step
All checks were successful
CI / Backend (Python) (push) Successful in 1m33s
CI / Frontend (Vue) (push) Successful in 19s
CI / Backend (Python) (pull_request) Successful in 1m21s
CI / Frontend (Vue) (pull_request) Successful in 19s
ruff is not in requirements.txt (dev-only tool) so the CI runner
couldn't find it. Install explicitly in the workflow.
2026-05-21 12:03:46 -07:00
e4c5744d87 fix(ci): restore TaskSpec re-export in task_scheduler.py
Some checks failed
CI / Backend (Python) (push) Failing after 31s
CI / Frontend (Vue) (push) Successful in 22s
CI / Backend (Python) (pull_request) Failing after 23s
CI / Frontend (Vue) (pull_request) Successful in 20s
ruff --fix removed the TaskSpec import as unused within the module,
but it is part of the public API — tests import it from scripts.task_scheduler
rather than reaching into circuitforge_core directly.
Add # noqa: F401 to protect intentional re-exports from future auto-fix.
2026-05-21 11:51:40 -07:00
46bae7db1c fix(ci): rename GITHUB_MIRROR_TOKEN secret to GH_MIRROR_TOKEN
Some checks failed
CI / Backend (Python) (push) Failing after 26s
CI / Frontend (Vue) (push) Successful in 22s
CI / Backend (Python) (pull_request) Failing after 22s
CI / Frontend (Vue) (pull_request) Successful in 20s
Forgejo reserves the GITHUB_* prefix for secret names — creating a secret
called GITHUB_MIRROR_TOKEN returns 'invalid secret name'.
Also rename the GITHUB_TOKEN step env var to GH_MIRROR_PAT to avoid
collision with the built-in Forgejo Actions context variable.
2026-05-21 11:41:11 -07:00
e87c707dd9 chore(lint): ruff auto-fix unused imports in tests/
Some checks failed
CI / Backend (Python) (push) Failing after 30s
CI / Frontend (Vue) (push) Successful in 22s
CI / Backend (Python) (pull_request) Failing after 27s
CI / Frontend (Vue) (pull_request) Successful in 20s
Removes unused imports flagged by ruff F401 across 47 test files.
Auto-fix only — imports verified unused by static analysis.
2026-05-20 23:07:52 -07:00
7dcdf551fc chore(lint): ruff auto-fix unused imports in scripts/ and scrapers/
Removes unused imports flagged by ruff F401 across 12 scripts.
All removals are safe — ruff only auto-fixes imports that are verifiably unused.
2026-05-20 23:07:26 -07:00
544a6aeeb3 fix(ci): add ruff config, clean lint in dev-api.py + scripts
- Add pyproject.toml with ruff per-file-ignores:
  - Exclude deprecated app/ Streamlit dir entirely
  - Suppress E702 in dev-api.py (intentional compact Pydantic models)
  - Suppress E402 in finetune_local.py (conditional ML imports after CUDA check)
  - Suppress F841/E741/E702 in tests/ (mock-patch capture pattern)
- Remove unused db_path_obj assignment in dev-api.py:760
- Add # noqa: E402 to documented mid-file imports in dev-api.py
- Rename ambiguous l variable to line/lbl in finetune_local.py + label_tool.py
2026-05-20 23:06:49 -07:00