-
Notifications
You must be signed in to change notification settings - Fork 25
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
Paths as URIs #243
Merged
Merged
Paths as URIs #243
Changes from 20 commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
c787da4
validate that paths can be coerced to valid URIs
TomNicholas b2f3f26
add a test that paths are converted to URIs
TomNicholas 6b15d9e
added test and better error if local path is not absolute
TomNicholas 045cc7a
raise more informative error if path is not absolute
TomNicholas ddc6b7f
test that empty paths are allowed
TomNicholas 61bf5d6
add failing test for raising on malformed paths
TomNicholas 2896bd8
fix paths in tests
TomNicholas 584adf9
fix more tests
TomNicholas 14b8ca3
remove the file:/// prefix when writing to kerchunk format
TomNicholas bad0b1b
Merge branch 'main' into paths_as_uris
TomNicholas 739a6bd
absolute paths in recently-added tests
TomNicholas 06f3a4d
absolute paths in recently-added tests
TomNicholas 3d50def
fix one more test
TomNicholas b37f8d0
Merge branch 'main' into paths_as_uris
TomNicholas a9bd0a3
stop wrapping specific error in less useful one
TomNicholas f0bc445
moved remaining kerchunk parsing logic out into translator file
TomNicholas b224af8
add fs_root parameter to validation fn
TomNicholas c8d513c
demote ChunkEntry to a TypedDict to separate validation fn
TomNicholas 4ad26cf
actually instead add new constructor method to TypedDict
TomNicholas 7aaaabf
test kerchunk writer with absolute paths
TomNicholas f66ed79
make kerchunk reader tests pass
TomNicholas e30ab05
try to implement the fs_root concatenation
TomNicholas 0a4a11d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 98644a7
implementation using cloudpathlib working
TomNicholas 4499cf9
check that fs_root doesn't have a filetype suffix
TomNicholas d27bdf6
add cloudpathlib to dependencies
TomNicholas fefab90
allow http paths, and require file suffixes
TomNicholas 927121c
unit tests for path validation
TomNicholas c561a5d
test whether we can catch malformed paths
TomNicholas d42ff33
test fs_root
TomNicholas 4b7cd2d
add (unimplemented) validate_entries kwarg to .from_arrays
TomNicholas 0f8b550
add .keys(), .values(), .items()
TomNicholas 8055ba7
test validate_paths during .from_arrays
TomNicholas f18bf59
ensure validation actually normalizes paths to uris
TomNicholas 96f6360
test .rename_paths correctly validates paths
TomNicholas b2ed1cd
some release notes
TomNicholas 87fad80
remove now-superfluous coercion to URI in icechunk writer
TomNicholas 1f41d69
added link to icechunk writer performance benchmark
TomNicholas 41ec08f
add reader_kwargs argument to open_virtual_dataset, and pass it down …
TomNicholas b4cc617
Merge branch 'main' into reader_kwargs
TomNicholas ffff93e
Merge branch 'main' into paths_as_uris
TomNicholas 26e8950
Merge branch 'main' into paths_as_uris
TomNicholas 19c13ae
ensure relative paths containing .. can be normalized
TomNicholas 6ce7ebd
ensure HDF5 reader always returns absolute URIs
TomNicholas 24b6ea7
ensure HDF reader always returns absolute URIs
TomNicholas 5f0f362
add relative path handling to other kerchunk-based readers
TomNicholas 001f95b
Merge branch 'reader_kwargs' into paths_as_uris
TomNicholas 15ae139
add dmrpp relative path integration test
ayushnag b3432c6
Merge branch 'main' into paths_as_uris
TomNicholas ae00ac3
Merge branch 'main' into paths_as_uris
TomNicholas ddc19c3
Merge branch 'main' into filepath_test_dmrpp
TomNicholas 8353a9b
fix kerchunk relative paths test by pluggin through fs_root kwarg
TomNicholas 251469f
Merge branch 'filepath_test_dmrpp' of https://github.com/ayushnag/Vir…
TomNicholas 0915433
fix dmrpp tests by using absolute filepaths in DMR++ contents
TomNicholas 3ca8f7f
clarify new dmrpp test
TomNicholas 8a90ec7
test handling of relative filepaths to dmrpp files
TomNicholas 4afa34c
group related tests
TomNicholas da9ee10
removed cloudpathlib from validation code
TomNicholas 3557008
fix bug but restrict fs_root to only handle filesystem paths, not buc…
TomNicholas ca09096
global list of recognized URI prefixes
TomNicholas 7727d4e
cleanup
TomNicholas 03aa6bc
remove cloudpathlib from dependencies
TomNicholas 4d8ceea
fix/ignore some typing errors
TomNicholas cd5bec1
rewrite tests to use a new dmrparser_factory
TomNicholas e521e20
rewrite using global dict of XML strings
TomNicholas 4ff17d0
fix final test by explicitly passing in tmp_path instead of using a f…
TomNicholas 7e0be24
Merge branch 'dmrpp_tests_tmp_path' into paths_as_uris
TomNicholas bf0bb87
fix bug with not converting Path objects to strings
TomNicholas 25acdf9
Merge branch 'dmrpp_tests_tmp_path' into paths_as_uris
TomNicholas ac04cef
dmrpp relative paths tests passing
TomNicholas 39bbfaf
fix type hint for filetype kwarg
TomNicholas 9b6906b
Merge branch 'main' into paths_as_uris
TomNicholas 0127f05
user documentation on fs_root
TomNicholas cd5da5d
change example manifests to use URIs
TomNicholas df6663f
reminder that rename_paths exists
TomNicholas be20994
Merge branch 'paths_as_uris' of https://github.com/TomNicholas/Virtua…
TomNicholas 528f722
update release notes
TomNicholas a8d5a15
remove note about .rename_paths
TomNicholas 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 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 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 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 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 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.
I've seen people use urlparse (https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse). Not sure if that would be easier to read or not.
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.
Oh that does look neater, thanks!
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.
Actually handling all these cases is such a PITA that maybe I should just use
cloudpathlib.AnyPath
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.
Using cloudpathlib did make this very easy, at the cost of adding a new dependency. Luckily for this use case (string validation) it's only a pure-python standalone dependency.