Skip to content

[MCC-1496700] Python Lib-Create Get_datasets() function#9

Merged
butsyk-mdsol merged 1 commit into
mainfrom
features/MCC-1496700
May 12, 2026
Merged

[MCC-1496700] Python Lib-Create Get_datasets() function#9
butsyk-mdsol merged 1 commit into
mainfrom
features/MCC-1496700

Conversation

@butsyk-mdsol

@butsyk-mdsol butsyk-mdsol commented May 1, 2026

Copy link
Copy Markdown
Contributor

feature

  • Python Lib-Create Get_datasets() function.
  • MCC-1496700

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

Expectation: retrieve a list of datasets filtered by either a broad Study or a specific Study Environment.

Requirements:

Function: get_datasets().

Key Requirements: * Accept study_uuid as a mandatory identifier.

Support fuzzy searching via search_dataset_name. Returns list of Dataset objects in the given study environment and the dataset name (if provided).

Technical Note: Output must return Dataset objects containing unique UUIDs required for downstream functions.

Pagination Transparency: Unlike a "silent" requester, this function provides full visibility into result set boundaries—users always know if they're seeing 10% or 100% of available data through embedded metadata.

Context Resolution: Since dataset_uuid values are unique only within the scope of a study environment, the underlying Arrow Flight Server dynamically resolves full context (study_uuid, study_environment_uuid) via OneApi integration to properly authorize and route requests.

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 a new paginated dataset-listing flow to the Python DataConnect client by switching from an action-based request to Arrow Flight list_flights, and introduces shared pagination/response models to surface server pagination metadata to callers.

Changes:

  • Implement DataConnectClient.datasets() as a paginated Flight listing that returns PaginatedResponse[Dataset] with Pagination metadata.
  • Add FlightResult + FlightTransport.list_flights() abstraction and implement it in PyArrowFlightTransport.
  • Add/expand unit tests covering datasets pagination/criteria and TLS vs TCP connection schemes.

Reviewed changes

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

Show a summary per file
File Description
tests/test_client.py Adds unit/integration-style tests for datasets() pagination behavior and connect() TLS/TCP scheme handling.
dataconnect/models.py Introduces Pagination / PaginatedResponse and updates dataset/environment models toward UUID-based fields.
dataconnect/framework/transport.py Adds FlightResult and FlightTransport.list_flights() contract for listing operations.
dataconnect/framework/pyarrow_transport.py Implements list_flights() to extract ticket data + app metadata from FlightInfo.
dataconnect/client.py Refactors datasets() to use list_flights() and return paginated responses; updates connection scheme selection.
dataconnect/init.py Exposes Pagination and PaginatedResponse from the package public API.
README.md Updates installation notes and Python version requirement text.

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

Comment thread dataconnect/client.py Outdated
Comment thread dataconnect/client.py Outdated
Comment thread dataconnect/models.py
Comment thread dataconnect/models.py
Comment thread dataconnect/models.py Outdated
Comment thread README.md Outdated
Comment thread tests/test_client.py Outdated
@slingampalli-mdsol
slingampalli-mdsol marked this pull request as draft May 1, 2026 11:26
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch from 37f54fd to 2ced0a4 Compare May 11, 2026 13:59
@butsyk-mdsol
butsyk-mdsol marked this pull request as ready for review May 11, 2026 13:59
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch from 2ced0a4 to db0b826 Compare May 11, 2026 14:02
@butsyk-mdsol
butsyk-mdsol requested a review from Copilot May 11, 2026 14:03
@butsyk-mdsol butsyk-mdsol changed the title [MCC-1496700] Python Lib-Create Get_datasets() function feat: Python Lib-Create Get_datasets() function May 11, 2026

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

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

Comment thread README.md Outdated
Comment thread README.md
Comment thread dataconnect/models.py
Comment thread dataconnect/service/mappers.py
Comment thread dataconnect/service/default.py
Comment thread dataconnect/framework/pyarrow_transport.py Outdated
Comment thread dataconnect/framework/pyarrow_transport.py Outdated
Comment thread dataconnect/framework/pyarrow_transport.py Outdated
Comment thread dataconnect/framework/transport.py Outdated
Comment thread dataconnect/service/default.py
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch 3 times, most recently from 863363a to ffd75e7 Compare May 11, 2026 14:22
@butsyk-mdsol
butsyk-mdsol requested a review from Copilot May 11, 2026 14:26
Comment thread dataconnect/service/base.py Outdated

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Comment thread README.md Outdated
Comment thread dataconnect/models.py
Comment thread dataconnect/service/default.py
Comment thread dataconnect/service/default.py
Comment thread dataconnect/service/mappers.py
Comment thread dataconnect/models.py
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch 2 times, most recently from e0bb977 to 4868e7e Compare May 11, 2026 14:35
@butsyk-mdsol
butsyk-mdsol requested a review from ibaig-mdsol May 11, 2026 14:35
@butsyk-mdsol butsyk-mdsol changed the title feat: Python Lib-Create Get_datasets() function [MCC-1496700] Python Lib-Create Get_datasets() function May 11, 2026
Comment thread dataconnect/client.py Outdated
Comment thread dataconnect/service/default.py
Comment thread dataconnect/service/base.py Outdated
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch from 4868e7e to 4691371 Compare May 12, 2026 07:52
@butsyk-mdsol
butsyk-mdsol requested a review from ibaig-mdsol May 12, 2026 07:53
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch from 4691371 to 07f2c9e Compare May 12, 2026 07:57
@butsyk-mdsol
butsyk-mdsol merged commit e374b83 into main May 12, 2026
3 checks passed
@butsyk-mdsol
butsyk-mdsol deleted the features/MCC-1496700 branch May 12, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants