From d4183d54b01061027cacbca46aded50f0f04cf9d Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Thu, 2 Nov 2023 16:40:44 +0100 Subject: [PATCH] DOC: Better docstrings. --- src/caosadvancedtools/models/parser.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/caosadvancedtools/models/parser.py b/src/caosadvancedtools/models/parser.py index 25b5727c..ba63c5cd 100644 --- a/src/caosadvancedtools/models/parser.py +++ b/src/caosadvancedtools/models/parser.py @@ -141,7 +141,11 @@ class JsonSchemaDefinitionError(RuntimeError): def parse_model_from_yaml(filename, existing_model: Optional[dict] = None): - """Shortcut if the Parser object is not needed. + """Parse a data model from a YAML file. + +This is a convenience function if the Parser object is not needed, it calls +``Parser.parse_model_from_yaml(...)`` internally. + Parameters ---------- @@ -155,7 +159,10 @@ existing_model : dict, optional def parse_model_from_string(string, existing_model: Optional[dict] = None): - """Shortcut if the Parser object is not needed. + """Parse a data model from a YAML string + +This is a convenience function if the Parser object is not needed, it calls +``Parser.parse_model_from_string(...)`` internally. Parameters ---------- -- GitLab