Skip to content

Commit

Permalink
Merge pull request #134 from jdebacker/marshmallow
Browse files Browse the repository at this point in the history
  • Loading branch information
hdoupe committed May 17, 2024
2 parents 0107ece + b0cc979 commit 1ef9a64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions paramtools/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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={}
)


Expand All @@ -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

Expand All @@ -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)

Expand Down

0 comments on commit 1ef9a64

Please sign in to comment.