mirror of
https://github.com/NickoScope/nickol-knx-mcp.git
synced 2026-09-30 03:41:58 +02:00
The CI ran tests only. Added a lint job with two narrow gates: ruff with select = E9,F — syntax errors and pyflakes (undefined names, unused imports, broken f-strings). Style rules are deliberately off: the full default set flagged 202 things, almost all cosmetic, and a gate nobody reads is not a gate. Fixed the 9 findings it did have (8 unused imports, 1 empty f-string). mypy, clean at 13 errors fixed. None of the 13 was a live bug, so every fix is an annotation or a local rename: the two accumulators in advanced, the block map in appprog_parser, a reused loop name in project and in repair, a TypedDict lost through dict(), a mixed-type summary dict in handover. Two are worth naming. _CH_TOKEN_RE now captures the letter prefix directly instead of re-matching its own capture, which removes an unguarded .group() on a possibly-None match; the regex accepts exactly the same strings. repair's status-DPT lookup now spells out the None case, which is what dict.get already did since None is not a key there. Verified the fixes moved nothing: the full suite passes, and the corpus guard reports no drift across all six real projects, the 3646-GA one included. Matrix extended to 3.13 and 3.14; both were smoke-tested locally first. Dependabot config for pip and github-actions, weekly and grouped so a quiet week is one PR. Dependabot security updates and CodeQL default setup enabled in the repository settings.
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
- name: Install package and tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e . ruff mypy
|
|
- name: Lint (ruff — errors only, no style rules)
|
|
run: ruff check nickol_knx_mcp tests tools
|
|
- name: Types (mypy)
|
|
run: mypy
|
|
|
|
smoke-test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
|
|
- name: Install package
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e .
|
|
|
|
- name: End-to-end smoke test (synthetic 16-GA project)
|
|
run: python tests/test_pipeline.py
|
|
|
|
- name: Device catalog wiring (catalog-exact + recipe fallback)
|
|
run: python tests/test_device_catalog.py
|
|
|
|
- name: App-program parser (synthetic .knxprod round-trip)
|
|
run: python tests/test_appprog_parser.py
|
|
|
|
- name: v0.8 fixes (positional pairing, ref-merge, range names)
|
|
run: python tests/test_v08_fixes.py
|
|
|
|
- name: Cover step/stop pairing stays within the ETS Function (issue #11)
|
|
run: python tests/test_cover_pairing.py
|
|
|
|
- name: RM/Rückmeldung shutter feedback classifies as status, not light (issue #12)
|
|
run: python tests/test_rm_status.py
|
|
|
|
- name: Policy profile — inferred taxonomy, declared profile, project-seeded example (issue #13)
|
|
run: python tests/test_policy.py
|
|
|
|
- name: Structure-first entity suggestions (HA SuggestionProvider prototype)
|
|
run: python tests/test_suggest.py
|
|
|
|
- name: Stable ordering + cursor paging for large tool results
|
|
run: python tests/test_paging.py
|
|
|
|
- name: Console script is installed
|
|
run: |
|
|
python -c "import importlib.metadata as m; print('entry points:', [e.name for e in m.entry_points(group='console_scripts') if e.name == 'nickol-knx-mcp'])"
|
|
command -v nickol-knx-mcp
|