From 662db7138b7465e18715530aad9e307d5fb9c7df Mon Sep 17 00:00:00 2001 From: jdebacker Date: Sat, 11 May 2024 21:57:13 -0400 Subject: [PATCH 1/3] use load_defaults rather than missing --- paramtools/schema.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/paramtools/schema.py b/paramtools/schema.py index d3276f9..4ebe76d 100644 --- a/paramtools/schema.py +++ b/paramtools/schema.py @@ -106,10 +106,10 @@ class BaseParamSchema(Schema): attribute="type", data_key="type", ) - number_dims = fields.Integer(required=False, missing=0) + number_dims = fields.Integer(required=False, load_default=0) value = fields.Field(required=True) # will be specified later validators = fields.Nested( - ValueValidatorSchema(), required=False, missing={} + ValueValidatorSchema(), required=False, load_default={} ) indexed = fields.Boolean(required=False) @@ -580,9 +580,9 @@ class LabelSchema(Schema): attribute="type", data_key="type", ) - number_dims = fields.Integer(required=False, missing=0) + number_dims = fields.Integer(required=False, load_default=0) validators = fields.Nested( - ValueValidatorSchema(), required=False, missing={} + ValueValidatorSchema(), required=False, load_default={} ) @@ -594,7 +594,7 @@ class AdditionalMembersSchema(Schema): attribute="type", data_key="type", ) - number_dims = fields.Integer(required=False, missing=0) + number_dims = fields.Integer(required=False, load_default=0) return AdditionalMembersSchema @@ -611,13 +611,13 @@ class ParamToolsSchema(Schema): keys=fields.Str(), values=fields.Nested(LabelSchema()), required=False, - missing={}, + load_default={}, ) additional_members = fields.Dict( keys=fields.Str(), values=fields.Nested(make_additional_members(allowed_types)()), required=False, - missing={}, + load_default={}, ) operators = fields.Nested(OperatorsSchema, required=False) From de64c39006c9bcc1f32020f958bb872a221fe9a9 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Sat, 11 May 2024 22:00:32 -0400 Subject: [PATCH 2/3] test on more recent python versions --- .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 6a6bfa1..8c0cecc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout @@ -21,7 +21,7 @@ jobs: persist-credentials: false - name: Setup Miniconda using Python ${{ matrix.python-version }} - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: paramtools-dev environment-file: environment.yml From b0cc97919d0e8ffa910f0eda72741eb4d82c4316 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Sun, 12 May 2024 18:14:41 -0400 Subject: [PATCH 3/3] only test on 3.9+ --- .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 8c0cecc..90c190c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,5 @@ -name: Build Package and Test Source Code [Python 3.6, 3.7, 3.8] +name: Build Package and Test Source Code [Python 3.9, 3.10, 3.11, 3.12] on: push: @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout