[MCC-1498582] - Create layered design#16
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the SDK into clearer layers by introducing a technology-agnostic transport interface (with an Arrow Flight implementation), a service layer that performs domain mapping and error translation, and a thinner DataConnectClient façade as the composition root.
Changes:
- Added a transport layer contract (DTOs + abstract
Transport) and an Arrow Flight transport implementation with exception translation. - Added a service layer (
DataConnectService+ default implementation) to map transport resources into domain models and translate transport errors into public exceptions. - Updated the public client/models/exceptions surface to align with the new layered architecture.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dataconnect/transport/models.py | Adds transport-layer DTOs (ResourceQuery, ResourceInfo, DataRef). |
| dataconnect/transport/errors.py | Introduces internal transport-only exception hierarchy. |
| dataconnect/transport/base.py | Defines the technology-agnostic Transport interface. |
| dataconnect/transport/arrow_flight/transport.py | Implements Transport using pyarrow.flight and translates Flight errors to transport errors. |
| dataconnect/transport/arrow_flight/init.py | Exposes ArrowFlightTransport. |
| dataconnect/transport/init.py | Public exports for the transport layer (excluding internal transport errors). |
| dataconnect/service/mappers.py | Adds mapper(s) from transport ResourceInfo to domain models. |
| dataconnect/service/default.py | Adds default service implementation with error translation + study retrieval. |
| dataconnect/service/base.py | Defines the service interface (DataConnectService). |
| dataconnect/service/init.py | Re-exports service symbols for convenience. |
| dataconnect/models.py | Updates domain models to UUID-based Study/StudyEnvironment. |
| dataconnect/exceptions.py | Expands and documents public exception hierarchy; adds ServerError.status_code. |
| dataconnect/client.py | Refactors client into a thin façade over the service; adds connect() composition root. |
| dataconnect/init.py | Updates package-level exports to match new public API surface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ibaig-mdsol
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[MCC-1498582] - Create layered design
Changes