-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
@schlafly asked about saving a datamodel to an ASDF file. The following does not work:
>> import roman_datamodels.datamodels as rdm
>> m = rdm.ImageModel.create_fake_data()
>> import asdf
>> af = asdf.AsdfFile({"foo": m})
>> af.validate()
ValidationError: <roman_datamodels.datamodels._datamodels.ImageModel object at 0x1091d78f0> is not of type 'object'
Failed validating 'type' in schema:and instead the saving the node is required:
>> af = asdf.AsdfFile({"foo": m._instance})
>> af.validate()However _instance is not public.
This seems like a useful pattern to support with public API.
Metadata
Metadata
Assignees
Labels
No labels