Skip to content

♻️ rework product base classes - #456

Merged
ianardee merged 1 commit into
mainfrom
rework-product
Aug 20, 2026
Merged

♻️ rework product base classes#456
ianardee merged 1 commit into
mainfrom
rework-product

Conversation

@ianardee

Copy link
Copy Markdown
Contributor

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • 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 change)
  • Requires a change to the official Guide documentation.

@ianardee
ianardee requested a lite review from Copilot August 20, 2026 15:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Refactors the Mindee V2 “product” base classes by renaming/reshaping the shared response and parameters abstractions, and propagating those new names through products, commands, and the HTTP/client layers.

Changes:

  • Replace BaseResponse with BaseInferenceResponse across V2 inference responses and parsing exports.
  • Replace BaseParameters with BaseProductParameters and rename get_form_data() to get_request_parameters() across products/commands/HTTP.
  • Update V2 client + HTTP request plumbing and related unit tests to use the new base types.

Reviewed changes

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

Show a summary per file
File Description
tests/v2/test_base_classes.py Updates base-class test to use BaseInferenceResponse.
pyproject.toml Removes an extra blank line.
mindee/v2/product/split/split_response.py Switches split response base class to BaseInferenceResponse.
mindee/v2/product/split/params/split_parameters.py Switches split params base class to BaseProductParameters.
mindee/v2/product/ocr/params/ocr_parameters.py Switches OCR params base class to BaseProductParameters.
mindee/v2/product/ocr/ocr_response.py Switches OCR response base class to BaseInferenceResponse.
mindee/v2/product/extraction/params/extraction_parameters.py Renames parameter serialization method and updates base class.
mindee/v2/product/extraction/extraction_response.py Switches extraction response base class to BaseInferenceResponse.
mindee/v2/product/crop/params/crop_parameters.py Switches crop params base class to BaseProductParameters.
mindee/v2/product/crop/crop_response.py Switches crop response base class to BaseInferenceResponse.
mindee/v2/product/classification/params/classification_parameters.py Switches classification params base class to BaseProductParameters.
mindee/v2/product/classification/classification_response.py Switches classification response base class to BaseInferenceResponse.
mindee/v2/parsing/inference/base_inference_response.py Renames the V2 inference response base class to BaseInferenceResponse.
mindee/v2/parsing/init.py Updates public parsing exports to reference BaseInferenceResponse.
mindee/v2/mindee_http/mindee_api_v2.py Updates HTTP layer to accept BaseProductParameters and BaseInferenceResponse.
mindee/v2/commands/split_command.py Updates command parameter base type to BaseProductParameters.
mindee/v2/commands/ocr_command.py Updates command parameter base type to BaseProductParameters.
mindee/v2/commands/extraction_command.py Updates command parameter base type to BaseProductParameters.
mindee/v2/commands/crop_command.py Updates command parameter base type to BaseProductParameters.
mindee/v2/commands/classification_command.py Updates command parameter base type to BaseProductParameters.
mindee/v2/commands/base_inference_command.py Updates abstract command contract to return BaseProductParameters.
mindee/v2/client.py Updates client method signatures/typevars to use the new base types.
mindee/v2/client_options/base_product_parameters.py Renames the base parameters class and request-parameter method.
Suppressed comments (2)

mindee/v2/parsing/inference/base_inference_response.py:12

  • The inference attribute docstring is now misleading: this base class is used by multiple products, not just the split utility. Please update it to a product-agnostic description (and add a period).
    mindee/v2/client_options/base_product_parameters.py:50
  • BaseParameters.get_form_data() appears to have been renamed to BaseProductParameters.get_request_parameters(). If users may rely on the old class/method names, consider providing backward-compatible aliases (get_form_data() delegating to get_request_parameters(), and BaseParameters as an alias of BaseProductParameters) to avoid an unintended breaking change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread mindee/v2/parsing/__init__.py
@ianardee
ianardee merged commit 1a05ec1 into main Aug 20, 2026
43 checks passed
@ianardee
ianardee deleted the rework-product branch August 20, 2026 16:01
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