From bad0b2fa7a48b9d55c95c1e906e049a136bb462b Mon Sep 17 00:00:00 2001 From: Daniel Hornung <d.hornung@indiscale.com> Date: Wed, 17 Apr 2024 10:59:45 +0200 Subject: [PATCH] ENH: XLSX table template generator works with multiple choice arrays --- .../table_json_conversion/table_generator.py | 36 ++++++++++---- src/doc/table-json-conversion/specs.md | 37 ++++++++++++-- .../data/multiple_choice_schema.json | 47 ++++++++++++++++++ .../data/multiple_choice_template.xlsx | Bin 0 -> 5992 bytes .../test_table_template_generator.py | 6 +++ 5 files changed, 111 insertions(+), 15 deletions(-) create mode 100644 unittests/table_json_conversion/data/multiple_choice_schema.json create mode 100644 unittests/table_json_conversion/data/multiple_choice_template.xlsx diff --git a/src/caosadvancedtools/table_json_conversion/table_generator.py b/src/caosadvancedtools/table_json_conversion/table_generator.py index 8ca026a8..857100ef 100644 --- a/src/caosadvancedtools/table_json_conversion/table_generator.py +++ b/src/caosadvancedtools/table_json_conversion/table_generator.py @@ -42,7 +42,8 @@ class ColumnType(Enum): SCALAR = 1 LIST = 2 FOREIGN = 3 - IGNORE = 4 + MULTIPLE_CHOICE = 4 + IGNORE = 5 class RowType(Enum): @@ -189,15 +190,16 @@ class TableTemplateGenerator(ABC): # if it is an array, value defs are in 'items' if schema.get('type') == 'array': - if (schema['items'].get('type') == 'object' - and len(path) > 1): # list of references; special treatment + items = schema['items'] + # list of references; special treatment + if (items.get('type') == 'object' and len(path) > 1): # we add a new sheet with columns generated from the subtree of the schema sheetname = p2s(path) if sheetname in sheets: raise ValueError("The schema would lead to two sheets with the same name, " f"which is forbidden: {sheetname}") col_def = self._treat_schema_element( - schema=schema['items'], sheets=sheets, path=path, foreign_keys=foreign_keys, + schema=items, sheets=sheets, path=path, foreign_keys=foreign_keys, level_in_sheet_name=len(path), array_paths=array_paths+[path] # since this level is an array extend the list ) @@ -223,8 +225,23 @@ class TableTemplateGenerator(ABC): # current sheet. return {} + # List of enums: represent as checkbox columns + if (schema.get("uniqueItems") is True and "enum" in items and len(items) == 1): + choices = items["enum"] + assert len(path) >= 1 + prop_name = path[-1] + result = {} + for choice in choices: + name = f"{prop_name}.{choice}" + result[name] = ( + ColumnType.MULTIPLE_CHOICE, + schema.get('description'), + path + [str(choice)], + ) + return result + # it is a list of primitive types -> semicolon separated list - schema = schema['items'] + schema = items ctype = ColumnType.LIST # This should only be the case for "new or existing reference". @@ -247,9 +264,8 @@ class TableTemplateGenerator(ABC): return cols # The schema is a leaf. - description = schema['description'] if 'description' in schema else None # definition of a single column - default_return = {p2s(path[level_in_sheet_name:]): (ctype, description, path)} + default_return = {p2s(path[level_in_sheet_name:]): (ctype, schema.get('description'), path)} if 'type' not in schema and 'enum' in schema: return default_return if 'type' not in schema and 'anyOf' in schema: @@ -350,12 +366,12 @@ class XLSXTemplateGenerator(TableTemplateGenerator): ordered_cols = self._get_ordered_cols(sheetdef) # create other columns - for index, (colname, ct, desc, path) in enumerate(ordered_cols): - ws.cell(1, 2 + index, ct.name) + for index, (colname, coltype, desc, path) in enumerate(ordered_cols): + ws.cell(1, 2 + index, coltype.name) for path_index, el in enumerate(path): ws.cell(2 + path_index, 2 + index, el) ws.cell(header_index, 2 + index, colname) - if ct == ColumnType.FOREIGN: + if coltype == ColumnType.FOREIGN: # Visual highlighting ws.cell(header_index, 2 + index).fill = yellowfill if desc: diff --git a/src/doc/table-json-conversion/specs.md b/src/doc/table-json-conversion/specs.md index 9ae717ca..68c54099 100644 --- a/src/doc/table-json-conversion/specs.md +++ b/src/doc/table-json-conversion/specs.md @@ -46,13 +46,15 @@ XLSX file. These properties have an attribute name and a value. The value can be a. A primitive (text, number, boolean, ...) b. A record c. A list of primitive types -d. A list of records +d. A list of unique enums (multiple choice) +e. A list of records In cases *a.* and *c.*, a cell is created in the column corresponding to the property in the XLSX file. In case *b.*, columns are created for the Properties of the record, where for each of the -Properties the cases *a.* - *d.* are considered recursively. +Properties the cases *a.* - *e.* are considered recursively. Case *d.* leads to a number of +columns, one for each of the possible choices. -For case *d.* however, the two-dimensional structure of an XLSX sheet is not sufficient. Therefore, +For case *e.* however, the two-dimensional structure of an XLSX sheet is not sufficient. Therefore, for such cases, *new* XLSX sheets/tables are created. In these sheets/tables, the referenced records are treated as described above (new columns for the @@ -124,7 +126,31 @@ This entry would be represented in an XLSX sheet with the following content: The list elements are written into the cell separated by `;` (semicolon). If the elements contain the separator `;`, it is escaped with `\\`. -### d. Properties containing lists with references ### +### d. Multiple choice properties ### + +```JSON +{ + "Training": { + "date": "2024-04-17", + "skills": [ + "Planning", + "Evaluation" + ] + } +} +``` + +If the `skills` list is denoted as an `enum` array with `"uniqueItems": true` in the json schema, +this entry would be represented like this in an XLSX: + +| date | skills.Planning | skills.Communication | skills.Evaluation | +|------------|-----------------|----------------------|-------------------| +| 2024-04-17 | x | | x | + +Note that this example assumes that the list of possible choices, as given in the json schema, was +"Planning, Communication, Evaluation". + +### e. Properties containing lists with references ### ```JSON { @@ -176,7 +202,8 @@ special treatment. The following values are used: - ``IGNORE``: This row is ignored. It can be used for explanatory texts or layout. - ``COL_TYPE``: Typically the first row that is not `IGNORE`. It indicates the row that defines the - type of columns (`FOREIGN`, `SCALAR`, `LIST`, `IGNORE`). This row may occur only once. + type of columns (`FOREIGN`, `SCALAR`, `LIST`, `MULTIPLE_CHOICE`, `IGNORE`). This row must occur + exactly once per sheet. - ``PATH``: Indicates that the row is used to define the path within the JSON. These rows are typically hidden for users. diff --git a/unittests/table_json_conversion/data/multiple_choice_schema.json b/unittests/table_json_conversion/data/multiple_choice_schema.json new file mode 100644 index 00000000..75de127e --- /dev/null +++ b/unittests/table_json_conversion/data/multiple_choice_schema.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "properties": { + "Training": { + "type": "object", + "required": [], + "additionalProperties": false, + "title": "Training", + "properties": { + "name": { + "type": "string", + "description": "The name of the Record to be created" + }, + "date": { + "description": "The date of the training.", + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "skills": { + "description": "Skills that are trained.", + "type": "array", + "items": { + "enum": [ + "Planning", + "Communication", + "Evaluation" + ] + }, + "uniqueItems": true + } + } + } + }, + "required": [ + "Training" + ], + "additionalProperties": false, + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/unittests/table_json_conversion/data/multiple_choice_template.xlsx b/unittests/table_json_conversion/data/multiple_choice_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1b4abaadb5b9a2218340f848d93cd2fbf8948908 GIT binary patch literal 5992 zcmaJ_1z42r(xywAr8@+qk&p)IS{gn=LST_*SvsYgB}7VT2|+p~rMnv>B&G8MB+uga zUq_DTKhAr-8`tj4^FA~4+%xy6DIp>O;Ly;}-~f_wx^NHV5$v-u1Z3;P$#MT$9N((a z&V?Cr;1$7g&bJ_emX+6_EZ;!OOZA1pp1e9drz7zAOqu{6GrFQ3>gfCW)--of*`95Y zi&4oaTw5<3p^4GVC%>cr*3pBLe=ys(3r|2!!$FD#5~HekI`Hjz-v=+}SVfHQCqSi9 z_)W82b2w3nP>7+n+tXX~u#F(S-6(v=S321<uaO#qfOa-~_6pP#o?<*Jf6=|6b?s49 z&hgF{XvD_?g<yCrf_y&rFC8RclVWno1M!k*H}-po#%rOpHwpb)$;kxupEn?2(^Hhe zM*JYISI%BQdLMb^{R~1%9%IEw{q*bp4FWYKRJ7n!-qd}V6NV7r;MD%7n{Z(NaJS`j zbAZ^GIyl&HxZBxAYxLUBbKy3fvm!0pu^U;FCnEj@jfGplZRkyjmnE`^0Q5N8=6`Q- zlh(6}I2#F+9%_5$V6k|-@j~f<G>TBalZ^sp0P*dPWP#5>^WIo%ln2pgmbwWHQ&;$Y zd!2(sCOhnuDb$!nR`N=Wa=nY@LDquLl-no(8AUs5sCjCW136-286n)%SWJM)_Vf$p zDO$FHJCpAf06|-4-%rn9qMAxT7|v?&qd`TWCk!I4SRRd5VkfDVOfNPDjGM-8tsA2@ zL(Sf3xDF_Cu&d>~74zwBmV!>;CB=In%b{(y)~WtLl%xk~kV0ypa_~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DiE^W7+6n=c()EIQD7+2#1YnkT+biEmSI zeo3&WK7!qU-j{)tgS|7z-q~2o0}OI9yx&)o)}U%T4WQ+q)UqzMZKIWB+#XdNTHoQp zk5<ZF;*B)(_0}tE5|mQyq_-OW#jAzWh~}N0dD^E|p)74Eqk9y-nzB<?A4L-z)tC+M zJ7`7cl%JAhDMYZa@!7K=0UiGj*fxkPS{QbZ|9)wsWXfzXhTpU9?k$t7LzSTFvnDaV zi;YoV=mTj%?=H6Y%UP@0i_{Rz?wSZtr|x6WQD7R9-1GFa>BRY(Ydi#&;1?~y?=rkD zG12m%p)pq`8g9TlK&ht%(wd~Vxfrz4rfBX^f5gOE<71?CUluV`e3$BN+2B3y8GcpT zBn2c6Hu=J5&<oc(q?`Fw8_sB|POtofB;}}^uR$QWeiQAD)G^Ake5Eo9fBCBTN)F}u zEyb<XX-PKGMP=<b9~?1%pM5cEc=6h~x<ejafrSpY{V)|E4Z@Dh-FLSL|I6J8+$AAY z-$H%^!P52FWA;JSBX!wSW6w+U`yj0d*W#GN5^v%s*uo<K;C{_CACB?vXPW;h4<?*y zO8=?&aFBC9<@+T}u%&*R`Tef^kO1D#dVYx!j26O_e@%XVSAEzP-7~~rVut$fb^nVm z{%+-A3vu5<{gN=upH}`yL-o6zhjr|};rJ!luzlTc<oEXDcMA_e^}gQy5)jO-|5g2d zSAPgB_sIK8$Y9p~t^R*F{JZwU<9iQ2zeF3>b^crX7Zm+&;9+Y0rvY}@*Z=3tt0^I) R+^>QGyZm5vWbCKc{slEBAgTZW literal 0 HcmV?d00001 diff --git a/unittests/table_json_conversion/test_table_template_generator.py b/unittests/table_json_conversion/test_table_template_generator.py index 8fc7b216..cefc792b 100644 --- a/unittests/table_json_conversion/test_table_template_generator.py +++ b/unittests/table_json_conversion/test_table_template_generator.py @@ -267,6 +267,12 @@ def test_model_with_indirect_reference(): foreign_keys={"Wrapper": ["Training.name", "Training.url"]}, outfile=None) +def test_model_with_multiple_choice(): + _compare_generated_to_known_good( + schema_file=rfp("data/multiple_choice_schema.json"), + known_good=rfp("data/multiple_choice_template.xlsx"), + outfile=None) + def test_exceptions(): # Foreign keys must be lists -- GitLab