Remove these two aliases from dandischema/models_importstab.py as part of the #419 follow-up that drops the deprecated aliases from dandischema/models.py:
PublishedDandiset = Dandiset
PublishedAsset = Asset
The stub carries them only to stay a drop-in replacement for that module, so they should go as soon as it no longer needs to be.
Why the aliases exist
dandischema/models_importstab.py on linkml-conversion is what the conversion pipeline installs as dandischema/models.py on linkml-auto-converted. The aliases mirror the deprecated ones #419 left in dandischema/models.py, and they are needed because metadata.SCHEMA_MAP still names PublishedDandiset and PublishedAsset while publish_model_schemata resolves each key with getattr(models, class_). Without them the pydantic2json stage of ./tools/linkml_conversion fails:
AttributeError: module 'dandischema.models' has no attribute 'PublishedDandiset'
They were added in 54138ad on linkml-conversion and confirmed working by the regeneration at 0ce51b3 on linkml-auto-converted, where models_pydantic/published-dandiset.json and models_pydantic/published-asset.json resolve through the aliases and come out byte-identical to dandiset.json and asset.json.
Remove these two aliases from
dandischema/models_importstab.pyas part of the #419 follow-up that drops the deprecated aliases fromdandischema/models.py:The stub carries them only to stay a drop-in replacement for that module, so they should go as soon as it no longer needs to be.
Why the aliases exist
dandischema/models_importstab.pyonlinkml-conversionis what the conversion pipeline installs asdandischema/models.pyonlinkml-auto-converted. The aliases mirror the deprecated ones #419 left indandischema/models.py, and they are needed becausemetadata.SCHEMA_MAPstill namesPublishedDandisetandPublishedAssetwhilepublish_model_schemataresolves each key withgetattr(models, class_). Without them thepydantic2jsonstage of./tools/linkml_conversionfails:They were added in 54138ad on
linkml-conversionand confirmed working by the regeneration at 0ce51b3 onlinkml-auto-converted, wheremodels_pydantic/published-dandiset.jsonandmodels_pydantic/published-asset.jsonresolve through the aliases and come out byte-identical todandiset.jsonandasset.json.