oasislmf.computation.generate.doc¶
Classes¶
Generates Model Documentation from schema provided in the model config file |
Module Contents¶
- class oasislmf.computation.generate.doc.GenerateModelDocumentation(**kwargs)[source]¶
Bases:
oasislmf.computation.base.ComputationStepGenerates Model Documentation from schema provided in the model config file
- validate_doc_schema(schema_path, docjson_path)[source]¶
Validates docjson_path file with schema_path file
- Parameters:
schema_path (str | os.PathLike) – Schema path file
docjson_path (str | os.PathLike) – Documentation JSON path file
- Returns:
Json data loaded as a dictionary
- Return type:
docjson (Dict)
- json_to_mdtxt(json_data, full_schema, data_path, doc_out_dir)[source]¶
Convert json data to markdown text with schemas provided
- Parameters:
json_data (dict) – Json data as dictionary
full_schema (dict) – Full schema file as dictionary
data_path (str | os.PathLike) – Path to data folder for any relative file paths
doc_out_dir (str | os.PathLike) – Path to documentation file output folder for any relative file paths