Skip to content

GH-51: feat: Add pipeline metadata serialization#65

Merged
Urfoex merged 1 commit intodevelopfrom
feature/GH-51-serialize-pipeline-metadata
Sep 17, 2025
Merged

GH-51: feat: Add pipeline metadata serialization#65
Urfoex merged 1 commit intodevelopfrom
feature/GH-51-serialize-pipeline-metadata

Conversation

@Urfoex
Copy link
Collaborator

@Urfoex Urfoex commented Sep 2, 2025

Introduces Pydantic models for DataFrameMetaData and PipelineMetaData to represent the data frames used in a pipeline.

The PipelineInformation model is updated to include this new metadata field, which captures the names and roles of the population and peripheral data frames. This resolves the TODO for issue #51.

Serialization logic is added to convert getml.pipeline.metadata.AllMetadata into the new PipelineMetaData model. All related tests, fixtures, and expected outputs have been updated accordingly.

Bug-Fix: The new code now supports a value in data_model.peripheral being either a single Placeholder or a list[Placeholder].

Introduces Pydantic models for `DataFrameMetaData` and `PipelineMetaData` to represent the data frames used in a pipeline.

The `PipelineInformation` model is updated to include this new `metadata` field, which captures the names and roles of the population and peripheral data frames. This resolves the TODO for issue #51.

Serialization logic is added to convert `getml.pipeline.metadata.AllMetadata` into the new `PipelineMetaData` model. All related tests, fixtures, and expected outputs have been updated accordingly.

Bug-Fix: The new code now supports a value in `data_model.peripheral` being either a single `Placeholder` or a `list[Placeholder]`.
@Urfoex Urfoex requested a review from Copilot September 2, 2025 14:04
@Urfoex Urfoex self-assigned this Sep 2, 2025
@Urfoex Urfoex added the enhancement New feature or request label Sep 2, 2025
@Urfoex
Copy link
Collaborator Author

Urfoex commented Sep 2, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully introduces metadata serialization for pipelines by adding new Pydantic models and integrating them into the PipelineInformation model. The serialization logic for converting getml.pipeline.metadata.AllMetadata is well-implemented, and the accompanying bug fix for handling both single and list Placeholder instances is a valuable addition. The tests, fixtures, and expected outputs have been updated comprehensively, and the refactoring of test fixtures improves code clarity. I've included one comment regarding the stability of generated test data, which could lead to flaky tests.

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 introduces pipeline metadata serialization by adding Pydantic models for DataFrameMetaData and PipelineMetaData to capture data frame names and roles used in pipelines. This addresses issue #51 by replacing the TODO comment in PipelineInformation with actual metadata functionality.

  • Adds new Pydantic models DataFrameMetaData and PipelineMetaData for metadata representation
  • Implements serialization logic to convert getML metadata into the new models
  • Updates PipelineInformation to include the metadata field and fixes data model peripheral handling

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/getml_io/getml/metadatas.py Defines new Pydantic models for DataFrame and Pipeline metadata
src/getml_io/serialize/pipeline.py Adds metadata serialization functions and integrates them into pipeline serialization
src/getml_io/serialize/data_model.py Fixes data model peripheral handling to support both single Placeholder and list of Placeholders
src/getml_io/metadata/pipeline_information.py Updates PipelineInformation to include metadata field
tests/unit/types.py Adds type definitions for the new metadata structures
tests/unit/conftest.py Updates test fixtures to include metadata in pipeline information

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Urfoex Urfoex marked this pull request as ready for review September 2, 2025 14:15
@Urfoex Urfoex requested a review from srnnkls September 2, 2025 14:15
@Urfoex Urfoex linked an issue Sep 2, 2025 that may be closed by this pull request
Copy link
Collaborator

@srnnkls srnnkls left a comment

Choose a reason for hiding this comment

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

lgtm.

@Urfoex Urfoex merged commit 8f813e1 into develop Sep 17, 2025
3 checks passed
@Urfoex Urfoex deleted the feature/GH-51-serialize-pipeline-metadata branch September 17, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement pipeline metadata serializer

2 participants

Comments