From 5518b072ff50f84a59065bbb1df0e01b89a2efee Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 26 Aug 2024 20:27:04 -0400 Subject: [PATCH 1/5] update to _hook for new marshmallow --- paramtools/schema.py | 2 +- paramtools/tests/test_parameters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paramtools/schema.py b/paramtools/schema.py index 4ebe76d..ebbb453 100644 --- a/paramtools/schema.py +++ b/paramtools/schema.py @@ -204,7 +204,7 @@ def validate_only(self, data): error_store=error_store, data=data, many=None ) # Run schema-level validation - if self._has_processors(decorators.VALIDATES_SCHEMA): + if self._hooks[decorators.VALIDATES_SCHEMA]: field_errors = bool(error_store.errors) self._invoke_schema_validators( error_store=error_store, diff --git a/paramtools/tests/test_parameters.py b/paramtools/tests/test_parameters.py index 150c9ed..13798bb 100644 --- a/paramtools/tests/test_parameters.py +++ b/paramtools/tests/test_parameters.py @@ -1017,7 +1017,7 @@ def test_range_validation_on_list_param(self, TestParams): ] } params.adjust(adj, raise_errors=False) - exp = ["float_list_param[label0=zero, label1=1] [np.float64(-1.0), np.float64(1.0)] < min 0 "] + exp = ["float_list_param[label0=zero, label1=1] [-1.0, 1.0] < min 0 "] assert params.errors["float_list_param"] == exp From 4e398d4c77a92a0d2e7ed6b22e9aae4cdd85faaa Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 26 Aug 2024 20:28:00 -0400 Subject: [PATCH 2/5] pin to marshmallow >= 3.22 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index f5479a4..aefaeba 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: paramtools-dev channels: - conda-forge dependencies: - - "marshmallow>=3.0.0" + - "marshmallow>=3.22.0" - "numpy>=1.13" - "python-dateutil>=2.8.0" - "pytest>=6.0.0" From 4eea81758c10c067895ed0aa8f5c94c0fecda764 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 26 Aug 2024 20:31:48 -0400 Subject: [PATCH 3/5] bump version --- paramtools/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paramtools/__init__.py b/paramtools/__init__.py index d8088f2..b5bec61 100644 --- a/paramtools/__init__.py +++ b/paramtools/__init__.py @@ -53,7 +53,7 @@ name = "paramtools" -__version__ = "0.18.2" +__version__ = "0.18.3" __all__ = [ "SchemaFactory", diff --git a/setup.py b/setup.py index 099ddaa..e6c1ced 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="paramtools", - version=os.environ.get("VERSION", "0.18.2"), + version=os.environ.get("VERSION", "0.18.3"), author="Hank Doupe", author_email="henrymdoupe@gmail.com", description=( From dd0f969213f3bde21864aab4a270048576e11db2 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 26 Aug 2024 21:22:02 -0400 Subject: [PATCH 4/5] update for later numpy version --- environment.yml | 2 +- paramtools/tests/test_parameters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index aefaeba..dacd492 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - "marshmallow>=3.22.0" - - "numpy>=1.13" + - "numpy>=2.1.0" - "python-dateutil>=2.8.0" - "pytest>=6.0.0" - pandas diff --git a/paramtools/tests/test_parameters.py b/paramtools/tests/test_parameters.py index 13798bb..150c9ed 100644 --- a/paramtools/tests/test_parameters.py +++ b/paramtools/tests/test_parameters.py @@ -1017,7 +1017,7 @@ def test_range_validation_on_list_param(self, TestParams): ] } params.adjust(adj, raise_errors=False) - exp = ["float_list_param[label0=zero, label1=1] [-1.0, 1.0] < min 0 "] + exp = ["float_list_param[label0=zero, label1=1] [np.float64(-1.0), np.float64(1.0)] < min 0 "] assert params.errors["float_list_param"] == exp From f784fb891cfcdb233e389100ca1a154ffdadb87e Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 26 Aug 2024 21:35:29 -0400 Subject: [PATCH 5/5] drop 3.9 tests --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90c190c..9bbc66a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,5 @@ -name: Build Package and Test Source Code [Python 3.9, 3.10, 3.11, 3.12] +name: Build Package and Test Source Code [Python 3.10, 3.11, 3.12] on: push: @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - name: Checkout