Skip to content

Remove the temporary Published* aliases from models_importstab.py #439

Description

@candleindark

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions