Checkout LinkML as an alternative
We should consider LinkML as a possible alternative/supplement to the current approach.
We could define our N4E KH data model as a LinkML YAML file and make use of the various mappings/generators that exist to:
- create human-readable documentation as Markdown files, which are on top mkdocs-ready: https://linkml.io/linkml/generators/markdown.html
- serialize from LinkML to ShEx (for possible server-side validation of the data in the KH in the future): https://linkml.io/linkml/generators/shex.html
- serialize from LinkML to JSON Schema (for server-side validation with Cordra in the current setup): https://linkml.io/linkml/generators/json-schema.html
- create the Python classes to replace the
kh_populator_model
module in kh-populator - by this we could make sure that the server-side model and the model of the Python script are always in sync (we would need to curate the LinkML model by ourselves, though)
I'm sorry to bring this up now after this project has made a good progress regarding automatization of the documentation, but LinkML seems to be evolving quite fast and gaining popularity...
@ralf.klammer and @aurioldegbelo what is your opinion on this?
Plus: For visualization of the whole data model/ schema this generator exists: https://linkml.io/linkml/generators/erdiagram.html which produces output that can be rendered at https://mermaid.live/ for testing, and which is natively supported in markdown in Gitlab: https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts