spacetelescope / stdatamodels

https://stdatamodels.readthedocs.io
Other
5 stars 24 forks source link

Remove `Datamodel.open_asdf` #299

Open braingram opened 3 months ago

braingram commented 3 months ago

This method: https://github.com/spacetelescope/stdatamodels/blob/4041d5f75c2736f4c4131028232d62573c83d732/src/stdatamodels/model_base.py#L570-L573 duplicates (identical) options to asdf.open (which also uses ignore_version_mismatch=True and ignore_unrecognized_tag=False and is unused outside of the Datamodel class.

braingram commented 3 weeks ago

This is a bit more complicated than expected due to the selective keyword argument handling in open_asdf. The method does not pass kwargs to AsdfFile (but does to asdf.open) so several uses in stdatamodels (none in jwst) silently ignore things in kwargs.