Skip to content

[MCC-1476011] Python Lib-Create Get_dataset_versions() function - #18

Merged
slingampalli-mdsol merged 5 commits into
mainfrom
feat/MCC-1476011_dataset_versions
May 8, 2026
Merged

[MCC-1476011] Python Lib-Create Get_dataset_versions() function#18
slingampalli-mdsol merged 5 commits into
mainfrom
feat/MCC-1476011_dataset_versions

Conversation

@ibaig-mdsol

@ibaig-mdsol ibaig-mdsol commented May 7, 2026

Copy link
Copy Markdown
Contributor

feature

  • Python Lib-Create Get_dataset_versions() function
  • MCC-1476011

Checklist

  • Review the pull request to fix typos and ensure variable/function names are intuitive, etc.
  • Make sure the pull request does not have excessive number of unnecessary commits. Utilize the git commit --amend --no-edit command to reduce commit messages when making small file changes (like changing linespacing).
  • Make sure you have added unit tests for the code changes. Tests should be added in the tests/ folder.
  • Modify docs, if required. Add any new documentation in the doc/ folder.
  • Rebase on latest active development branch (develop/main).

Changes Summary

  • Added get_dataset_versions method
  • Unit Tests

Usage

with DataConnectClient.connect(
    host="enodia-gateway-sandbox.platform.imedidata.net",
    port=443,
    token="",
) as client:

    try:
        dataset_versions = client.get_dataset_versions(
            dataset_uuid=UUID("073410b6-79be-3e7d-ae37-92f6e054013e")
        )
        if dataset_versions:
            for dataset_version in dataset_versions:
                print(dataset_version)
    except Exception as e:
        print(f"An error occurred: {e}")

Comment thread dataconnect/models.py Outdated
Comment thread dataconnect/service/default.py
@ibaig-mdsol
ibaig-mdsol marked this pull request as ready for review May 8, 2026 15:15
Copilot AI review requested due to automatic review settings May 8, 2026 15:15

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

Adds support for listing dataset versions to the Python SDK by introducing a new DatasetVersion domain model and wiring a new get_dataset_versions() operation through the client/service/transport layers, plus unit tests.

Changes:

  • Added DatasetVersion model and exported it from the public package surface.
  • Implemented get_dataset_versions() in DataConnectClient, DataConnectService, and DefaultDataConnectService, including Arrow Flight action mapping and resource mapping.
  • Added unit tests covering request construction, mapping, and error translation for dataset versions.

Reviewed changes

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

Show a summary per file
File Description
tests/test_service.py Adds service-level tests for get_dataset_versions() mapping, request body, and error handling.
tests/test_client.py Adds client-level tests ensuring forwarding, context-manager close behavior, and connect wiring.
README.md Fixes a typo/duplication and tweaks transport note formatting.
dataconnect/transport/arrow_flight/transport.py Adds Arrow Flight action mapping for dataset_versions.list.
dataconnect/service/mappers.py Adds resource_to_dataset_version() mapping function.
dataconnect/service/default.py Implements DefaultDataConnectService.get_dataset_versions() with validation and error translation.
dataconnect/service/base.py Extends the service interface to include get_dataset_versions().
dataconnect/models.py Introduces DatasetVersion dataclass.
dataconnect/client.py Exposes get_dataset_versions() on the public client API.
dataconnect/init.py Re-exports DatasetVersion as part of the public API.
.pre-commit-config.yaml Changes the default Python interpreter used by pre-commit hooks.
.gitignore Ignores Jupyter notebooks and checkpoint directories.

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

Comment thread dataconnect/service/mappers.py
Comment thread .pre-commit-config.yaml
@slingampalli-mdsol
slingampalli-mdsol merged commit a247afa into main May 8, 2026
3 checks passed
@slingampalli-mdsol
slingampalli-mdsol deleted the feat/MCC-1476011_dataset_versions branch May 8, 2026 17:27
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.

4 participants