Skip to content

MPT-20504 consolidate resource mixins#317

Open
jentyk wants to merge 1 commit intomainfrom
feat/MPT-20504
Open

MPT-20504 consolidate resource mixins#317
jentyk wants to merge 1 commit intomainfrom
feat/MPT-20504

Conversation

@jentyk
Copy link
Copy Markdown
Member

@jentyk jentyk commented Apr 22, 2026

Closes MPT-20504

Release Notes

  • Consolidated resource mixins: Moved ActivatableMixin, PublishableMixin, DocumentMixin, and MediaMixin (and their async variants) from domain-specific locations (catalog, program, integration, accounts) to a centralized mpt_api_client.resources.mixins module

  • Introduced ReviewableMixin: Added new ReviewableMixin and AsyncReviewableMixin classes providing a review() method for resources

  • Added review capabilities: Extended the following service classes with ReviewableMixin/AsyncReviewableMixin:

    • ItemsService and AsyncItemsService (catalog)
    • TermVariantService and AsyncTermVariantService (catalog)
    • TermService and AsyncTermService (catalog)
    • ProductsService and AsyncProductsService (catalog)
    • DocumentService and AsyncDocumentService (catalog products documents)
    • MediaService and AsyncMediaService (catalog products media)
  • Updated imports: Updated all modules across catalog, program, integration, and accounts resources to import mixins from the new centralized location

  • Removed duplicate definitions: Eliminated duplicate mixin definitions from catalog, program, and integration specific mixin modules

  • Simplified docstrings: Shortened docstrings for publish() and unpublish() methods

  • Updated unit tests: Refactored and consolidated test files to use centralized mixin imports and added comprehensive tests for the new ReviewableMixin functionality

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: d1f0babf-7048-47f6-b847-9c324d6c423e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@jentyk jentyk marked this pull request as ready for review April 22, 2026 14:35
@jentyk jentyk requested a review from a team as a code owner April 22, 2026 14:35
@jentyk jentyk requested review from albertsola and alephsur April 22, 2026 14:35
@jentyk
Copy link
Copy Markdown
Member Author

jentyk commented Apr 22, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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