dandi / dandi/dandi-schema

Validating assets calls github repeatedly

Open
#153 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
15
PR merge metrics
No merged PRs in 30d

Description

When calling `dandischema.metadata.validate` on n assets, n requests are made to github to fetch the schema. This makes validating assets take significantly longer than it should. The request also has no default timeout, meaning a call to `validate` can hang indefinitely.

https://github.com/dandi/dandi-schema/blob/d34658cc24c0e3c0c3a88e92bcd29b158241448e/dandischema/metadata.py#L184-L187

Can `dandi-schema` be modified to avoid relying on the network for validation? Either by bundling the schemas from `dandi/schema` into package data, allowing the caller of `validate` to pass a schema directly, or some other means?

FWIW this problem appears to exist with `migrate` as well.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.