Skip to content

Rr 114 expose metadata#119

Merged
ryanraaschCDC merged 40 commits into
mainfrom
rr-114-expose-metadata
Jul 22, 2026
Merged

Rr 114 expose metadata#119
ryanraaschCDC merged 40 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>
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>

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:510

  • get_dataframe() calls _get_version_blobs() and then calls resolve_version(), which calls _get_version_blobs() again. This is both redundant and can be inconsistent if available versions change between calls; it also breaks ledger endpoints because resolve_version() may yield blob_url=None. Derive file_ext/fullpath directly from the already-fetched version_blobs instead of re-resolving.
        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:489

  • The get_dataframe() signature restricts selection to Literal["newest", "oldest"], but the docstring still mentions "all". This makes the public API docs inconsistent with the actual callable surface.
            version_spec (str, optional): the version of the data to get.
                Defaults to "latest".
            selection (Literal["newest", "oldest", "all"], optional): whether to get the newest, oldest, or all matching versions. Defaults to "newest".
            print_version (bool, optional): whether to print the version being used. Defaults to False.

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>
@ryanraaschCDC
ryanraaschCDC requested a review from damonbayer July 21, 2026 16:47
@ryanraaschCDC ryanraaschCDC linked an issue Jul 21, 2026 that may be closed by this pull request
Comment thread cfa/dataops/catalog.py Outdated

@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.

I'm pretty confused about _get_version_blobs. Left a comment.

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
Comment thread cfa/dataops/catalog.py Outdated
Comment thread cfa/dataops/catalog.py
overwrite=False,
)

def resolve_version(

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.

This still needs to be added to the stubs.

@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.

Thanks so much @ryanraaschCDC!

@ryanraaschCDC
ryanraaschCDC merged commit c16a920 into main Jul 22, 2026
4 checks passed
@ryanraaschCDC
ryanraaschCDC deleted the rr-114-expose-metadata branch July 22, 2026 21:35
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.

Resolve version exactly once Expose resolved data version from DataOps load APIs

5 participants