-
Notifications
You must be signed in to change notification settings - Fork 3
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
Replace FilePointer with universal pathlib #387
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
=======================================
Coverage 99.73% 99.73%
=======================================
Files 26 26
Lines 1507 1520 +13
=======================================
+ Hits 1503 1516 +13
Misses 4 4 ☔ View full report in Codecov by Sentry. |
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 love how it makes everything much simpler!
There is an inconsistency in *Arguments
' parameters type-hints: some of them are UPath
, some are str
(the same for List[*]
). Only for these "end-user" interfaces, may I ask to use something more broad, like str | Path | UPath
?
Do we have a policy that requires any imported package to be an explicit dependency? (it is a good one!) Should we add universal_pathlib
to pyproject.toml
?
Added a lot more type hints, and direct dependency on |
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.
Thank you!
See astronomy-commons/hipscat#336
Solution Description
Use fsspec's project, universal-pathlib as a path provider. In this way, everywhere we currently pass in a
FilePointer
we can use aPath
instead, and when we need to create remote connections, useUPath
.