Skip to content

Apply feedback to v2 branch#1971

Merged
iMicknl merged 10 commits intov2/mainfrom
v2/initial_feedback
Apr 5, 2026
Merged

Apply feedback to v2 branch#1971
iMicknl merged 10 commits intov2/mainfrom
v2/initial_feedback

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented Apr 5, 2026

Apply feedback form @tetienne in #1872.

Feedback on models.py skipped for now, as this will require a larger refactor (like https://github.com/iMicknl/python-overkiz-api/pulls).

Copilot AI review requested due to automatic review settings April 5, 2026 20:53
@iMicknl iMicknl requested a review from tetienne as a code owner April 5, 2026 20:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies review feedback to the v2 branch by tightening model validation, improving auth error mapping for Nexity, enforcing enum fallback conventions, and aligning internal client request helpers/tests with updated method names.

Changes:

  • Add validation to StateDefinition to require name or qualified_name, plus a unit test for this behavior.
  • Rename internal HTTP helpers on OverkizClient (__get/__post/__delete_get/_post/_delete) and update tests accordingly.
  • Improve Nexity auth error handling by mapping specific Cognito ClientError codes to NexityBadCredentialsException while propagating other errors; add test coverage.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_models.py Adds coverage for StateDefinition rejecting invalid payloads.
tests/test_client.py Updates backoff-related tests to patch renamed internal client methods.
tests/test_client_queue_integration.py Updates queue integration tests to patch _post instead of name-mangled __post.
tests/test_auth.py Adds tests validating Nexity Cognito error mapping/propagation and updates imports for patching.
pyoverkiz/models.py Enforces required identifier field for StateDefinition.
pyoverkiz/enums/base.py Adds subclass-time enforcement that UnknownEnumMixin users define UNKNOWN.
pyoverkiz/client.py Switches to _get/_post/_delete, improves cert path handling via Path, and updates docstring style in execute_action_group.
pyoverkiz/auth/strategies.py Uses get_running_loop() and refines Nexity Cognito error mapping to avoid masking non-credential failures.
pyoverkiz/action_queue.py Aligns docstring with Google-style sections used by the docs tooling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iMicknl iMicknl merged commit 8eb08cf into v2/main Apr 5, 2026
11 checks passed
@iMicknl iMicknl deleted the v2/initial_feedback branch April 5, 2026 21:07
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.

2 participants