download_file_from_gcs now uses cache.#133
Merged
Merged
Conversation
e621eda to
b0a17e1
Compare
b0a17e1 to
3e01076
Compare
anth-volk
reviewed
May 15, 2025
| @@ -1,3 +1,26 @@ | |||
| from .data.caching_google_storage_client import CachingGoogleStorageClient | |||
Contributor
There was a problem hiding this comment.
issue, blocking: Add a changelog entry
Without it, this package won't launch to PyPI, and there's no check for changelog_entry.yaml in the GH Actions
anth-volk
reviewed
May 15, 2025
| def _get_client(): | ||
| global _caching_client | ||
| if _caching_client is not None: | ||
| print("Caching client already created") |
Contributor
There was a problem hiding this comment.
question: Is there an advantage to printing over using the logging package?
Collaborator
Author
There was a problem hiding this comment.
oh that was me debugging. Will remove this and the other one.
anth-volk
reviewed
May 15, 2025
| if _caching_client is not None: | ||
| print("Caching client already created") | ||
| return _caching_client | ||
| print("Creating caching client") |
Contributor
There was a problem hiding this comment.
question: Here, too, would it be better to log?
anth-volk
requested changes
May 15, 2025
Contributor
anth-volk
left a comment
There was a problem hiding this comment.
A couple minor questions and one blocking issue: a changelog_entry.yaml file is needed to trigger PyPI deployment
Related to PolicyEngine/issues#350 this change re-implements the download_file_from_gcs function to use CachingGoogleStorageClient. Files should now be cached locally on a per-process basis and only updated on disk when the remote version crc changes.
3e01076 to
566a067
Compare
mikesmit
added a commit
that referenced
this pull request
May 19, 2025
Revert "Merge pull request #133 from PolicyEngine/350_use_caching_goo…
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.
Related to PolicyEngine/issues#350
this change re-implements the download_file_from_gcs function to use CachingGoogleStorageClient.
Files should now be cached locally on a per-process basis and only updated on disk when the remote version crc changes.