Skip to content

Feature/axis cli config#814

Open
Kane610 wants to merge 8 commits into
masterfrom
feature/axis-cli-config
Open

Feature/axis cli config#814
Kane610 wants to merge 8 commits into
masterfrom
feature/axis-cli-config

Conversation

@Kane610
Copy link
Copy Markdown
Owner

@Kane610 Kane610 commented May 27, 2026

What does this PR do?

[One-sentence summary, e.g., "Adds new PTZ handler with PARAM_CGI_FALLBACK support"]

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

Closes #[issue number] (if applicable)

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

[Context for reviewers: what to focus on, known limitations, decisions made, or why this approach was chosen]

Kane610 added 8 commits May 27, 2026 22:25
…g validation and TOML export

- Implements minimal CLI with host, username, password args
- Full docstrings and comments
- Passes all pre-commit hooks (ruff, format, mypy)
… host, and missing args

- Ensures CLI validates config and outputs TOML
- Covers error handling and argument parsing
- Passes all pre-commit hooks (ruff, format, mypy)
…ccount management

Phase 3: Event workflows
- fetch_event_instances: retrieves EventInstance catalog via device.vapix.event_instances
- list_event_instances_flow: prints topic/name/stateful/stateless/available table
- events_flow: submenu with list, listen-all, listen-by-topic options
- _live_listen_flow: async listener using device.event.subscribe + asyncio.Event for clean stop

Phase 4: Account management
- _validate_username: enforces 1-14 alphanumeric character constraint
- _select_privilege: interactive SecondaryGroup picker with back option
- _account_init_confirm: confirmation prompts outside async context (avoids ASYNC250)
- _account_init_operation: async create/update dispatched via run_on_selected_device
- account_management_flow: submenu with list/create-or-update/delete/back
- _list_users_flow: fetches and displays current users
- _create_or_update_user_flow: full guided create/update with validation + privilege selection
- _delete_user_flow: explicit confirmation before permanent delete

Updated selected_device_operations: adds options 3 (events) and 4 (account management)

Tests: rewrote test_cli.py and test_cli_direct.py to match interactive CLI API;
added comprehensive coverage for all new flows and helpers;
overall coverage at 95.5% (threshold 95%)
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