Skip to content

Rr 114 expose metadata#119

Open
ryanraaschCDC wants to merge 33 commits into
mainfrom
rr-114-expose-metadata
Open

Rr 114 expose metadata#119
ryanraaschCDC wants to merge 33 commits into
mainfrom
rr-114-expose-metadata

Conversation

@ryanraaschCDC

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for exposing dataset/version metadata when fetching dataframes from the catalog, and introduces a new dependency to store metadata on Polars objects.

Changes:

  • Add with_metadata and print_version parameters to BlobEndpoint.get_dataframe() to optionally attach metadata and control version logging.
  • Add polars-config-meta as a project dependency and lock it in uv.lock.
  • Introduce a new resolve_version() helper intended to return resolved version/blob URL metadata.

Reviewed changes

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

File Description
uv.lock Locks the new polars-config-meta dependency.
pyproject.toml Adds polars-config-meta to runtime dependencies.
cfa/dataops/catalog.py Adds metadata/printing options to get_dataframe and introduces resolve_version.

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

Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py
ryanraaschCDC and others added 2 commits July 15, 2026 14:38
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated 4 comments.

Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py
Comment thread tests/test_datasets_catalog.py Outdated
ryanraaschCDC and others added 3 commits July 16, 2026 19:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 7 changed files in this pull request and generated 4 comments.

Comment thread tests/test_datasets_catalog.py Outdated
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 7 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

cfa/dataops/catalog.py:486

  • get_dataframe() calls _get_version_blobs() to resolve and validate the version (and derive file_ext), but the non-lazy path then calls read_blobs(), which calls _get_version_blobs() again. This contradicts the "Fetch version blobs once" comment and can double Azure listings and introduce racey inconsistency if blobs change between calls.
        # Fetch version blobs once and validate before deriving file extension.
        version_blobs = self._get_version_blobs(
            version_spec=version_spec, selection=selection, print_version=print_version
        )
        if not version_blobs:
            raise ValueError(
                f"No blobs found for version '{version_spec}' in container '{self.container}'."
            )

Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
@ryanraaschCDC
ryanraaschCDC marked this pull request as ready for review July 20, 2026 18:01
@ryanraaschCDC
ryanraaschCDC requested a review from damonbayer July 20, 2026 18:02
Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py

@damonbayer damonbayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, but a few changes requested. Thanks @ryanraaschCDC!

Comment thread cfa/dataops/catalog.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 8 out of 9 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

cfa/dataops/catalog.py:509

  • get_dataframe() calls _get_version_blobs() and then immediately calls resolve_version(), which internally calls _get_version_blobs() again. That duplicates the (potentially expensive) blob-walk/version resolution and contradicts the nearby comment about fetching blobs once; it also makes file_ext depend on parsing blob_url rather than the actual blob name.
        version_blobs, _ = self._get_version_blobs(
            version_spec=version_spec, selection=selection, print_version=print_version
        )
        version_meta = self.resolve_version(
            version_spec=version_spec, selection=selection

cfa/dataops/catalog.py:487

  • The selection docstring still mentions "all", but this method’s signature restricts selection to Literal["newest", "oldest"]. This is misleading for users and for generated docs.
            selection (Literal["newest", "oldest", "all"], optional): whether to get the newest, oldest, or all matching versions. Defaults to "newest".

Comment thread cfa/dataops/catalog.py
Comment thread cfa/dataops/catalog.py Outdated
ryanraaschCDC and others added 2 commits July 20, 2026 14:53
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Expose resolved data version from DataOps load APIs

5 participants