-
Notifications
You must be signed in to change notification settings - Fork 1
DM-52947: Add a ResourcePath.get_info() method #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c879311
Add a ResourcePath.get_info() method
timj b256c3e
Add URI string to ResourceInfo for provenance
timj 358656f
Enable check sum mode when using s3 get_info
timj fd5376e
Improve test coverage
timj e7019eb
Add ResourceInfo.is_file flag and test it
timj 479306d
Ignore the .env file
timj 52c59b4
Remove some code duplication in http size() call
timj fa9f1df
Add get_info test for mem://
timj 2e2fa2a
Add test coverage for GCS using emulated GCS server
timj 182d429
Return size=0 for unknown rather than -1
timj af835b4
Fix some minor issues
timj e24f1ae
Use a more believable md5 in tests (with == padding)
timj 33b36b6
Edit dav get_info() to better suit the internal API
airnandez 5643631
Enable D212 ruff check and fix docstrings
timj 7ddc888
Fix numpydoc errors that were unnoticed.
timj 3747db3
Remove creation_time from ResourceInfo
timj 2ef3a4f
Allow S3 directories to return checksums
timj 876f940
Share os.stat to ResourceInfo code for file and resources URIs
timj 6c06ddf
Add news fragment
timj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| *.bck | ||
| *.pyc | ||
| .eggs | ||
| .env | ||
| *.egg-info | ||
| version.py | ||
| _build.* | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added a ``ResourcePath.get_info()`` method to provide a general interface for obtaining information about a resource including the size, modification date, and any checksums available. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do end up keeping this, the testcontainers library is a nice way to embed the docker setup logic in unit tests.
Example: https://github.com/lsst/daf_butler/blob/main/tests_integration/test_docker_container.py