Open CompRhys opened 5 months ago
You can prevent some of the failing tests, by editing
to use: fsspec >=2022.1.0,!=2024.3.1
This is due to a incompatibility of UPath's test suite with the newest fsspec.
Where are we with this? I would be nice to have this in, because the current behavior is broken :-).
With the new fsspec release, this is ready to be merged. I'm on holiday until the end of May and will prepare a new release when I'm back 😊
Great!
Thinking and testing this a little bit further (from an Airflow perspective, but I don't think that matters). The following does not seem to make sense:
o = ObjectStoragePath("s3://tmp/test")
t = ObjectStoragePath("s3://tmp/test/subdir/bla/bla.txt")
t.relative_to(o).resolve()
prints PosixUPath('/Users/bolke/dev/airflow/subdir/bla/bla.txt')
which doesn't make sense either way. If posix it should resolve to tmp/test/subdir/bla/bla.txt
or if s3 (that should make more sense I guess?) to s3://tmp/test/subdir/bla/bla.txt
.
Isn't it better to return a PurePath or keep a reference to the original?
What I am considering is to have
ObjectStoragePath.relative_to
return itself (e.g. an ObjectStoragePath) with a storage_option
of parent
set to the self
.
__str__
then reproduces the relative path by checking if parent
was set, but all other mechanisms intact.
Close #214
Test that should pass if the local path code worked as expected