-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
Issue: Feature RequestNew feature or improvement to existing featureNew feature or improvement to existing feature
Description
Description
Expose the public-facing Python API: get_project_snapshot() in kedro/inspection/__init__.py with __all__ exports and optional pipeline_id filtering. Validate the full end-to-end flow with integration tests against the starter project.
Context
This ticket delivers the API surface that plugin authors and platform teams call directly.
Scope
kedro/inspection/__init__.py:
def get_project_snapshot(
project_path: str | Path,
env: str | None = None,
pipeline_id: str | None = None,
) -> ProjectSnapshot:
"""Primary entry point. Returns a full ProjectSnapshot of the project.
If pipeline_id is set, returns a snapshot scoped to that pipeline only.
"""
def _filter_pipeline(snapshot: ProjectSnapshot, pipeline_id: str) -> ProjectSnapshot:
"""Return a new snapshot containing only the requested pipeline and its datasets."""
__all__ = [
"get_project_snapshot",
"ProjectSnapshot",
"PipelineSnapshot",
"NodeSnapshot",
"DatasetSnapshot",
"ProjectMetadataSnapshot",
]tests/inspection/test_integration.py (against spaceflights-pandas starter):
get_project_snapshot()returns aProjectSnapshotsnapshot.metadata.project_nameandpackage_nameare correct- At least one pipeline is present with nodes
snapshot.datasetscontains expected catalog entries with correcttypeandfilepathsnapshot.parameter_keyscontains expected keys without valuespipeline_idfiltering returns only the requested pipeline- Datasets in the filtered snapshot only include those referenced by the requested pipeline's nodes
json.dumps(dataclasses.asdict(snapshot))produces valid JSON
Deliverable
kedro/inspection/__init__.py(final public API)tests/inspection/test_integration.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue: Feature RequestNew feature or improvement to existing featureNew feature or improvement to existing feature
Type
Projects
Status
In Progress