From 545a2698f5d607f0614767091b91df59c7dfb0f2 Mon Sep 17 00:00:00 2001 From: Frank Malatino Date: Tue, 14 May 2024 15:15:24 -0400 Subject: [PATCH 1/2] Removed unused variables, d0_vap, lv00, and cracw from sedimentation and icloud in microphysics.py, which were creating parsing issues --- .pre-commit-config.yaml | 3 ++- pySHiELD/stencils/microphysics.py | 6 ------ setup.py | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 118373a..1f2053d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,11 +15,12 @@ repos: args: ["--profile", "black"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.812 + rev: v1.4.1 hooks: - id: mypy name: mypy-physics args: [--config-file, setup.cfg] + additional_dependencies: [types-PyYAML] files: pySHiELD exclude: | (?x)^( diff --git a/pySHiELD/stencils/microphysics.py b/pySHiELD/stencils/microphysics.py index b77d699..f9f73a2 100644 --- a/pySHiELD/stencils/microphysics.py +++ b/pySHiELD/stencils/microphysics.py @@ -673,8 +673,6 @@ def sedimentation( m1_sol: FloatField, c_air: Float, c_vap: Float, - d0_vap: Float, - lv00: Float, log_10: Float, zs: Float, dts: Float, @@ -1257,7 +1255,6 @@ def icloud( csaci: Float, cgacw: Float, cgaci: Float, - cracw: Float, cssub_0: Float, cssub_1: Float, cssub_2: Float, @@ -2101,8 +2098,6 @@ def __call__(self, state: MicrophysicsState, timestep: float): self._m1_sol, self._c_air, self._c_vap, - self._d0_vap, - self._lv00, self._log_10, self._zs, self._dts, @@ -2189,7 +2184,6 @@ def __call__(self, state: MicrophysicsState, timestep: float): self._csaci, self._cgacw, self._cgaci, - self._cracw, self._cssub_0, self._cssub_1, self._cssub_2, diff --git a/setup.py b/setup.py index 597e7b3..4d61822 100755 --- a/setup.py +++ b/setup.py @@ -12,6 +12,7 @@ "f90nml>=1.1.0", "numpy", "xarray", + "types-pyyaml", ] test_requirements = ["pytest", "pytest-subtests", "serialbox"] From f2070d103549ab036b68992d91220ac2b520e59a Mon Sep 17 00:00:00 2001 From: Frank Malatino Date: Wed, 15 May 2024 10:00:09 -0400 Subject: [PATCH 2/2] Removed double dependency for types-PyYAML --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 4d61822..597e7b3 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,6 @@ "f90nml>=1.1.0", "numpy", "xarray", - "types-pyyaml", ] test_requirements = ["pytest", "pytest-subtests", "serialbox"]