-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪🩹 Make schema tests compatible with pydantic >= 2.9 AND < 2.9
- Loading branch information
Showing
10 changed files
with
394 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ repos: | |
rev: v4.0.0-alpha.8 # Use the sha or tag you want to point at | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: ["[email protected]"] | ||
|
||
# Notebook tools | ||
- repo: https://github.com/kynan/nbstripout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# Runtime dependencies | ||
|
||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile pyproject.toml -o requirements_pinned.txt --no-deps --no-annotate | ||
cycler==0.12.1 | ||
numpy==2.0.1 | ||
docstring-parser==0.16 | ||
matplotlib==3.9.2 | ||
numpy==2.0.1 | ||
packaging==24.1 | ||
pydantic==2.9.2 | ||
pyglotaran==0.7.3 | ||
ruamel-yaml==0.18.6 | ||
tabulate==0.9.0 | ||
xarray==2024.9.0 | ||
ruamel.yaml==0.18.6 | ||
docstring_parser==0.16 | ||
pydantic==2.9.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
tests/data/config/broken_config.schema.pydantic_lt_2_9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"$defs": { | ||
"PerFunctionPlotConfig": { | ||
"additionalProperties": false, | ||
"description": "Per function plot configuration.", | ||
"properties": { | ||
"default_args_override": { | ||
"description": "Default arguments to use if not specified in function call.", | ||
"title": "Default Args Override", | ||
"type": "object", | ||
"properties": { | ||
"will_update_arg": { | ||
"default": "default update", | ||
"title": "Will Update Arg" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"axis_label_override": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/$defs/PlotLabelOverrideMap" | ||
}, | ||
{ | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"type": "object" | ||
} | ||
], | ||
"title": "Axis Label Override" | ||
} | ||
}, | ||
"title": "PerFunctionPlotConfig", | ||
"type": "object" | ||
}, | ||
"PlotConfig": { | ||
"additionalProperties": true, | ||
"description": "Config for plot functions including default args and label overrides.", | ||
"properties": { | ||
"general": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/PerFunctionPlotConfig" | ||
} | ||
], | ||
"description": "Config that gets applied to all functions if not specified otherwise." | ||
}, | ||
"test_func": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/TestFuncConfig" | ||
} | ||
] | ||
} | ||
}, | ||
"title": "PlotConfig", | ||
"type": "object" | ||
}, | ||
"PlotLabelOverrideMap": { | ||
"additionalProperties": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/$defs/PlotLabelOverrideValue" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"description": "Mapping to override axis labels.", | ||
"title": "PlotLabelOverrideMap", | ||
"type": "object" | ||
}, | ||
"PlotLabelOverrideValue": { | ||
"additionalProperties": false, | ||
"description": "Value of ``PlotLabelOverrideMap``.", | ||
"properties": { | ||
"target_name": { | ||
"title": "Target Name", | ||
"type": "string" | ||
}, | ||
"axis": { | ||
"default": "both", | ||
"enum": ["x", "y", "both"], | ||
"title": "Axis", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["target_name"], | ||
"title": "PlotLabelOverrideValue", | ||
"type": "object" | ||
}, | ||
"TestFuncKwargs": { | ||
"additionalProperties": false, | ||
"description": "Default arguments to use for ``test_func``, if not specified in function call.", | ||
"properties": { | ||
"will_update_arg": { | ||
"default": "default update", | ||
"title": "Will Update Arg" | ||
} | ||
}, | ||
"title": "TestFuncKwargs", | ||
"type": "object" | ||
}, | ||
"TestFuncConfig": { | ||
"additionalProperties": false, | ||
"description": "Plot function configuration specific to ``test_func`` (overrides values in general).", | ||
"properties": { | ||
"default_args_override": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/TestFuncKwargs" | ||
} | ||
], | ||
"default": {} | ||
}, | ||
"axis_label_override": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/PlotLabelOverrideMap" | ||
} | ||
], | ||
"default": {} | ||
} | ||
}, | ||
"title": "TestFuncConfig", | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"description": "Main configuration class.", | ||
"properties": { | ||
"plotting": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/PlotConfig" | ||
} | ||
], | ||
"default": { | ||
"general": {} | ||
} | ||
} | ||
}, | ||
"title": "Config", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.