Skip to content

Refactor creating parameter_value as JSON #593

@suvayu

Description

@suvayu

Currently creating the parameter_value as JSON essentially "reimplements" by crafting the dictionaries by hand. Refactor it to use the Pydantic dataclasses, see: spinedb_api/parameter_value.py::to_list.

Existing tests should already cover this code, so a refactor should not break any tests.

Error handling

Parse pydantic errors to something friendlier, and raise ParameterValueFormatError.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions