diff --git a/pyproject.toml b/pyproject.toml index 7757170..0d27728 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dependencies = [ "h5netcdf", "h5py", "pvlive-api", + "pytest-mock", ] [project.optional-dependencies] @@ -55,7 +56,6 @@ dev = [ "twine", "pytest", "pytest-cov", - "pytest-mock", "tomli", ] diff --git a/src/open_data_pvnet/utils/data_downloader.py b/src/open_data_pvnet/utils/data_downloader.py index 33f8495..9fe77f8 100644 --- a/src/open_data_pvnet/utils/data_downloader.py +++ b/src/open_data_pvnet/utils/data_downloader.py @@ -42,7 +42,7 @@ def merge_datasets(datasets: List[xr.Dataset]) -> xr.Dataset: ds = xr.merge(datasets, compat="override") logger.info("Dataset info:") logger.info(f"Variables: {list(ds.variables)}") - logger.info(f"Dimensions: {dict(ds.dims)}") + logger.info(f"Dimensions: {dict(ds.sizes)}") logger.info(f"Coordinates: {list(ds.coords)}") return ds diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 7a6aff8..9e781a4 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -1,4 +1,4 @@ -import tomli +import tomllib import open_data_pvnet @@ -8,7 +8,7 @@ def test_version_consistency(): """ # Read version from pyproject.toml with open("pyproject.toml", "rb") as f: - pyproject_data = tomli.load(f) + pyproject_data = tomllib.load(f) pyproject_version = pyproject_data["project"]["version"] # Read version from the __init__.py file