Skip to content

[MCC-1496700] Python get_datasets() pagination support#29

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

[MCC-1496700] Python get_datasets() pagination support#29
dsilaghi-mdsol merged 1 commit into
mainfrom
features/MCC-1496700

Conversation

@butsyk-mdsol

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

Copy link
Copy Markdown
Contributor

feature/bug/enhance/refactor/tech_debt/hotfix

  • Python get_datasets() pagination support.
  • 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

AC-06: Pagination Input Parameters
The function accepts optional page (default: 1) and page_size (default: TBD) parameters to control result pagination.

AC-07: Result Set Metadata
The response object includes full pagination context
response = {
"total_records": int, # Total count of available datasets
"pagination":

{ "page": int, # Current page (user-provided or default) "page_size": int, # Page size (user-provided or default) "total_pages": int# Calculated: ceil(total_records / page_size) },
"items": [] # List of Dataset objects
}

Deployment Notes

In addition to IAC/code, add any notes for reviewer should know.

Copilot AI review requested due to automatic review settings May 12, 2026 13:40

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 pagination support to the Python SDK’s get_datasets() call by returning a structured paginated response (items + pagination metadata) instead of a plain list, and updates the public API exports and README example accordingly.

Changes:

  • Change get_datasets() return type to PaginatedResponse[Dataset] across the service interface, default implementation, and client façade.
  • Build and return pagination metadata (total_records, page, page_size, total_pages) from the transport results in the default service.
  • Update README quick-start usage and export PaginatedResponse/Pagination from the package root.

Reviewed changes

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

Show a summary per file
File Description
README.md Updates quick-start example to use the paginated response (.items).
dataconnect/service/default.py Implements PaginatedResponse construction and pagination metadata for get_datasets().
dataconnect/service/base.py Updates service interface return type for get_datasets() to PaginatedResponse[Dataset].
dataconnect/client.py Updates public client get_datasets() signature/return type to PaginatedResponse[Dataset].
dataconnect/init.py Exposes PaginatedResponse and Pagination in the public package API.

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

Comment thread dataconnect/service/default.py
Comment thread dataconnect/client.py
Comment thread README.md
Comment thread dataconnect/service/default.py
@butsyk-mdsol
butsyk-mdsol force-pushed the features/MCC-1496700 branch from 398822f to 61db02c Compare May 12, 2026 13:53
dsilaghi-mdsol
dsilaghi-mdsol previously approved these changes May 12, 2026
@dsilaghi-mdsol
dsilaghi-mdsol merged commit 74212d3 into main May 12, 2026
3 checks passed
@butsyk-mdsol
butsyk-mdsol deleted the features/MCC-1496700 branch May 12, 2026 14:01
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.

3 participants