Skip to content

32211 Add state parent class to subscription patch request#86

Merged
torgeirbm merged 6 commits into
mainfrom
feature/32211-add-subscription-state-fields
Jun 24, 2026
Merged

32211 Add state parent class to subscription patch request#86
torgeirbm merged 6 commits into
mainfrom
feature/32211-add-subscription-state-fields

Conversation

@torgeirbm

Copy link
Copy Markdown
Contributor

Added parent class with state parameters that the ims subscription management api allows for the patch endpoint. Intentionally left the datalastaccessed parameter out as this is intended to be used/maintained via function app.
Added some simple tests for the endpoint.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I Have run existing and new tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the architecture
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copilot AI review requested due to automatic review settings June 24, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for patching IMS subscription “state” fields by introducing a dedicated parent TypedDict model and expanding the subscription patch request model accordingly. Also extends the existing API test suite with coverage for the IMS Subscriptions Management PATCH endpoint.

Changes:

  • Introduced SubscriptionStatePatchModel and made SubscriptionPatchRequestItem inherit from it.
  • Corrected plantSapCode type in SubscriptionPatchRequestItem to Optional[str].
  • Added IMS Subscriptions Management API PATCH tests and minor assertion formatting cleanup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/test_api.py Adds fixture and tests for IMSSubscriptionsManagementAPI.patch_subscription_by_uid; refactors a few assertions for readability.
src/omnia_timeseries/models.py Adds state patch parent TypedDict and updates the subscription patch request model (including fixing plantSapCode type).

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

Comment thread tests/test_api.py Outdated
Comment thread tests/test_api.py Outdated
Comment thread tests/test_api.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@janny93 janny93 requested review from a team, JasonHansenEQU, franktore, hakg91, janny93, nedv98, saraeq and sharmanvarun and removed request for a team June 24, 2026 08:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread tests/test_api.py Outdated

@janny93 janny93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@torgeirbm torgeirbm merged commit 8cea742 into main Jun 24, 2026
6 checks passed
@torgeirbm torgeirbm deleted the feature/32211-add-subscription-state-fields branch June 24, 2026 09:54
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.

3 participants