spacetelescope / roman_datamodels

Datamodel support for the roman calibration pipeline
https://roman-datamodels.readthedocs.io
Other
7 stars 21 forks source link

Unable to save `TvacModel` #362

Closed braingram closed 2 months ago

braingram commented 2 months ago

I attempted to generate and save a TvacModel based off the test_tvac_model.

import roman_datamodels.maker_utils as mk, roman_datamodels.datamodels as rdm
m = rdm.TvacModel(mk.mk_tvac())
m.save("foo.asdf")

However running the above code produces a ValidationError

ValidationError: While validating filename the following error occurred:
mismatched tags, wanted 'asdf://stsci.edu/datamodels/roman/tags/tvac/filename-1.0.0', got 'asdf://stsci.edu/datamodels/roman/tags/filename-1.0.0'

Failed validating 'tag' in schema:
    {'$schema': 'http://stsci.edu/schemas/asdf-schema/0.1.0/asdf-schema',
     'description': 'The auto-generated name of this file.\n',
     'tag': 'asdf://stsci.edu/datamodels/roman/tags/tvac/filename-1.0.0',
     'title': 'File Name'}

On instance:
    'foo.asdf'

Using roman_datamodels main and rad 0.20.0 (the version listed in the pyproject.toml).

braingram commented 2 months ago

Fixed in https://github.com/spacetelescope/roman_datamodels/pull/369