From 35b04d51a1bdd9638e1d42fe8e6d4f11f05b1c91 Mon Sep 17 00:00:00 2001 From: Ryan Raasch Date: Fri, 24 Apr 2026 15:43:39 +0000 Subject: [PATCH 1/6] fix read blob to print none --- cfa/dataops/catalog.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cfa/dataops/catalog.py b/cfa/dataops/catalog.py index 3258cff..accd32e 100644 --- a/cfa/dataops/catalog.py +++ b/cfa/dataops/catalog.py @@ -220,7 +220,9 @@ def write_blob( self.ledger_entry(action="write") # print(f"file written to: {full_path}") - def read_blobs(self, version: str = "latest", newest: bool = True) -> list[bytes]: + def read_blobs( + self, version: str = "latest", newest: bool = True, print_version: bool = True + ) -> list[bytes]: """Read a blob in as bytes so it can be loaded into a dataframe Args: @@ -229,8 +231,11 @@ def read_blobs(self, version: str = "latest", newest: bool = True) -> list[bytes version (str, optional): the version of the data to read. Defaults to "latest". newest (bool, optional): whether to get the newest matching version. Defaults to True. + print_version (bool, optional): whether to print the version being used. Defaults to True. """ - blobs = self._get_version_blobs(version, newest=newest) + blobs = self._get_version_blobs( + version, newest=newest, print_version=print_version + ) blob_bytes = [ read_blob_stream( blob_url=i["name"], @@ -473,7 +478,7 @@ def get_dataframe( return df else: raise ValueError(f"Lazy loading not supported for {file_ext} files.") - blobs = self.read_blobs(version, newest=newest) + blobs = self.read_blobs(version, newest=newest, print_version=False) blob_bytes = [blob.content_as_bytes() for blob in blobs] blob_files = [BytesIO(pq) for pq in blob_bytes] if file_ext == "csv": From b10928e1c92ad42dc952c003d905e8dd55f09002 Mon Sep 17 00:00:00 2001 From: Ryan Raasch Date: Mon, 27 Apr 2026 17:30:17 +0000 Subject: [PATCH 2/6] update changelog, pyproject --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index 795e88a..01c3980 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,12 @@ and this project adheres to [Calendar Versioning](https://calver.org/). The versioning pattern is `YYYY.MM.DD.micro(a/b/{none if release}) --- +## [2026.04.27.0] + +### Fixed + +- in some get_dataframe() calls, the version would be printed twice. This has been fixed. + ## [2026.04.10.0] ### Updated From 7decfa5c60830a2fd602a4a78729b34a5648cddb Mon Sep 17 00:00:00 2001 From: Ryan Raasch Date: Mon, 27 Apr 2026 17:31:56 +0000 Subject: [PATCH 3/6] update pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9c05c08..22f4fac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cfa.dataops" -version = "2026.04.10.0" +version = "2026.04.27.0" description = "Data cataloging, ETL, modeling, verification, and validation for CFA" authors = [ { name = "Phil Rogers", email = "ap66@cdc.gov" }, From 874ef2dcd8e1935ee3cb4c4d64b0d9941c07183f Mon Sep 17 00:00:00 2001 From: Ryan Raasch <150935395+ryanraaschCDC@users.noreply.github.com> Date: Mon, 27 Apr 2026 10:36:02 -0700 Subject: [PATCH 4/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 66a4734..2445091 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,7 @@ The versioning pattern is `YYYY.MM.DD.micro(a/b/{none if release}) ### Fixed -- in some get_dataframe() calls, the version would be printed twice. This has been fixed. +- In some get_dataframe() calls, the version would be printed twice. This has been fixed. ## [2026.04.24.0] From 96dca26dd2b98456d81f7f3bbce4256171e9469d Mon Sep 17 00:00:00 2001 From: Ryan Raasch <150935395+ryanraaschCDC@users.noreply.github.com> Date: Mon, 27 Apr 2026 10:47:26 -0700 Subject: [PATCH 5/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- cfa/dataops/catalog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cfa/dataops/catalog.py b/cfa/dataops/catalog.py index accd32e..d02debd 100644 --- a/cfa/dataops/catalog.py +++ b/cfa/dataops/catalog.py @@ -479,7 +479,10 @@ def get_dataframe( else: raise ValueError(f"Lazy loading not supported for {file_ext} files.") blobs = self.read_blobs(version, newest=newest, print_version=False) - blob_bytes = [blob.content_as_bytes() for blob in blobs] + blob_bytes = [ + blob if isinstance(blob, bytes) else blob.content_as_bytes() + for blob in blobs + ] blob_files = [BytesIO(pq) for pq in blob_bytes] if file_ext == "csv": if output in ["pandas", "pd"]: From 4ff3d4652923220104203c5e5830f348f7f00614 Mon Sep 17 00:00:00 2001 From: Ryan Raasch Date: Mon, 27 Apr 2026 17:50:43 +0000 Subject: [PATCH 6/6] fix copilot suggestion: docstring --- cfa/dataops/catalog.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cfa/dataops/catalog.py b/cfa/dataops/catalog.py index accd32e..1a45047 100644 --- a/cfa/dataops/catalog.py +++ b/cfa/dataops/catalog.py @@ -226,8 +226,6 @@ def read_blobs( """Read a blob in as bytes so it can be loaded into a dataframe Args: - path_after_prefix (str): The path to the data (e.g., - {timestamp}/dataset.csv) version (str, optional): the version of the data to read. Defaults to "latest". newest (bool, optional): whether to get the newest matching version. Defaults to True.