Skip to content
  • David Runge's avatar
    Add conversion of 'desc' files · 84e32326
    David Runge authored
    Add the IntEnmu `FieldType` which tracks the required type for an
    attribute when converting from 'desc' or 'files' files to pydantic
    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.
    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
    Add another test for raising RuntimeError in
    Add a parametrized test for `_desc_data_to_model()`.