Markdown validation according to templates
vstirbu opened this issue · 0 comments
vstirbu commented
Motivation
The modelcard contains longer descriptions that cannot be properly handled with basic string
properties. Embedding markdown formatted content for these properties has the advantage that the author can use advanced formatting capabilities while still being compatible with the schema type.
We'll follow the approach, pioneered by GitHub with issue template, to guiding data scientist to contribute structured descriptions instead of free form text:
model_details:
version:
name: 1.2.3 # follow semantic versioning
date: 2021-12-15 # release date
documentation: |
<!-- markdown description of the model -->
...
model_parameters:
data:
- name: training
description: |
<!-- markdown description of the dataset -->
...
## Justification
The section provides justification why the training dataset
is enough to fulfill the clinical validation.
...
Templates validation
Develop custom function to validate that the markdown content provided by the developer/data scientist follows the provided template.
The rule can look like:
functions:
- markdownValidator
rules:
my-rule:
message: "{{error}}"
given: "$.documentation"
then:
function: "markdownValidator"
functionOptions:
value: |
## Header 1
...
## Header 2