Skip to content

Conversation

@antirotor
Copy link
Member

Changelog Description

Adding support for product base types.

Additional review information

Once the product base types are established, they should be marked mandatory in function arguments and product_type optional.

Testing notes:

This shouldn't affect "normal" functionality. If product base type is provided, it should be successfully queried or written to/from server.

Note

Closes: #254
Requires: ynput/ayon-backend#615

@antirotor antirotor requested review from Copilot and iLLiCiTiT May 30, 2025 12:49
@antirotor antirotor self-assigned this May 30, 2025
@antirotor antirotor added the type: enhancement New feature or request label May 30, 2025
@antirotor antirotor linked an issue May 30, 2025 that may be closed by this pull request
1 task
Copy link

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 adds support for product base types across the API, including new type definitions, query filters, and API operations.

  • Introduces ProductBaseTypeDict and default fields for product base types.
  • Updates API functions to support filtering, querying, and creating/updating products with the new product base type.
  • Extends GraphQL queries and entity hub operations to incorporate product base types.

Reviewed Changes

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

Show a summary per file
File Description
ayon_api/typing.py Added a new TypedDict for product base types.
ayon_api/server_api.py Extended product-related functions to support product base types.
ayon_api/operations.py Updated product entity creation and update operations to include base type; noted a naming typo.
ayon_api/graphql_queries.py Added GraphQL queries for product base types.
ayon_api/entity_hub.py Modified product entity handling to incorporate product base type with a documentation update.
ayon_api/constants.py Added default fields for product base types.
ayon_api/_api.py Updated API functions to include product base type filters.
ayon_api/init.py Re-exported new functions related to product base types.
Comments suppressed due to low confidence (2)

ayon_api/operations.py:117

  • Correct the misspelled parameter name from 'produc_base_type' to 'product_base_type' to ensure consistency with the documentation and usage.
produc_base_type: str,

ayon_api/entity_hub.py:447

  • Update the docstring to reflect that the function creates a product entity rather than a task object for clarity.
'''Create a task object and add it to the entity hub.

@github-project-automation github-project-automation bot moved this to Pending Review in PR reviewing May 30, 2025
@antirotor antirotor marked this pull request as ready for review June 10, 2025 11:20
return parsed_data.get("project", {}).get("productBaseTypes", [])


def get_product_base_type_names(
Copy link
Member

@iLLiCiTiT iLLiCiTiT Jun 13, 2025

Choose a reason for hiding this comment

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

This function probably does not have to be implemented in server api.

It does 2 different things, either returns what get_project_product_base_types does or what get_products does. Looks like a helper functions somewhere in pipeline, but even there I can't imagine the usecase. I would not include it here.

name: str
color: Optional[str]
icon: Optional[str]

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

if value is not None:
update_data[key] = value

update_data = {
Copy link
Member

@iLLiCiTiT iLLiCiTiT Jun 13, 2025

Choose a reason for hiding this comment

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

We should check if product type is supported and raise an error if is passed and is not supported?

Copy link
Member

Choose a reason for hiding this comment

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

Still same question.

@antirotor antirotor requested a review from iLLiCiTiT November 10, 2025 14:05
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
@antirotor antirotor requested a review from iLLiCiTiT November 13, 2025 13:35
@github-project-automation github-project-automation bot moved this from Pending Review to Merge Requested in PR reviewing Nov 18, 2025
@iLLiCiTiT iLLiCiTiT merged commit 6ed1b9b into develop Nov 18, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Merge Requested to Done in PR reviewing Nov 18, 2025
@iLLiCiTiT iLLiCiTiT deleted the enhancement/254-product-base-types-add-support branch November 18, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🏛️Product base types: Add support

3 participants