From 73156fe5872e29b7259f98b9b097367abdd46ef4 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 14 Feb 2024 20:08:39 +0100 Subject: [PATCH] improve reference documentation of data_models.py --- rendercv/data_models.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rendercv/data_models.py b/rendercv/data_models.py index f0f017b..7b72ebe 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -1081,7 +1081,13 @@ def read_input_file( def get_a_sample_data_model(name: str = "John Doe") -> RenderCVDataModel: - """Return a sample data model for new users to start with.""" + """Return a sample data model for new users to start with. + + Args: + name (str, optional): The name of the person. Defaults to "John Doe". + Returns: + RenderCVDataModel: A sample data model. + """ sections = { "summary": [ ( @@ -1282,7 +1288,11 @@ def generate_json_schema() -> dict: def generate_json_schema_file(json_schema_path: pathlib.Path): - """Generate the JSON schema of RenderCV and save it to a file in the `docs`""" + """Generate the JSON schema of RenderCV and save it to a file. + + Args: + json_schema_path (pathlib.Path): The path to save the JSON schema. + """ schema = generate_json_schema() schema_json = json.dumps(schema, indent=2) json_schema_path.write_text(schema_json)