Skip to content

Allow custom ValidationPlugins in iter_validate_collection() #68

Description

@turbomam

Collection.iter_validate_collection() hardcodes JsonschemaValidationPlugin. Projects like NMDC have custom ValidationPlugin subclasses (e.g. NmdcSchemaValidationPlugin) that can't be used through linkml-store's validation path.

Proposal: Accept an optional plugins parameter:

def iter_validate_collection(self, plugins=None, **kwargs):
    if plugins is None:
        plugins = [JsonschemaValidationPlugin(closed=True)]
    ...

Note: The MongoDBLoader for linkml validate is being tracked in linkml/linkml#3380 — it belongs in linkml core rather than here, since it's ~15 lines of pymongo and shouldn't require a linkml-store dependency. This issue is about the separate question of making linkml-store's own validation flexible.

Context: microbiomedata/nmdc-schema#2969

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions