Skip to content

Commit db7be48

Browse files
committed
ENH: add 2 hatch specs for conversions into jsonschema for comparisons
1 parent b688b3b commit db7be48

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ dependencies = [
7575
[tool.hatch.envs.linkml-auto-converted.scripts]
7676
2linkml = "pydantic2linkml -l INFO -M dandischema/models_merge.yaml -O dandischema/models_overlay.yaml dandischema.models | sed -e 's,0x[0-9a-ef]*,0xADDRESS,g' -E -e 's,([^[:space:]]+):[0-9]+,\\1:NUMBER,g' | tools/linkml_conversion_tools/sanitize-yaml > dandischema/models.yaml"
7777
2pydantic = "gen-pydantic --black dandischema/models.yaml | sed -E -e 's,[a-z]+COLON,,g' > dandischema/models_linkml.py"
78+
2json = "d=dandischema/models_linkml; rm -rf $d && mkdir -p $d && for t in Dandiset Asset PublishedDandiset PublishedAsset; do gen-json-schema -t $t dandischema/models.yaml >| $d/$t.json; done"
79+
pydantic2json = "d=dandischema/models_pydantic; rm -rf $d && mkdir -p $d && python tools/pubschemata.py $d && mv $d/*/*json $d/"
7880

7981
[tool.setuptools.packages.find]
8082
namespaces = true

0 commit comments

Comments
 (0)