1.6 KiB
1.6 KiB
AareDAQ project notes
CI gates — run locally BEFORE every commit/push
CI enforces more than ruff check + green tests. Two extra gates diff
against origin/main, so they fail on changed lines that a plain lint or
full-suite pass never inspects (git fetch origin main first):
uv run ruff checkanduv run ruff format --check- Typecheck the diff (part of the lint job; ONE new basedpyright
violation on a changed line fails CI):
uv run diff-quality --violations=basedpyright --fail-under=100 --compare-branch=origin/main - Diff coverage >= 80% (coverage-analysis job):
QT_QPA_PLATFORM=offscreen uv run pytest --cov=aare --cov-config=./pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./tests/unituv run diff-cover coverage.xml --compare-branch=origin/main --fail-under=80
A pre-push hook in the shared .git/hooks runs all of the above; bypass
only deliberately with git push --no-verify.
Gotchas learned the hard way:
- The
diff-qualitybasedpyright plugin is an editable install from~/repos/aare_suite/diff_quality_basedpyright(gitea mx/diff_quality_basedpyright). On ModuleNotFoundError reinstall withuv pip install -e ~/repos/aare_suite/diff_quality_basedpyright. - basedpyright rejects lazily created instance attributes — initialize in
__init__, nohasattrpatterns. - Every new branch needs a test that executes it or diff coverage sinks.
- Run GUI tests with
QT_QPA_PLATFORM=offscreen; a blocking popup (e.g. a realQMenu.exec()) otherwise freezes the suite on macOS. PySide method lookup ignores class-attribute monkeypatches — patch by swapping in a Python subclass instead.