diff --git a/yt/frontends/parthenon/data_structures.py b/yt/frontends/parthenon/data_structures.py index b1df6a00877..acab777c7a7 100644 --- a/yt/frontends/parthenon/data_structures.py +++ b/yt/frontends/parthenon/data_structures.py @@ -129,6 +129,7 @@ def _populate_grid_objects(self): class ParthenonDataset(Dataset): + _load_requirements = ["h5py"] _field_info_class = ParthenonFieldInfo _dataset_type = "parthenon" _index_class = ParthenonHierarchy @@ -312,6 +313,8 @@ def _parse_parameter_file(self): @classmethod def _is_valid(cls, filename: str, *args, **kwargs) -> bool: + if cls._missing_load_requirements(): + return False return filename.endswith((".phdf", ".rhdf")) @property