ontogpt
ontogpt copied to clipboard
Provide alternative to `make` for generating Pydantic of templates
Pydantic versions of the extraction templates are generated through linkml's gen-pydantic
, and that's currently called through the Makefile doing this:
poetry run gen-pydantic --pydantic_version 2 $< > $@
where the input is the yaml version and the output is py. Makefiles are part of the standard practice in linkml projects, but they can be an obstacle for users unfamiliar with make or systems without it.
One alternative is to generate Pydantic classes at runtime (i.e., whenever the template is used). This shouldn't take too long and would avoid the issue of needing to remember to re-make them.