-
David Runge authored
repo_management/defaults.py: Add the IntEnmu `FieldType` which tracks the required type for an attribute when converting from 'desc' or 'files' files to pydantic models. Extend the DESC_JSON and FILES_JSON globals by introducing a dict per key, that describes the name and the required type, when converting to pydantic models. repo_management/convert.py: Rename `_files_data_to_dict()` to `_read_files_data_to_model()` and return a pydantic model (`models.Files`) instead of a custom dict. Add `_desc_data_to_model()` which allows for conversion of a 'desc' data file (represented as io.StringIO) to a pydantic model (`models.PackageDesc`). tests/test_convert.py: Add another test for raising RuntimeError in `_read_files_data_to_model()`. Add a parametrized test for `_desc_data_to_model()`.