Skip to content

Commit 896d52b

Browse files
committed
build(hatch-env): provide script to translate dandischema/models.yaml
Provide script to translate `dandischema/models.yaml` back to Pydantic models and store them in `dandischema/models.py`
1 parent d87a5e4 commit 896d52b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ python = "3.10"
6565
# Env for auto converting `dandischema.models` to LinkML schema and back to Pydantic models
6666
[tool.hatch.envs.linkml-auto-converted]
6767
dependencies = [
68+
"black", # This allows `gen-pydantic` to format the generated Pydantic models with Black formatting
6869
"pydantic2linkml @ git+https://github.com/dandi/pydantic2linkml.git"
6970
]
7071
[tool.hatch.envs.linkml-auto-converted.scripts]
7172
2linkml = "pydantic2linkml -l INFO -O dandischema/models_overlay.yaml -o dandischema/models.yaml dandischema.models"
73+
2pydantic = "gen-pydantic --black dandischema/models.yaml > dandischema/models.py"
7274

7375
[tool.setuptools.packages.find]
7476
namespaces = true

0 commit comments

Comments
 (0)