uproot5 icon indicating copy to clipboard operation
uproot5 copied to clipboard

Use extras so downstream packages can depend on `uproot[xrootd]`

Open chrisburr opened this issue 1 year ago • 2 comments

I couldn't find anything discussing this but I'd find it useful if there was an extra that let me declare the need for xrootd support. I could also add a dependency on fspec-xrootd but it feels a bit wrong to specify an implementation detail of uproot.

I guess the same might also make sense for s3 and maybe a generic option for all compression related dependencies (less sure about the name for this one, maybe [compression]?).

chrisburr avatar Feb 28 '24 14:02 chrisburr

Compression has recently been solved by cramjam (PR #1090 and release 5.3.0); cramjam is a sufficiently robust dependency (self-contained, works on Pyodide) that it can be a strict dependency.

fsspec is also a strict dependency now (as of 5.2.0), so

pip install uproot[xrootd]

could (should) pull in fsspec-xrootd in specific. That could be true of uproot[http] and uproot[s3], but how many? Can pip do the following?

pip install uproot[xrootd,http,s3]

If so, then it makes sense to include them all with fine granularity like this.

jpivarski avatar Feb 28 '24 21:02 jpivarski

Ah nice, I hadn't heard of cramjam but it looks very useful.

THat could be true of uproot[http] and uproot[s3], but how many? Can pip do the following?

pip install uproot[xrootd,http,s3]

If so, then it makes sense to include them all with fine granularity like this.

Yes, this is exactly how it works. You can event use something like uproot[xrootd] from within uproot the extras section to make something like uproot[all] or uproot[dev]. See sqlalchemy for an example.

chrisburr avatar Feb 29 '24 03:02 chrisburr