universal_pathlib icon indicating copy to clipboard operation
universal_pathlib copied to clipboard

Support XRootD filesystems

Open ikrommyd opened this issue 5 months ago • 1 comments

It would be nice if universal pathlib supported XRootD filesystems where the fsspec implementation of the filesystem lives in https://github.com/scikit-hep/fsspec-xrootd. It's an extremely common filesystem in particle physics.

It currently does not work with the default implementation fallback and feels like it's getting confused with the path

In [1]: from upath import UPath

In [2]: p = UPath("root://cmseos.fnal.gov//store/user/ikrommyd/")
/Users/iason/micromamba/envs/awkward-coffea/lib/python3.13/site-packages/upath/core.py:318: UserWarning: UPath 'root' filesystem not explicitly implemented. Falling back to default implementation. This filesystem may not be tested.
  upath_cls = get_upath_class(protocol=pth_protocol)

In [3]: str(p)
Out[3]: 'root:///store/user/ikrommyd'

In [4]: str(p.parent)
Out[4]: 'root:///'

ikrommyd avatar Oct 04 '25 15:10 ikrommyd

Hi @ikrommyd,

Thanks for opening the feature request!

To add a new UPath implementation we'd need to add tests for fsspec-xrootd.

In this issue comment I describe the first steps: https://github.com/fsspec/universal_pathlib/issues/117#issuecomment-1641532209 Usually the hardest part is setting up the fixtures for setting up the testing filesystem. But that code might already be available in the fsspec-xrootd repo.

Would you like to contribute an XRootDPath to universal-pathlib?

Cheers, Andreas

ap-- avatar Oct 04 '25 18:10 ap--