From 50143ba88bf791bebed761e83a9c38e068d213ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Wed, 25 Sep 2024 17:56:23 +0200 Subject: [PATCH 1/4] TYP: hotfix unsolvable type-checking requirements --- .github/workflows/type-checking.yaml | 3 ++- requirements/typecheck.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/type-checking.yaml b/.github/workflows/type-checking.yaml index 3c7f7307d2..83713c2bc0 100644 --- a/.github/workflows/type-checking.yaml +++ b/.github/workflows/type-checking.yaml @@ -7,7 +7,8 @@ on: pull_request: paths: - yt/**/*.py - - setup.cfg + - pyproject.toml + - requirements/typecheck.txt - .github/workflows/type-checking.yaml workflow_dispatch: diff --git a/requirements/typecheck.txt b/requirements/typecheck.txt index 3edda47449..f116cfe1d5 100644 --- a/requirements/typecheck.txt +++ b/requirements/typecheck.txt @@ -2,4 +2,4 @@ mypy==1.11.2 types-PyYAML==6.0.12.20240808 types-chardet==5.0.4.6 types-requests==2.32.0.20240907 -typing-extensions==4.4.0; python_version < '3.12' +typing-extensions==4.6.0; python_version < '3.12' From a760066a3f66f8f62724385319067f10f7dd4486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Wed, 25 Sep 2024 18:49:30 +0200 Subject: [PATCH 2/4] ignore an obscure typechecking warning --- yt/data_objects/construction_data_containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt/data_objects/construction_data_containers.py b/yt/data_objects/construction_data_containers.py index a406018925..38deeb9bbc 100644 --- a/yt/data_objects/construction_data_containers.py +++ b/yt/data_objects/construction_data_containers.py @@ -1426,7 +1426,7 @@ class YTSmoothedCoveringGrid(YTCoveringGrid): filename = None _min_level = None - @wraps(YTCoveringGrid.__init__) + @wraps(YTCoveringGrid.__init__) # type: ignore [misc] def __init__(self, *args, **kwargs): ds = kwargs["ds"] self._base_dx = ( From 59a346b19f02e0d94399d3178aec9e7a0d836c98 Mon Sep 17 00:00:00 2001 From: chavlin Date: Wed, 25 Sep 2024 14:30:35 -0500 Subject: [PATCH 3/4] exclude h5py 3.12.0 from test dependencies --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8a562a27a7..b8c5f54ee1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -205,6 +205,7 @@ test = [ "nose-exclude; python_version < '3.10'", "nose-timer~=1.0.0; python_version < '3.10'", "imageio!=2.35.0", # see https://github.com/yt-project/yt/issues/4966 + "h5py!=3.12.0", # see https://github.com/h5py/h5py/issues/2505 ] [project.scripts] From cf54d4869cb8e6e57e1301ad870bbeb8a13a8ee4 Mon Sep 17 00:00:00 2001 From: chavlin Date: Wed, 25 Sep 2024 14:54:43 -0500 Subject: [PATCH 4/4] move h5py exclusion up to HDF5 set --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b8c5f54ee1..08d31233d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ answer-testing = "yt.utilities.answer_testing.framework:AnswerTesting" [project.optional-dependencies] # some generic, reusable constraints on optional-deps -HDF5 = ["h5py>=3.1.0"] +HDF5 = ["h5py>=3.1.0,!=3.12.0; platform_system=='Windows'"] # see https://github.com/h5py/h5py/issues/2505 netCDF4 = ["netCDF4!=1.6.1,>=1.5.3"] # see https://github.com/Unidata/netcdf4-python/issues/1192 Fortran = ["f90nml>=1.1"] @@ -205,7 +205,6 @@ test = [ "nose-exclude; python_version < '3.10'", "nose-timer~=1.0.0; python_version < '3.10'", "imageio!=2.35.0", # see https://github.com/yt-project/yt/issues/4966 - "h5py!=3.12.0", # see https://github.com/h5py/h5py/issues/2505 ] [project.scripts]