diff --git a/pyproject.toml b/pyproject.toml
index 2b41dd03..77998076 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -32,18 +32,17 @@ dependencies = [
 [project.optional-dependencies]
 hdf_reader = [
     "fsspec",
+    "h5py",
     "hdf5plugin",
     "imagecodecs",
     "imagecodecs-numcodecs==2024.6.1",
+    "numcodecs"
 ]
 test = [
     "codecov",
     "fastparquet",
     "fsspec",
     "h5py",
-    "hdf5plugin",
-    "imagecodecs",
-    "imagecodecs-numcodecs==2024.6.1",
     "kerchunk>=0.2.5",
     "mypy",
     "netcdf4",
@@ -57,6 +56,7 @@ test = [
     "ruff",
     "s3fs",
     "scipy",
+    "virtualizarr[hdf_reader]"
 ]