Skip to content
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

Split optional dependencies in pyproject.toml #309

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
49 changes: 38 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,59 @@ dynamic = ["version"]
dependencies = [
"xarray>=2024.10.0",
"numpy>=2.0.0",
"packaging",
"universal-pathlib",
"numcodecs",
"ujson",
"packaging",
]

[project.optional-dependencies]
# non-kerchunk readers
hdf_reader = [
"fsspec",
"h5py",
"hdf5plugin",
"imagecodecs",
"imagecodecs-numcodecs==2024.6.1",
"numcodecs"
]
# kerchunk-based readers
hdf5_reader = [
"kerchunk>=0.25.0",
"h5py",
]
netcdf3_reader = [
"kerchunk>=0.25.0",
"scipy",
]
fits_reader = [
"kerchunk>=0.25.0",
"astropy",
]
# un-implemented readers
# tiff_reader = [
# "kerchunk>=0.25.0",
# "tifffile",
# ]
# grib_reader = ["kerchunk>=0.25.0"]
# zarr_reader = ["zarr==3.0.0b2"]
all_readers = [
"virtualizarr[hdf]",
"virtualizarr[hdf5]",
"virtualizarr[netcdf3]",
"virtualizarr[fits]",
# "virtualizarr[tiff]",
# "virtualizarr[grib]",
# "virtualizarr[zarr]",
]
# writers
icechunk = ["icechunk"]
all = [
"virtualizarr[all_readers]",
"virtualizarr[icechunk]",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now I don't think this can possibly work, because icechunk requires zarr-python v3 but kerchunk requires <3.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should change the public pip install to use some random branch...

Aside: Is there a reason you are using virtualizarr main there? Would it be helpful to issue another release?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should change the public pip install to use some random branch...

sorry, I wasn't suggesting you should use that approach, but just was sharing for information about what is/isn't possible. I should've been more clear.

Aside: Is there a reason you are using virtualizarr main there? Would it be helpful to issue another release?

I wanted strict type hinting (#306)

]
test = [
"codecov",
"fastparquet",
"fsspec",
"h5py",
"kerchunk>=0.2.5",
"mypy",
"netcdf4",
"numcodecs",
"pandas-stubs",
"pooch",
"pre-commit",
Expand All @@ -55,11 +84,9 @@ test = [
"pytest",
"ruff",
"s3fs",
"scipy",
"virtualizarr[hdf_reader]"
"virtualizarr[all]"
]


[project.urls]
Home = "https://github.com/TomNicholas/VirtualiZarr"
Documentation = "https://github.com/TomNicholas/VirtualiZarr/blob/main/README.md"
Expand Down
Loading