Skip to content

Harden setup and maintenance tooling - #928

Merged
Kane610 merged 1 commit into
masterfrom
tooling/safer-maintenance
Nov 30, 2026
Merged

Kane610 merged 1 commit into
masterfrom
tooling/safer-maintenance

Conversation

@Kane610

@Kane610 Kane610 commented Nov 30, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Makes setup, dependency maintenance, validation, and release automation safer while retaining Axis's frontend, CLI, and packaging checks.

Architecture Layer(s)

  • Models (axis/models/)
  • Interfaces (axis/interfaces/)
  • Orchestration (axis/device.py, axis/interfaces/vapix.py)
  • Tests

Type of Change

  • New feature (handler, interface, model)
  • Bug fix (minimal, targeted)
  • Refactor (no behavior change)
  • Documentation

Related Issues

None. Inspired by Kane610/aiounifi#1152.

Verification Checklist

  • uv run ruff check . passes
  • uv run ruff format --check . passes
  • uv run mypy axis passes
  • uv run pytest passes (coverage ≥95%)
  • New tests added for new code (100% coverage for new code)
  • Commit hooks modified files? If so, re-staged and re-ran checks
  • No unrelated code/formatting changes
  • Follows conventions: enum _missing_ fallback, input normalization, XML parsing guards

Notes for Reviewers

  • Setup uses checkout-local uv-managed Python, preserves extra packages, and refuses unsafe existing environments.
  • Maintenance checks run in an isolated copy; publication guards staged changes, branch ancestry, hook modifications, and remote branch creation. Dependency updates reject downgrades and new prereleases.
  • Actions are pinned to commit SHAs; checkout credentials are not persisted. The newer Node and pnpm action versions already on master are retained.
  • PyPI attestations are explicit. A protected pypi environment is intentionally not enabled: create and protect it in GitHub and update the PyPI trusted publisher to the same environment name before adding it to the publish job.
  • Existing incompatible .venv directories must be moved aside manually before the new setup runs.

Validation on the PR branch:

  • npm exec --yes --package=pnpm@12.21.0 -- sh script/check.sh — passed, including:
    • uv lock --check and uv sync --locked --all-extras — passed.
    • uv run --locked ruff check . and uv run --locked ruff format --check . — passed.
    • uv run --locked mypy axis script — passed.
    • uv run --locked pytest tests --doctest-modules — 1,639 passed; library coverage 100%.
    • pnpm --dir web install --frozen-lockfile, pnpm --dir web lint, and pnpm --dir web format:check — passed.
    • pnpm --dir web test — 20 passed; pnpm --dir web test:e2e — 76 passed.
    • uv run --locked python script/check_cli_install.py — passed, including wheel, py.typed, frontend assets, CLI, and Zsh completion.
  • Commit hooks — passed without modifying files. Advisory ty reported 11 existing diagnostics.
  • Focused setup and maintenance tests were added; coverage of the new script code was not separately measured. Enum and XML-specific checklist items are not applicable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Kane610
Kane610 merged commit bfb5afe into master Nov 30, 2026
7 checks passed
@Kane610
Kane610 deleted the tooling/safer-maintenance branch November 30, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant