Skip to content
Snippets Groups Projects
Commit 5ae24891 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DOC: fix doc strings

parent b26a08ba
No related branches found
No related tags found
4 merge requests!100WIP: Filling XLSX: Seems to be working.,!94ENH: add framework for converting json schema into table templates,!93Filling XLSX: Everything except multiple choice.,!92ENH: xlsx template generator
Pipeline #48092 failed
......@@ -38,6 +38,7 @@ class ColumnType(Enum):
SCALAR = 1
LIST = 2
FOREIGN = 3
IGNORE = 3
class RowType(Enum):
......@@ -62,20 +63,20 @@ class TableTemplateGenerator(ABC):
elements of the path within the JSON where the key is needed. Suppose we want
to distinguis Persons that are referenced by Trainings, foreign_keys must at
least contain the following: {"Training": {"Person": [key1, key2]}}.
Values wihtin the dicts can be a list representing the keys, a tuple where
the first element is the list representing the keys and the second elment is
a dict that allows to set further foreign keys at lower depth. The third
possibility is a dict. In that case no foreign keys exist at that level (
e.g. in the above example there is no foreign key for the path ["Training"].
Values wihtin the dicts can be a list representing the keys or
a dict that allows to set further foreign keys at lower depth.
In latter case if foreign keys exist at that level (
e.g. in the above example there might be further levels below "Person".),
then the keys can be set using the special "__this__" key.
Example: {"Training": {"__this__": ["date"], "Person": [key1, key2]}}
Here, "date" is the sole key for Training.
"""
pass
def _generate_sheets_from_schema(self, schema: dict, foreign_keys: dict = None
) -> dict[str, dict[str, tuple[str, list]]]:
) -> dict[str, dict[str, list]]:
""" generates a sheet definition from a given JSON schema
Parameters
----------
schema: dict
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment