From 45cb7e4e347866a3e179fabe942f99f13303f511 Mon Sep 17 00:00:00 2001 From: cre-os Date: Tue, 18 Feb 2025 08:54:00 +0100 Subject: [PATCH 1/3] wip --- .../junit10/junit10_source_tree_version0.txt | 240 +++++++++++++ .../junit10/junit10_source_tree_version1.txt | 240 +++++++++++++ .../junit10/junit10_target_tree_version0.txt | 239 +++++++++++++ .../junit10/junit10_target_tree_version1.txt | 240 +++++++++++++ tests/sample_models/models.py | 16 + .../orders/orders_source_tree_version0.txt | 50 +++ .../orders/orders_source_tree_version1.txt | 50 +++ .../orders/orders_source_tree_version2.txt | 50 +++ .../orders/orders_target_tree_version0.txt | 42 +++ .../orders/orders_target_tree_version1.txt | 44 +++ .../orders/orders_target_tree_version2.txt | 42 +++ .../table1/table1_source_tree_version0.txt | 321 ++++++++++++++++++ .../table1/table1_source_tree_version1.txt | 321 ++++++++++++++++++ .../table1/table1_target_tree_version0.txt | 246 ++++++++++++++ .../table1/table1_target_tree_version1.txt | 246 ++++++++++++++ 15 files changed, 2387 insertions(+) create mode 100644 tests/sample_models/junit10/junit10_source_tree_version0.txt create mode 100644 tests/sample_models/junit10/junit10_source_tree_version1.txt create mode 100644 tests/sample_models/junit10/junit10_target_tree_version0.txt create mode 100644 tests/sample_models/junit10/junit10_target_tree_version1.txt create mode 100644 tests/sample_models/orders/orders_source_tree_version0.txt create mode 100644 tests/sample_models/orders/orders_source_tree_version1.txt create mode 100644 tests/sample_models/orders/orders_source_tree_version2.txt create mode 100644 tests/sample_models/orders/orders_target_tree_version0.txt create mode 100644 tests/sample_models/orders/orders_target_tree_version1.txt create mode 100644 tests/sample_models/orders/orders_target_tree_version2.txt create mode 100644 tests/sample_models/table1/table1_source_tree_version0.txt create mode 100644 tests/sample_models/table1/table1_source_tree_version1.txt create mode 100644 tests/sample_models/table1/table1_target_tree_version0.txt create mode 100644 tests/sample_models/table1/table1_target_tree_version1.txt diff --git a/tests/sample_models/junit10/junit10_source_tree_version0.txt b/tests/sample_models/junit10/junit10_source_tree_version0.txt new file mode 100644 index 0000000..559c674 --- /dev/null +++ b/tests/sample_models/junit10/junit10_source_tree_version0.txt @@ -0,0 +1,240 @@ +error[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +failure[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +flakyError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +flakyFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string +property[1, 1]: + name[0, 1]: string + value[0, 1]: string +rerunError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +rerunFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +system-err[1, 1]: string +system-out[1, 1]: string +testcase[1, 1]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string +testsuite[1, 1] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string +testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_source_tree_version1.txt b/tests/sample_models/junit10/junit10_source_tree_version1.txt new file mode 100644 index 0000000..559c674 --- /dev/null +++ b/tests/sample_models/junit10/junit10_source_tree_version1.txt @@ -0,0 +1,240 @@ +error[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +failure[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +flakyError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +flakyFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string +property[1, 1]: + name[0, 1]: string + value[0, 1]: string +rerunError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +rerunFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +system-err[1, 1]: string +system-out[1, 1]: string +testcase[1, 1]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string +testsuite[1, 1] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string +testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_target_tree_version0.txt b/tests/sample_models/junit10/junit10_target_tree_version0.txt new file mode 100644 index 0000000..7049662 --- /dev/null +++ b/tests/sample_models/junit10/junit10_target_tree_version0.txt @@ -0,0 +1,239 @@ +error[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +failure[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +flakyError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +flakyFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string +property[1, 1]: + name[0, 1]: string + value[0, 1]: string +rerunError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +rerunFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +system-err[1, 1]: string +system-out[1, 1]: string +testcase[1, 1]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string +testsuite[1, 1] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string +testsuites_name[0, 1]: string +testsuites_time[0, 1]: string +testsuites_tests[0, 1]: string +testsuites_failures[0, 1]: string +testsuites_errors[0, 1]: string +testsuites_testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_target_tree_version1.txt b/tests/sample_models/junit10/junit10_target_tree_version1.txt new file mode 100644 index 0000000..559c674 --- /dev/null +++ b/tests/sample_models/junit10/junit10_target_tree_version1.txt @@ -0,0 +1,240 @@ +error[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +failure[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +flakyError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +flakyFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string +property[1, 1]: + name[0, 1]: string + value[0, 1]: string +rerunError[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +rerunFailure[1, 1]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string +skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string +system-err[1, 1]: string +system-out[1, 1]: string +testcase[1, 1]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string +testsuite[1, 1] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string +testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/models.py b/tests/sample_models/models.py index bda579c..965b1db 100644 --- a/tests/sample_models/models.py +++ b/tests/sample_models/models.py @@ -213,6 +213,22 @@ def _generate_models_output(): f.write("```mermaid\n") f.write(model.get_entity_rel_diagram(text_context=False)) f.write("\n```") + with open( + os.path.join( + os.path.dirname(xsd_path), + f"{model_config['id']}_source_tree_version{i}.txt", + ), + "wt", + ) as f: + f.write(model.source_tree) + with open( + os.path.join( + os.path.dirname(xsd_path), + f"{model_config['id']}_target_tree_version{i}.txt", + ), + "wt", + ) as f: + f.write(model.target_tree) if __name__ == "__main__": diff --git a/tests/sample_models/orders/orders_source_tree_version0.txt b/tests/sample_models/orders/orders_source_tree_version0.txt new file mode 100644 index 0000000..533be5e --- /dev/null +++ b/tests/sample_models/orders/orders_source_tree_version0.txt @@ -0,0 +1,50 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version1.txt b/tests/sample_models/orders/orders_source_tree_version1.txt new file mode 100644 index 0000000..533be5e --- /dev/null +++ b/tests/sample_models/orders/orders_source_tree_version1.txt @@ -0,0 +1,50 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version2.txt b/tests/sample_models/orders/orders_source_tree_version2.txt new file mode 100644 index 0000000..533be5e --- /dev/null +++ b/tests/sample_models/orders/orders_source_tree_version2.txt @@ -0,0 +1,50 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version0.txt b/tests/sample_models/orders/orders_target_tree_version0.txt new file mode 100644 index 0000000..bd18052 --- /dev/null +++ b/tests/sample_models/orders/orders_target_tree_version0.txt @@ -0,0 +1,42 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product_name[1, 1]: string + product_version[1, 1]: string + product_features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + product_features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version1.txt b/tests/sample_models/orders/orders_target_tree_version1.txt new file mode 100644 index 0000000..e5e186f --- /dev/null +++ b/tests/sample_models/orders/orders_target_tree_version1.txt @@ -0,0 +1,44 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product_name[1, 1]: string + product_version[1, 1]: string + product_features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + product_features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version2.txt b/tests/sample_models/orders/orders_target_tree_version2.txt new file mode 100644 index 0000000..7e354ae --- /dev/null +++ b/tests/sample_models/orders/orders_target_tree_version2.txt @@ -0,0 +1,42 @@ +batch_id[0, 1]: string +version[1, 1]: int +shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson_name_attr[0, 1]: string + orderperson_name[1, 1]: string + orderperson_address[1, 1]: string + orderperson_city[1, 1]: string + orderperson_zip_codingSystem[0, 1]: string + orderperson_zip_value[0, 1]: string + orderperson_country[1, 1]: string + orderperson_phoneNumber[0, None]: string + orderperson_companyId_type[0, 1]: string + orderperson_companyId_value[0, 1]: string + orderperson_coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_source_tree_version0.txt b/tests/sample_models/table1/table1_source_tree_version0.txt new file mode 100644 index 0000000..07d2687 --- /dev/null +++ b/tests/sample_models/table1/table1_source_tree_version0.txt @@ -0,0 +1,321 @@ +reportingEntityID[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string +contractList[0, 1]: + contract[1, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time +OrderList[0, 1]: + OrderReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[1, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId[1, 1]: + uniqueOrderIdentifier[1, 1]: string + previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[1, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string +TradeList[0, 1]: + TradeReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[0, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[0, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier[1, 1]: + uniqueTransactionIdentifier[1, 1]: string + additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_source_tree_version1.txt b/tests/sample_models/table1/table1_source_tree_version1.txt new file mode 100644 index 0000000..07d2687 --- /dev/null +++ b/tests/sample_models/table1/table1_source_tree_version1.txt @@ -0,0 +1,321 @@ +reportingEntityID[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string +contractList[0, 1]: + contract[1, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time +OrderList[0, 1]: + OrderReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[1, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId[1, 1]: + uniqueOrderIdentifier[1, 1]: string + previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[1, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string +TradeList[0, 1]: + TradeReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[0, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[0, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier[1, 1]: + uniqueTransactionIdentifier[1, 1]: string + additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_target_tree_version0.txt b/tests/sample_models/table1/table1_target_tree_version0.txt new file mode 100644 index 0000000..63fb4e7 --- /dev/null +++ b/tests/sample_models/table1/table1_target_tree_version0.txt @@ -0,0 +1,246 @@ +reportingEntityID_type[1, 1]: string +reportingEntityID_value[1, 1]: string +contractList_contract[0, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time +OrderList_OrderReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId_uniqueOrderIdentifier[1, 1]: string + orderId_previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[1, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + contractInfo_legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string +TradeList_TradeReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant_type[0, 1]: string + otherMarketParticipant_value[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[0, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string + uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_target_tree_version1.txt b/tests/sample_models/table1/table1_target_tree_version1.txt new file mode 100644 index 0000000..bd2f775 --- /dev/null +++ b/tests/sample_models/table1/table1_target_tree_version1.txt @@ -0,0 +1,246 @@ +reportingEntityID_type[1, 1]: string +reportingEntityID_value[1, 1]: string +contract[0, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time +OrderList_OrderReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId_uniqueOrderIdentifier[1, 1]: string + orderId_previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[1, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + contractInfo_legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string +TradeList_TradeReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant_type[0, 1]: string + otherMarketParticipant_value[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[0, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string + uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file From 76d9031b464506d1e567d841277db041fec7f953 Mon Sep 17 00:00:00 2001 From: cre-os Date: Wed, 12 Mar 2025 12:56:22 +0100 Subject: [PATCH 2/3] Add static types for model config Add runtime check for model config Fix missing root in source_tree and target_tree --- pyproject.toml | 1 + src/xml2db/__init__.py | 2 +- src/xml2db/document.py | 3 +- src/xml2db/exceptions.py | 14 - src/xml2db/model.py | 115 ++-- src/xml2db/model_config.py | 146 +++++ src/xml2db/table/__init__.py | 6 +- src/xml2db/table/duplicated_table.py | 1 + src/xml2db/table/relations.py | 3 +- src/xml2db/table/reused_table.py | 2 +- src/xml2db/table/table.py | 52 +- src/xml2db/table/transformed_table.py | 2 +- src/xml2db/xml_converter.py | 6 +- .../junit10/junit10_source_tree_version0.txt | 195 ++++--- .../junit10/junit10_source_tree_version1.txt | 195 ++++--- .../junit10/junit10_target_tree_version0.txt | 319 +++++----- .../junit10/junit10_target_tree_version1.txt | 195 ++++--- .../orders/orders_source_tree_version0.txt | 99 ++-- .../orders/orders_source_tree_version1.txt | 99 ++-- .../orders/orders_source_tree_version2.txt | 99 ++-- .../orders/orders_target_tree_version0.txt | 85 +-- .../orders/orders_target_tree_version1.txt | 89 +-- .../orders/orders_target_tree_version2.txt | 83 +-- .../table1/table1_source_tree_version0.txt | 551 +++++++++--------- .../table1/table1_source_tree_version1.txt | 551 +++++++++--------- .../table1/table1_target_tree_version0.txt | 359 ++++++------ .../table1/table1_target_tree_version1.txt | 359 ++++++------ 27 files changed, 1871 insertions(+), 1760 deletions(-) delete mode 100644 src/xml2db/exceptions.py create mode 100644 src/xml2db/model_config.py diff --git a/pyproject.toml b/pyproject.toml index dec8581..38aefc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ "sqlalchemy>1.4", "xmlschema>=3.3.2", "lxml>=5.1.0", + "typing-extensions>=4; python_version<'3.11'" ] [project.optional-dependencies] diff --git a/src/xml2db/__init__.py b/src/xml2db/__init__.py index ee76143..2eb4d5d 100644 --- a/src/xml2db/__init__.py +++ b/src/xml2db/__init__.py @@ -1,5 +1,5 @@ -from .model import DataModel from .document import Document +from .model import DataModel from .table import ( DataModelTable, DataModelTableReused, diff --git a/src/xml2db/document.py b/src/xml2db/document.py index 5471737..cc4ddcf 100644 --- a/src/xml2db/document.py +++ b/src/xml2db/document.py @@ -4,10 +4,11 @@ from io import BytesIO from typing import Union, TYPE_CHECKING from zoneinfo import ZoneInfo + +from lxml import etree from sqlalchemy import Column, Table, text, select from sqlalchemy.engine import Connection from sqlalchemy.sql.expression import TextClause -from lxml import etree if TYPE_CHECKING: from .model import DataModel diff --git a/src/xml2db/exceptions.py b/src/xml2db/exceptions.py deleted file mode 100644 index 8ca7789..0000000 --- a/src/xml2db/exceptions.py +++ /dev/null @@ -1,14 +0,0 @@ -class DataModelConfigError(Exception): - """An exception to raise when model config provided by the user is erroneous""" - - pass - - -def check_type(src, key, exp_type, default): - if exp_type.__name__ == "callable": - if key in src and not callable(src[key]): - raise DataModelConfigError(f"'{key}' must be callable") - else: - if key in src and not isinstance(src[key], exp_type): - raise DataModelConfigError(f"'{key}' must be a {exp_type.__name__}") - return src.get(key, default) diff --git a/src/xml2db/model.py b/src/xml2db/model.py index 3038189..6f00dd1 100644 --- a/src/xml2db/model.py +++ b/src/xml2db/model.py @@ -1,21 +1,25 @@ import logging import os from datetime import datetime +from graphlib import TopologicalSorter from io import BytesIO from typing import Iterable, Union from uuid import uuid4 -import hashlib -import xmlschema import sqlalchemy +import xmlschema from lxml import etree from sqlalchemy import MetaData, create_engine, inspect -from sqlalchemy.sql.ddl import CreateIndex, CreateTable from sqlalchemy.exc import ProgrammingError -from graphlib import TopologicalSorter +from sqlalchemy.sql.ddl import CreateIndex, CreateTable from .document import Document -from .exceptions import DataModelConfigError, check_type +from .model_config import ( + DataModelConfigError, + DataModelConfigType, + TableConfigType, + validate_model_config, +) from .table import ( DataModelTableReused, DataModelTableDuplicated, @@ -73,28 +77,13 @@ def __init__( short_name: str = "DocumentRoot", long_name: str = None, base_url: str = None, - model_config: dict = None, + model_config: DataModelConfigType = None, connection_string: str = None, db_engine: sqlalchemy.Engine = None, db_type: str = None, db_schema: str = None, temp_prefix: str = None, ): - self.model_config = self._validate_config(model_config) - self.tables_config = model_config.get("tables", {}) if model_config else {} - - xsd_file_name = xsd_file - if base_url is None: - base_url = os.path.normpath(os.path.dirname(xsd_file)) - xsd_file_name = os.path.basename(xsd_file) - - self.xml_schema = xmlschema.XMLSchema(xsd_file_name, base_url=base_url) - self.lxml_schema = etree.XMLSchema(etree.parse(xsd_file)) - - self.xml_converter = XMLConverter(data_model=self) - self.data_flow_name = short_name - self.data_flow_long_name = long_name - if connection_string is None and db_engine is None: logger.warning( "DataModel created without connection string cannot do actual imports" @@ -117,6 +106,20 @@ def __init__( ) self.db_type = self.engine.dialect.name + self.model_config = validate_model_config(model_config, self.db_type) + + xsd_file_name = xsd_file + if base_url is None: + base_url = os.path.normpath(os.path.dirname(xsd_file)) + xsd_file_name = os.path.basename(xsd_file) + + self.xml_schema = xmlschema.XMLSchema(xsd_file_name, base_url=base_url) + self.lxml_schema = etree.XMLSchema(etree.parse(xsd_file)) + + self.xml_converter = XMLConverter(data_model=self) + self.data_flow_name = short_name + self.data_flow_long_name = long_name + self.db_schema = db_schema self.temp_prefix = str(uuid4())[:8] if temp_prefix is None else temp_prefix @@ -135,30 +138,6 @@ def __init__( self._build_model() - def _validate_config(self, cfg): - if cfg is None: - cfg = {} - model_config = { - key: check_type(cfg, key, exp_type, default) - for key, exp_type, default in [ - ("as_columnstore", bool, False), - ("row_numbers", bool, False), - ("document_tree_hook", callable, None), - ("document_tree_node_hook", callable, None), - ("record_hash_column_name", str, "xml2db_record_hash"), - ("record_hash_constructor", callable, hashlib.sha1), - ("record_hash_size", int, 20), - ("metadata_columns", list, []), - ] - } - if model_config["as_columnstore"] and self.db_type == "mssql": - model_config["as_columnstore"] = False - logger.info( - "Clustered columnstore indexes are only supported with MS SQL Server database, noop" - ) - - return model_config - @property def fk_ordered_tables( self, @@ -179,6 +158,7 @@ def _create_table_model( self, table_name: str, type_name: str, + table_config: TableConfigType, is_root_table: bool = False, is_virtual_node: bool = False, ) -> Union[DataModelTableReused, DataModelTableDuplicated]: @@ -187,13 +167,13 @@ def _create_table_model( Args: table_name: name of the table type_name: type of the table + table_config: dict config for the table is_root_table: is this table the root table? is_virtual_node: was this table created to store multiple root elements? Returns: A data model instance. """ - table_config = self.tables_config.get(table_name, {}) if table_config.get("reuse", True): return DataModelTableReused( table_name, @@ -230,7 +210,7 @@ def _build_model(self): ) self.root_table = root_table.type_name # compute a text representation of the original data model and store it - self.source_tree = "\n".join(self._repr_tree(root_table)) + self.source_tree = str(root_table) # check user-provided configuration for tables for tb_config in self.model_config.get("tables", {}): if tb_config not in self.names_types_map: @@ -245,7 +225,7 @@ def _build_model(self): key: tb for key, tb in self.tables.items() if hasattr(tb, "keep_table") } # compute a text representation of the simplified data model and store it - self.target_tree = "\n".join(self._repr_tree(root_table)) + self.target_tree = str(root_table) # add parent table information on each table when it is not reused # raises an error if a table is not configured as "reused" and have more than 1 parent table for tb in self.tables.values(): @@ -319,12 +299,30 @@ def _parse_tree(self, parent_node: xmlschema.XsdElement, nodes_path: list = None while "_".join([parent_name, str(i)]) in self.names_types_map: i += 1 parent_name = "_".join([parent_name, str(i)]) + + table_config = self.model_config["tables"].get(parent_name, {}) + + # validate fields config (raise if useless config is provided) + children_names = {child.local_name for child in parent_node} + attributes_names = set(parent_node.attributes.keys()) + if "product21" in table_config.get("fields", {}): + print("ok") + unused_fields_config = set( + table_config.get("fields", {}).keys() + ) - children_names.union(attributes_names) + if len(unused_fields_config) > 0: + raise DataModelConfigError( + f"config provided for field '{unused_fields_config.pop()}' for table '{parent_name}'" + " while this field does not exist in this table" + ) + self.names_types_map[parent_name] = parent_type # create a new table object associated with the element parent_table = self._create_table_model( parent_name, parent_type, + table_config, len(nodes_path) == 1, isinstance(parent_node, xmlschema.XMLSchema), ) @@ -424,10 +422,7 @@ def get_occurs(particle): ] # go through item attributes and add them as columns, adding a suffix if an element with the same name exists - children_names = None for attrib_name, attrib in parent_node.attributes.items(): - if children_names is None: - children_names = [child.local_name for child in parent_node] ( data_type, min_length, @@ -569,24 +564,6 @@ def get_occurs(particle): return parent_table - def _repr_tree( - self, - parent_table: Union[DataModelTableReused, DataModelTableDuplicated], - ): - """Build a text representation of the data model tree - - Args: - parent_table: the current data model table object - """ - for field_type, name, field in parent_table.fields: - if field_type == "col": - yield f"{field.name}{field.occurs}: {field.data_type}" - else: - mg = " (choice)" if field.other_table.model_group == "choice" else "" - yield f"{field.name}{field.occurs}{mg}:" - for line in self._repr_tree(field.other_table): - yield f" {line}" - def get_entity_rel_diagram(self, text_context: bool = True) -> str: """Build an entity relationship diagram for the data model diff --git a/src/xml2db/model_config.py b/src/xml2db/model_config.py new file mode 100644 index 0000000..83c8cb2 --- /dev/null +++ b/src/xml2db/model_config.py @@ -0,0 +1,146 @@ +import hashlib +import logging +from typing import Callable, Iterable, Union, Any + +from sqlalchemy.types import TypeEngine + +try: + from typing import TypedDict, NotRequired +except ImportError: + from typing_extensions import TypedDict, NotRequired + + +logger = logging.getLogger(__name__) + + +class DataModelConfigError(Exception): + """An exception to raise when model config provided by the user is erroneous""" + + pass + + +def runtime_type_check(src: dict, key: str, exp_type: Any, default: Any): + """Check type of dict member, with default value + + Args: + src: a dict containing member to check + key: the dict key of the member to check + exp_type: expected type for the member + default: default value + + Returns: + The dict member value + """ + if exp_type.__name__ == "callable": + if key in src and not callable(src[key]): + raise DataModelConfigError(f"'{key}' must be callable") + else: + if key in src and not isinstance(src[key], exp_type): + raise DataModelConfigError(f"'{key}' must be a {exp_type.__name__}") + return src.get(key, default) + + +class FieldConfigType(TypedDict): + type: NotRequired[TypeEngine] + transform: NotRequired[Union[str, bool]] + + +class TableConfigType(TypedDict): + fields: NotRequired[dict[str, FieldConfigType]] + choice_transform: NotRequired[bool] + reuse: NotRequired[bool] + extra_args: NotRequired[Union[Iterable, Callable[[], Iterable]]] + + +class DataModelConfigType(TypedDict): + tables: NotRequired[dict[str, TableConfigType]] + as_columnstore: NotRequired[bool] + row_numbers: NotRequired[bool] + document_tree_hook: NotRequired[Callable[[tuple], tuple]] + document_tree_node_hook: NotRequired[Callable[[tuple], tuple]] + record_hash_column_name: NotRequired[str] + record_hash_constructor: NotRequired[Callable] + record_hash_size: NotRequired[int] + metadata_columns: NotRequired[list[dict[str, Any]]] + + +def validate_table_config(cfg: TableConfigType, db_type: str) -> TableConfigType: + """Validate a table dict config + + Args: + cfg: a dict config to validate + db_type: database type + + Returns: + The validated config dict + """ + if cfg is None: + cfg = {} + + config = { + "reuse": runtime_type_check(cfg, "reuse", bool, True), + "as_columnstore": runtime_type_check(cfg, "as_columnstore", bool, False), + } + if "extra_args" in cfg and not ( + isinstance(cfg["extra_args"], list) + or isinstance(cfg["extra_args"], tuple) + or callable(cfg["extra_args"]) + ): + raise DataModelConfigError("extra_args must be a list, a tuple or callable") + config["extra_args"] = cfg.get("extra_args", []) + if "choice_transform" in cfg: + config["choice_transform"] = runtime_type_check( + cfg, "choice_transform", bool, False + ) + + if config["as_columnstore"] and not db_type == "mssql": + config["as_columnstore"] = False + logger.warning( + "Clustered columnstore indexes are only supported with MS SQL Server database" + ) + + config["fields"] = cfg.get("fields", {}) + + return config + + +def validate_model_config( + cfg: DataModelConfigType, db_type: str +) -> DataModelConfigType: + """Validate the model config dict + + Args: + cfg: a dict config to validate + db_type: database type + + Returns: + The validated config dict + + """ + if cfg is None: + cfg = {} + model_config = { + key: runtime_type_check(cfg, key, exp_type, default) + for key, exp_type, default in [ + ("as_columnstore", bool, False), + ("row_numbers", bool, False), + ("document_tree_hook", callable, None), + ("document_tree_node_hook", callable, None), + ("record_hash_column_name", str, "xml2db_record_hash"), + ("record_hash_constructor", callable, hashlib.sha1), + ("record_hash_size", int, 20), + ("metadata_columns", list, []), + ] + } + if model_config["as_columnstore"] and db_type != "mssql": + model_config["as_columnstore"] = False + logger.info( + "Clustered columnstore indexes are only supported with MS SQL Server database, noop" + ) + + model_config["tables"] = { + table_name: validate_table_config(table_cfg, db_type) + for table_name, table_cfg in cfg.get("tables", {}).items() + } + + return model_config diff --git a/src/xml2db/table/__init__.py b/src/xml2db/table/__init__.py index fe51ea1..f5dd58e 100644 --- a/src/xml2db/table/__init__.py +++ b/src/xml2db/table/__init__.py @@ -1,5 +1,5 @@ -from .table import DataModelTable -from .reused_table import DataModelTableReused +from .column import DataModelColumn from .duplicated_table import DataModelTableDuplicated from .relations import DataModelRelation1, DataModelRelationN -from .column import DataModelColumn +from .reused_table import DataModelTableReused +from .table import DataModelTable diff --git a/src/xml2db/table/duplicated_table.py b/src/xml2db/table/duplicated_table.py index 72a5b03..9be6290 100644 --- a/src/xml2db/table/duplicated_table.py +++ b/src/xml2db/table/duplicated_table.py @@ -1,4 +1,5 @@ from typing import Iterable, Any + from sqlalchemy import ( Table, Column, diff --git a/src/xml2db/table/relations.py b/src/xml2db/table/relations.py index 96245d1..245c7e2 100644 --- a/src/xml2db/table/relations.py +++ b/src/xml2db/table/relations.py @@ -1,6 +1,7 @@ +from typing import TYPE_CHECKING, List, Iterable, Any, Union + import sqlalchemy.engine from sqlalchemy import Table, Column, ForeignKey, Integer, Index, select -from typing import TYPE_CHECKING, List, Iterable, Any, Union if TYPE_CHECKING: from .table import DataModelTable diff --git a/src/xml2db/table/reused_table.py b/src/xml2db/table/reused_table.py index ce3d62f..9e7dbbe 100644 --- a/src/xml2db/table/reused_table.py +++ b/src/xml2db/table/reused_table.py @@ -10,8 +10,8 @@ Sequence, ) -from .transformed_table import DataModelTableTransformed from .column import DataModelColumn +from .transformed_table import DataModelTableTransformed class DataModelTableReused(DataModelTableTransformed): diff --git a/src/xml2db/table/table.py b/src/xml2db/table/table.py index 65d831d..5629808 100644 --- a/src/xml2db/table/table.py +++ b/src/xml2db/table/table.py @@ -1,12 +1,13 @@ -from typing import Iterable, List, Any, Union, TYPE_CHECKING import logging +from typing import Iterable, List, Any, Union, TYPE_CHECKING + import sqlalchemy from sqlalchemy import Table from sqlalchemy.schema import CreateTable, CreateIndex from .column import DataModelColumn from .relations import DataModelRelation1, DataModelRelationN -from ..exceptions import DataModelConfigError, check_type +from ..model_config import TableConfigType, validate_table_config if TYPE_CHECKING: from ..model import DataModel @@ -49,7 +50,7 @@ def __init__( is_root_table: bool, is_virtual_node: bool, metadata: sqlalchemy.MetaData, - config: dict, + config: TableConfigType, db_schema: str, temp_prefix: str, data_model: "DataModel", @@ -62,7 +63,7 @@ def __init__( self.is_root_table = is_root_table self.is_virtual_node = is_virtual_node self.model_group = "sequence" - self.config = self._validate_config(config, data_model.db_type) + self.config = validate_table_config(config, data_model.db_type) self.db_schema = db_schema self.temp_prefix = temp_prefix @@ -92,36 +93,6 @@ def __init__( self.temp_table = None self.data_model = data_model - def _validate_config(self, cfg, db_type): - if cfg is None: - cfg = {} - - config = { - "reuse": check_type(cfg, "reuse", bool, True), - "as_columnstore": check_type(cfg, "as_columnstore", bool, False), - } - if "extra_args" in cfg and not ( - isinstance(cfg["extra_args"], list) - or isinstance(cfg["extra_args"], tuple) - or callable(cfg["extra_args"]) - ): - raise DataModelConfigError("extra_args must be a list, a tuple or callable") - config["extra_args"] = cfg.get("extra_args", []) - if "choice_transform" in cfg: - config["choice_transform"] = check_type( - cfg, "choice_transform", bool, False - ) - - if config["as_columnstore"] and not db_type == "mssql": - config["as_columnstore"] = False - logger.warning( - "Clustered columnstore indexes are only supported with MS SQL Server database" - ) - - config["fields"] = cfg.get("fields", {}) - - return config - def add_column( self, name: str, @@ -224,6 +195,19 @@ def add_relation_n(self, name, other_table, occurs, ngroup): self.fields.append(("reln", name, rel)) other_table.parents_n.add(rel) + def __repr__(self): + """Build a text representation of a table recursively""" + lines = [f"{self.name}:"] + for field_type, name, field in self.fields: + if field_type == "col": + lines.append(f" {field.name}{field.occurs}: {field.data_type}") + else: + mg = " (choice)" if field.other_table.model_group == "choice" else "" + lines.append(f" {field.name}{field.occurs}{mg}:") + for line in str(field.other_table).split("\n")[1:]: + lines.append(f" {line}") + return "\n".join(lines) + def compute_dependencies(self) -> None: """Compute the table's dependencies according to foreign keys relationships. diff --git a/src/xml2db/table/transformed_table.py b/src/xml2db/table/transformed_table.py index 031d858..b9ea80e 100644 --- a/src/xml2db/table/transformed_table.py +++ b/src/xml2db/table/transformed_table.py @@ -1,9 +1,9 @@ from typing import Union, List, Tuple -from ..exceptions import DataModelConfigError from .column import DataModelColumn from .relations import DataModelRelation1, DataModelRelationN from .table import DataModelTable +from ..model_config import DataModelConfigError class DataModelTableTransformed(DataModelTable): diff --git a/src/xml2db/xml_converter.py b/src/xml2db/xml_converter.py index 1dbbf8a..4a4ea0a 100644 --- a/src/xml2db/xml_converter.py +++ b/src/xml2db/xml_converter.py @@ -1,11 +1,11 @@ +import logging import typing from datetime import datetime -from typing import Union -import logging -from lxml import etree from io import BytesIO from itertools import zip_longest +from typing import Union +from lxml import etree if typing.TYPE_CHECKING: from .model import DataModel diff --git a/tests/sample_models/junit10/junit10_source_tree_version0.txt b/tests/sample_models/junit10/junit10_source_tree_version0.txt index 559c674..afe50ef 100644 --- a/tests/sample_models/junit10/junit10_source_tree_version0.txt +++ b/tests/sample_models/junit10/junit10_source_tree_version0.txt @@ -1,120 +1,54 @@ -error[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -failure[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -flakyError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -flakyFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -properties[1, 1]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string -property[1, 1]: - name[0, 1]: string - value[0, 1]: string -rerunError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -rerunFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -skipped[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -system-err[1, 1]: string -system-out[1, 1]: string -testcase[1, 1]: - classname[0, 1]: string - name[0, 1]: string - time[0, 1]: string - group[0, 1]: string - skipped[0, None]: +junit10: + error[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - error[0, None]: + failure[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - failure[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - rerunFailure[0, None]: + flakyError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - rerunError[0, None]: + flakyFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyFailure[0, None]: + properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + property[1, 1]: + name[0, 1]: string + value[0, 1]: string + rerunError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyError[0, None]: + rerunFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - system-out[0, None]: string - system-err[0, None]: string -testsuite[1, 1] (choice): - name[0, 1]: string - errors[0, 1]: string - failures[0, 1]: string - skipped[0, 1]: string - tests[0, 1]: string - group[0, 1]: string - time[0, 1]: string - timestamp[0, 1]: string - hostname[0, 1]: string - id[0, 1]: string - package[0, 1]: string - file[0, 1]: string - log[0, 1]: string - url[0, 1]: string - version[0, 1]: string - properties[0, None]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string - testcase[0, None]: + skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + system-err[1, 1]: string + system-out[1, 1]: string + testcase[1, 1]: classname[0, 1]: string name[0, 1]: string time[0, 1]: string @@ -161,15 +95,7 @@ testsuite[1, 1] (choice): value[0, 1]: string system-out[0, None]: string system-err[0, None]: string - system-out[0, None]: string - system-err[0, None]: string -testsuites[1, 1]: - name[0, 1]: string - time[0, 1]: string - tests[0, 1]: string - failures[0, 1]: string - errors[0, 1]: string - testsuite[0, None] (choice): + testsuite[1, 1] (choice): name[0, 1]: string errors[0, 1]: string failures[0, 1]: string @@ -237,4 +163,79 @@ testsuites[1, 1]: system-out[0, None]: string system-err[0, None]: string system-out[0, None]: string - system-err[0, None]: string \ No newline at end of file + system-err[0, None]: string + testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_source_tree_version1.txt b/tests/sample_models/junit10/junit10_source_tree_version1.txt index 559c674..afe50ef 100644 --- a/tests/sample_models/junit10/junit10_source_tree_version1.txt +++ b/tests/sample_models/junit10/junit10_source_tree_version1.txt @@ -1,120 +1,54 @@ -error[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -failure[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -flakyError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -flakyFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -properties[1, 1]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string -property[1, 1]: - name[0, 1]: string - value[0, 1]: string -rerunError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -rerunFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -skipped[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -system-err[1, 1]: string -system-out[1, 1]: string -testcase[1, 1]: - classname[0, 1]: string - name[0, 1]: string - time[0, 1]: string - group[0, 1]: string - skipped[0, None]: +junit10: + error[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - error[0, None]: + failure[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - failure[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - rerunFailure[0, None]: + flakyError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - rerunError[0, None]: + flakyFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyFailure[0, None]: + properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + property[1, 1]: + name[0, 1]: string + value[0, 1]: string + rerunError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyError[0, None]: + rerunFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - system-out[0, None]: string - system-err[0, None]: string -testsuite[1, 1] (choice): - name[0, 1]: string - errors[0, 1]: string - failures[0, 1]: string - skipped[0, 1]: string - tests[0, 1]: string - group[0, 1]: string - time[0, 1]: string - timestamp[0, 1]: string - hostname[0, 1]: string - id[0, 1]: string - package[0, 1]: string - file[0, 1]: string - log[0, 1]: string - url[0, 1]: string - version[0, 1]: string - properties[0, None]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string - testcase[0, None]: + skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + system-err[1, 1]: string + system-out[1, 1]: string + testcase[1, 1]: classname[0, 1]: string name[0, 1]: string time[0, 1]: string @@ -161,15 +95,7 @@ testsuite[1, 1] (choice): value[0, 1]: string system-out[0, None]: string system-err[0, None]: string - system-out[0, None]: string - system-err[0, None]: string -testsuites[1, 1]: - name[0, 1]: string - time[0, 1]: string - tests[0, 1]: string - failures[0, 1]: string - errors[0, 1]: string - testsuite[0, None] (choice): + testsuite[1, 1] (choice): name[0, 1]: string errors[0, 1]: string failures[0, 1]: string @@ -237,4 +163,79 @@ testsuites[1, 1]: system-out[0, None]: string system-err[0, None]: string system-out[0, None]: string - system-err[0, None]: string \ No newline at end of file + system-err[0, None]: string + testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_target_tree_version0.txt b/tests/sample_models/junit10/junit10_target_tree_version0.txt index 7049662..a24616a 100644 --- a/tests/sample_models/junit10/junit10_target_tree_version0.txt +++ b/tests/sample_models/junit10/junit10_target_tree_version0.txt @@ -1,120 +1,54 @@ -error[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -failure[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -flakyError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -flakyFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -properties[1, 1]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string -property[1, 1]: - name[0, 1]: string - value[0, 1]: string -rerunError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -rerunFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -skipped[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -system-err[1, 1]: string -system-out[1, 1]: string -testcase[1, 1]: - classname[0, 1]: string - name[0, 1]: string - time[0, 1]: string - group[0, 1]: string - skipped[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - error[0, None]: +junit10: + error[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - failure[0, None]: + failure[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - rerunFailure[0, None]: + flakyError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - rerunError[0, None]: + flakyFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyFailure[0, None]: + properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + property[1, 1]: + name[0, 1]: string + value[0, 1]: string + rerunError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyError[0, None]: + rerunFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - system-out[0, None]: string - system-err[0, None]: string -testsuite[1, 1] (choice): - name[0, 1]: string - errors[0, 1]: string - failures[0, 1]: string - skipped[0, 1]: string - tests[0, 1]: string - group[0, 1]: string - time[0, 1]: string - timestamp[0, 1]: string - hostname[0, 1]: string - id[0, 1]: string - package[0, 1]: string - file[0, 1]: string - log[0, 1]: string - url[0, 1]: string - version[0, 1]: string - properties[0, None]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string - testcase[0, None]: + skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + system-err[1, 1]: string + system-out[1, 1]: string + testcase[1, 1]: classname[0, 1]: string name[0, 1]: string time[0, 1]: string @@ -161,79 +95,146 @@ testsuite[1, 1] (choice): value[0, 1]: string system-out[0, None]: string system-err[0, None]: string - system-out[0, None]: string - system-err[0, None]: string -testsuites_name[0, 1]: string -testsuites_time[0, 1]: string -testsuites_tests[0, 1]: string -testsuites_failures[0, 1]: string -testsuites_errors[0, 1]: string -testsuites_testsuite[0, None] (choice): - name[0, 1]: string - errors[0, 1]: string - failures[0, 1]: string - skipped[0, 1]: string - tests[0, 1]: string - group[0, 1]: string - time[0, 1]: string - timestamp[0, 1]: string - hostname[0, 1]: string - id[0, 1]: string - package[0, 1]: string - file[0, 1]: string - log[0, 1]: string - url[0, 1]: string - version[0, 1]: string - properties[0, None]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string - testcase[0, None]: - classname[0, 1]: string + testsuite[1, 1] (choice): name[0, 1]: string - time[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string group[0, 1]: string - skipped[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - error[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - failure[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - rerunFailure[0, None]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string - rerunError[0, None]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string - flakyFailure[0, None]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string - flakyError[0, None]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string system-out[0, None]: string system-err[0, None]: string - system-out[0, None]: string - system-err[0, None]: string \ No newline at end of file + testsuites_name[0, 1]: string + testsuites_time[0, 1]: string + testsuites_tests[0, 1]: string + testsuites_failures[0, 1]: string + testsuites_errors[0, 1]: string + testsuites_testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/junit10/junit10_target_tree_version1.txt b/tests/sample_models/junit10/junit10_target_tree_version1.txt index 559c674..afe50ef 100644 --- a/tests/sample_models/junit10/junit10_target_tree_version1.txt +++ b/tests/sample_models/junit10/junit10_target_tree_version1.txt @@ -1,120 +1,54 @@ -error[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -failure[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -flakyError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -flakyFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -properties[1, 1]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string -property[1, 1]: - name[0, 1]: string - value[0, 1]: string -rerunError[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -rerunFailure[1, 1]: - message[0, 1]: string - type[0, 1]: string - stackTrace[0, 1]: string - system-out[0, 1]: string - system-err[0, 1]: string - value[0, 1]: string -skipped[1, 1]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string -system-err[1, 1]: string -system-out[1, 1]: string -testcase[1, 1]: - classname[0, 1]: string - name[0, 1]: string - time[0, 1]: string - group[0, 1]: string - skipped[0, None]: +junit10: + error[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - error[0, None]: + failure[1, 1]: type[0, 1]: string message[0, 1]: string value[0, 1]: string - failure[0, None]: - type[0, 1]: string - message[0, 1]: string - value[0, 1]: string - rerunFailure[0, None]: + flakyError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - rerunError[0, None]: + flakyFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyFailure[0, None]: + properties[1, 1]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + property[1, 1]: + name[0, 1]: string + value[0, 1]: string + rerunError[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - flakyError[0, None]: + rerunFailure[1, 1]: message[0, 1]: string type[0, 1]: string stackTrace[0, 1]: string system-out[0, 1]: string system-err[0, 1]: string value[0, 1]: string - system-out[0, None]: string - system-err[0, None]: string -testsuite[1, 1] (choice): - name[0, 1]: string - errors[0, 1]: string - failures[0, 1]: string - skipped[0, 1]: string - tests[0, 1]: string - group[0, 1]: string - time[0, 1]: string - timestamp[0, 1]: string - hostname[0, 1]: string - id[0, 1]: string - package[0, 1]: string - file[0, 1]: string - log[0, 1]: string - url[0, 1]: string - version[0, 1]: string - properties[0, None]: - property[0, None]: - name[0, 1]: string - value[0, 1]: string - testcase[0, None]: + skipped[1, 1]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + system-err[1, 1]: string + system-out[1, 1]: string + testcase[1, 1]: classname[0, 1]: string name[0, 1]: string time[0, 1]: string @@ -161,15 +95,7 @@ testsuite[1, 1] (choice): value[0, 1]: string system-out[0, None]: string system-err[0, None]: string - system-out[0, None]: string - system-err[0, None]: string -testsuites[1, 1]: - name[0, 1]: string - time[0, 1]: string - tests[0, 1]: string - failures[0, 1]: string - errors[0, 1]: string - testsuite[0, None] (choice): + testsuite[1, 1] (choice): name[0, 1]: string errors[0, 1]: string failures[0, 1]: string @@ -237,4 +163,79 @@ testsuites[1, 1]: system-out[0, None]: string system-err[0, None]: string system-out[0, None]: string - system-err[0, None]: string \ No newline at end of file + system-err[0, None]: string + testsuites[1, 1]: + name[0, 1]: string + time[0, 1]: string + tests[0, 1]: string + failures[0, 1]: string + errors[0, 1]: string + testsuite[0, None] (choice): + name[0, 1]: string + errors[0, 1]: string + failures[0, 1]: string + skipped[0, 1]: string + tests[0, 1]: string + group[0, 1]: string + time[0, 1]: string + timestamp[0, 1]: string + hostname[0, 1]: string + id[0, 1]: string + package[0, 1]: string + file[0, 1]: string + log[0, 1]: string + url[0, 1]: string + version[0, 1]: string + properties[0, None]: + property[0, None]: + name[0, 1]: string + value[0, 1]: string + testcase[0, None]: + classname[0, 1]: string + name[0, 1]: string + time[0, 1]: string + group[0, 1]: string + skipped[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + error[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + failure[0, None]: + type[0, 1]: string + message[0, 1]: string + value[0, 1]: string + rerunFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + rerunError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyFailure[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + flakyError[0, None]: + message[0, 1]: string + type[0, 1]: string + stackTrace[0, 1]: string + system-out[0, 1]: string + system-err[0, 1]: string + value[0, 1]: string + system-out[0, None]: string + system-err[0, None]: string + system-out[0, None]: string + system-err[0, None]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version0.txt b/tests/sample_models/orders/orders_source_tree_version0.txt index 533be5e..a9c69a7 100644 --- a/tests/sample_models/orders/orders_source_tree_version0.txt +++ b/tests/sample_models/orders/orders_source_tree_version0.txt @@ -1,50 +1,51 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson[1, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product[1, 1]: +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string name[1, 1]: string - version[1, 1]: string - features[0, 1]: - intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version1.txt b/tests/sample_models/orders/orders_source_tree_version1.txt index 533be5e..a9c69a7 100644 --- a/tests/sample_models/orders/orders_source_tree_version1.txt +++ b/tests/sample_models/orders/orders_source_tree_version1.txt @@ -1,50 +1,51 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson[1, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product[1, 1]: +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string name[1, 1]: string - version[1, 1]: string - features[0, 1]: - intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version2.txt b/tests/sample_models/orders/orders_source_tree_version2.txt index 533be5e..a9c69a7 100644 --- a/tests/sample_models/orders/orders_source_tree_version2.txt +++ b/tests/sample_models/orders/orders_source_tree_version2.txt @@ -1,50 +1,51 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson[1, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip[1, 1]: - codingSystem[0, 1]: string - value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId[0, 1] (choice): - ace[0, 1]: string - bic[0, 1]: string - lei[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product[1, 1]: +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string name[1, 1]: string - version[1, 1]: string - features[0, 1]: - intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features[0, 1]: + intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version0.txt b/tests/sample_models/orders/orders_target_tree_version0.txt index bd18052..ee2b9e9 100644 --- a/tests/sample_models/orders/orders_target_tree_version0.txt +++ b/tests/sample_models/orders/orders_target_tree_version0.txt @@ -1,42 +1,43 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson[1, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip_codingSystem[0, 1]: string - zip_value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId_type[0, 1]: string - companyId_value[0, 1]: string - coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip_codingSystem[0, 1]: string - zip_value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId_type[0, 1]: string - companyId_value[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product_name[1, 1]: string - product_version[1, 1]: string - product_features_intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - product_features_stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product_name[1, 1]: string + product_version[1, 1]: string + product_features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + product_features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version1.txt b/tests/sample_models/orders/orders_target_tree_version1.txt index e5e186f..11af214 100644 --- a/tests/sample_models/orders/orders_target_tree_version1.txt +++ b/tests/sample_models/orders/orders_target_tree_version1.txt @@ -1,44 +1,45 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson[1, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip_codingSystem[0, 1]: string - zip_value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId_ace[0, 1]: string - companyId_bic[0, 1]: string - companyId_lei[0, 1]: string - coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip_codingSystem[0, 1]: string - zip_value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId_ace[0, 1]: string - companyId_bic[0, 1]: string - companyId_lei[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product_name[1, 1]: string - product_version[1, 1]: string - product_features_intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - product_features_stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson[1, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product_name[1, 1]: string + product_version[1, 1]: string + product_features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + product_features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version2.txt b/tests/sample_models/orders/orders_target_tree_version2.txt index 7e354ae..40700f0 100644 --- a/tests/sample_models/orders/orders_target_tree_version2.txt +++ b/tests/sample_models/orders/orders_target_tree_version2.txt @@ -1,42 +1,43 @@ -batch_id[0, 1]: string -version[1, 1]: int -shiporder[0, None]: - orderid[0, 1]: string - processed_at[0, 1]: dateTime - orderperson_name_attr[0, 1]: string - orderperson_name[1, 1]: string - orderperson_address[1, 1]: string - orderperson_city[1, 1]: string - orderperson_zip_codingSystem[0, 1]: string - orderperson_zip_value[0, 1]: string - orderperson_country[1, 1]: string - orderperson_phoneNumber[0, None]: string - orderperson_companyId_type[0, 1]: string - orderperson_companyId_value[0, 1]: string - orderperson_coordinates[0, 1]: string - shipto[0, 1]: - name_attr[0, 1]: string - name[1, 1]: string - address[1, 1]: string - city[1, 1]: string - zip_codingSystem[0, 1]: string - zip_value[0, 1]: string - country[1, 1]: string - phoneNumber[0, None]: string - companyId_type[0, 1]: string - companyId_value[0, 1]: string - coordinates[0, 1]: string - item[1, None]: - product[1, 1]: +orders: + batch_id[0, 1]: string + version[1, 1]: int + shiporder[0, None]: + orderid[0, 1]: string + processed_at[0, 1]: dateTime + orderperson_name_attr[0, 1]: string + orderperson_name[1, 1]: string + orderperson_address[1, 1]: string + orderperson_city[1, 1]: string + orderperson_zip_codingSystem[0, 1]: string + orderperson_zip_value[0, 1]: string + orderperson_country[1, 1]: string + orderperson_phoneNumber[0, None]: string + orderperson_companyId_type[0, 1]: string + orderperson_companyId_value[0, 1]: string + orderperson_coordinates[0, 1]: string + shipto[0, 1]: + name_attr[0, 1]: string name[1, 1]: string - version[1, 1]: string - features_intfeature[0, None]: - id[1, 1]: string - value[1, 1]: integer - features_stringfeature[0, None]: - id[1, 1]: string - value[1, 1]: string - note[0, 1]: string - quantity[1, 1]: integer - price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + item[1, None]: + product[1, 1]: + name[1, 1]: string + version[1, 1]: string + features_intfeature[0, None]: + id[1, 1]: string + value[1, 1]: integer + features_stringfeature[0, None]: + id[1, 1]: string + value[1, 1]: string + note[0, 1]: string + quantity[1, 1]: integer + price[1, 1]: decimal + currency[1, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_source_tree_version0.txt b/tests/sample_models/table1/table1_source_tree_version0.txt index 07d2687..710da29 100644 --- a/tests/sample_models/table1/table1_source_tree_version0.txt +++ b/tests/sample_models/table1/table1_source_tree_version0.txt @@ -1,131 +1,94 @@ -reportingEntityID[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string -contractList[0, 1]: - contract[1, None]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: +REMITTable1: + reportingEntityID[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + contractList[0, 1]: + contract[1, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + OrderList[0, 1]: + OrderReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[1, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId[1, 1]: + uniqueOrderIdentifier[1, 1]: string + previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time -OrderList[0, 1]: - OrderReport[1, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - traderID[1, 1] (choice): - traderIdForOrganisedMarket[0, 1]: string - traderIdForMarketParticipant[0, 1]: string - beneficiaryIdentification[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - orderId[1, 1]: - uniqueOrderIdentifier[1, 1]: string - previousOrderIdentifier[0, 1]: string - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - triggerDetails[0, 1]: - priceLimit[1, 1]: + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - triggerContractId[0, 1]: string - undisclosedVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - orderDuration[1, 1]: - duration[1, 1]: string - expirationDateTime[0, 1]: dateTime - contractInfo[1, 1] (choice): - contractId[0, 1]: string - legContractId[0, None]: - contractId[1, 1]: string - buySellIndicator[1, 1]: string - contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: - value[1, 1]: decimal - currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - legContract[0, None]: - contract[1, 1]: + unit[1, 1]: string + orderDuration[1, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contract[0, 1]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -162,160 +125,198 @@ OrderList[0, 1]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time - buySellIndicator[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - transactionTime[1, 1]: dateTime - originalEntryTime[0, 1]: dateTime - linkedOrderId[0, None]: string - priceDetails[0, 1]: - price[1, 1]: decimal - priceCurrency[1, 1]: string - notionalAmountDetails[0, 1]: - notionalAmount[1, 1]: decimal - notionalCurrency[1, 1]: string - quantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - totalNotionalContractQuantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity[0, 1]: + legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string -TradeList[0, 1]: - TradeReport[1, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - traderID[0, 1] (choice): - traderIdForOrganisedMarket[0, 1]: string - traderIdForMarketParticipant[0, 1]: string - otherMarketParticipant[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - beneficiaryIdentification[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - aggressor[0, 1]: string - clickAndTradeDetails[0, 1]: - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume[0, 1]: + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: value[1, 1]: decimal unit[1, 1]: string - triggerDetails[0, 1]: - priceLimit[1, 1]: + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: value[1, 1]: decimal currency[1, 1]: string - triggerContractId[0, 1]: string - undisclosedVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - orderDuration[0, 1]: - duration[1, 1]: string - expirationDateTime[0, 1]: dateTime - contractInfo[1, 1] (choice): - contractId[0, 1]: string - contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: + actionType[1, 1]: string + Extra[0, 1]: string + TradeList[0, 1]: + TradeReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[0, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: value[1, 1]: decimal currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - transactionTime[1, 1]: dateTime - executionTime[0, 1]: dateTime - uniqueTransactionIdentifier[1, 1]: - uniqueTransactionIdentifier[1, 1]: string - additionalUtiInfo[0, 1]: string - linkedTransactionId[0, None]: string - linkedOrderId[0, None]: string - voiceBrokered[0, 1]: string - priceDetails[0, 1]: - price[1, 1]: decimal - priceCurrency[1, 1]: string - notionalAmountDetails[0, 1]: - notionalAmount[1, 1]: decimal - notionalCurrency[1, 1]: string - quantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - totalNotionalContractQuantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - terminationDate[0, 1]: dateTime - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity[0, 1]: + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[0, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier[1, 1]: + uniqueTransactionIdentifier[1, 1]: string + additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string \ No newline at end of file + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_source_tree_version1.txt b/tests/sample_models/table1/table1_source_tree_version1.txt index 07d2687..710da29 100644 --- a/tests/sample_models/table1/table1_source_tree_version1.txt +++ b/tests/sample_models/table1/table1_source_tree_version1.txt @@ -1,131 +1,94 @@ -reportingEntityID[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string -contractList[0, 1]: - contract[1, None]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: +REMITTable1: + reportingEntityID[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + contractList[0, 1]: + contract[1, None]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + OrderList[0, 1]: + OrderReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[1, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId[1, 1]: + uniqueOrderIdentifier[1, 1]: string + previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time -OrderList[0, 1]: - OrderReport[1, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - traderID[1, 1] (choice): - traderIdForOrganisedMarket[0, 1]: string - traderIdForMarketParticipant[0, 1]: string - beneficiaryIdentification[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - orderId[1, 1]: - uniqueOrderIdentifier[1, 1]: string - previousOrderIdentifier[0, 1]: string - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - triggerDetails[0, 1]: - priceLimit[1, 1]: + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: + value[1, 1]: decimal + currency[1, 1]: string + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - triggerContractId[0, 1]: string - undisclosedVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - orderDuration[1, 1]: - duration[1, 1]: string - expirationDateTime[0, 1]: dateTime - contractInfo[1, 1] (choice): - contractId[0, 1]: string - legContractId[0, None]: - contractId[1, 1]: string - buySellIndicator[1, 1]: string - contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: - value[1, 1]: decimal - currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - legContract[0, None]: - contract[1, 1]: + unit[1, 1]: string + orderDuration[1, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contract[0, 1]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -162,160 +125,198 @@ OrderList[0, 1]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time - buySellIndicator[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - transactionTime[1, 1]: dateTime - originalEntryTime[0, 1]: dateTime - linkedOrderId[0, None]: string - priceDetails[0, 1]: - price[1, 1]: decimal - priceCurrency[1, 1]: string - notionalAmountDetails[0, 1]: - notionalAmount[1, 1]: decimal - notionalCurrency[1, 1]: string - quantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - totalNotionalContractQuantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity[0, 1]: + legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string -TradeList[0, 1]: - TradeReport[1, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant[1, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - traderID[0, 1] (choice): - traderIdForOrganisedMarket[0, 1]: string - traderIdForMarketParticipant[0, 1]: string - otherMarketParticipant[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - beneficiaryIdentification[0, 1] (choice): - ace[0, 1]: string - lei[0, 1]: string - bic[0, 1]: string - eic[0, 1]: string - gln[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - aggressor[0, 1]: string - clickAndTradeDetails[0, 1]: - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume[0, 1]: + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: value[1, 1]: decimal unit[1, 1]: string - triggerDetails[0, 1]: - priceLimit[1, 1]: + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: value[1, 1]: decimal currency[1, 1]: string - triggerContractId[0, 1]: string - undisclosedVolume[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - orderDuration[0, 1]: - duration[1, 1]: string - expirationDateTime[0, 1]: dateTime - contractInfo[1, 1] (choice): - contractId[0, 1]: string - contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice[0, 1]: + actionType[1, 1]: string + Extra[0, 1]: string + TradeList[0, 1]: + TradeReport[1, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant[1, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + traderID[0, 1] (choice): + traderIdForOrganisedMarket[0, 1]: string + traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + beneficiaryIdentification[0, 1] (choice): + ace[0, 1]: string + lei[0, 1]: string + bic[0, 1]: string + eic[0, 1]: string + gln[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + triggerDetails[0, 1]: + priceLimit[1, 1]: value[1, 1]: decimal currency[1, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - organisedMarketPlaceIdentifier[1, 1] (choice): - lei[0, 1]: string - mic[0, 1]: string - ace[0, 1]: string - bil[0, 1]: string - transactionTime[1, 1]: dateTime - executionTime[0, 1]: dateTime - uniqueTransactionIdentifier[1, 1]: - uniqueTransactionIdentifier[1, 1]: string - additionalUtiInfo[0, 1]: string - linkedTransactionId[0, None]: string - linkedOrderId[0, None]: string - voiceBrokered[0, 1]: string - priceDetails[0, 1]: - price[1, 1]: decimal - priceCurrency[1, 1]: string - notionalAmountDetails[0, 1]: - notionalAmount[1, 1]: decimal - notionalCurrency[1, 1]: string - quantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - totalNotionalContractQuantity[0, 1]: - value[1, 1]: decimal - unit[1, 1]: string - terminationDate[0, 1]: dateTime - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity[0, 1]: + triggerContractId[0, 1]: string + undisclosedVolume[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + orderDuration[0, 1]: + duration[1, 1]: string + expirationDateTime[0, 1]: dateTime + contractInfo[1, 1] (choice): + contractId[0, 1]: string + contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + organisedMarketPlaceIdentifier[1, 1] (choice): + lei[0, 1]: string + mic[0, 1]: string + ace[0, 1]: string + bil[0, 1]: string + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier[1, 1]: + uniqueTransactionIdentifier[1, 1]: string + additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails[0, 1]: + price[1, 1]: decimal + priceCurrency[1, 1]: string + notionalAmountDetails[0, 1]: + notionalAmount[1, 1]: decimal + notionalCurrency[1, 1]: string + quantity[0, 1]: value[1, 1]: decimal - currency[1, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string \ No newline at end of file + unit[1, 1]: string + totalNotionalContractQuantity[0, 1]: + value[1, 1]: decimal + unit[1, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity[0, 1]: + value[1, 1]: decimal + currency[1, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_target_tree_version0.txt b/tests/sample_models/table1/table1_target_tree_version0.txt index 63fb4e7..552cb54 100644 --- a/tests/sample_models/table1/table1_target_tree_version0.txt +++ b/tests/sample_models/table1/table1_target_tree_version0.txt @@ -1,67 +1,7 @@ -reportingEntityID_type[1, 1]: string -reportingEntityID_value[1, 1]: string -contractList_contract[0, None]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice_value[0, 1]: decimal - optionStrikePrice_currency[0, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time -OrderList_OrderReport[0, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant_type[1, 1]: string - idOfMarketParticipant_value[1, 1]: string - traderID_traderIdForOrganisedMarket[0, 1]: string - traderID_traderIdForMarketParticipant[0, 1]: string - beneficiaryIdentification_type[0, 1]: string - beneficiaryIdentification_value[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - orderId_uniqueOrderIdentifier[1, 1]: string - orderId_previousOrderIdentifier[0, 1]: string - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume_value[0, 1]: decimal - minimumExecuteVolume_unit[0, 1]: string - triggerDetails_priceLimit_value[0, 1]: decimal - triggerDetails_priceLimit_currency[0, 1]: string - triggerDetails_triggerContractId[0, 1]: string - undisclosedVolume_value[0, 1]: decimal - undisclosedVolume_unit[0, 1]: string - orderDuration_duration[1, 1]: string - orderDuration_expirationDateTime[0, 1]: dateTime - contractInfo_contractId[0, 1]: string - contractInfo_legContractId[0, None]: - contractId[1, 1]: string - buySellIndicator[1, 1]: string - contractInfo_contract[0, 1]: +REMITTable1: + reportingEntityID_type[1, 1]: string + reportingEntityID_value[1, 1]: string + contractList_contract[0, None]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -94,8 +34,35 @@ OrderList_OrderReport[0, None]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time - contractInfo_legContract[0, None]: - contract[1, 1]: + OrderList_OrderReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId_uniqueOrderIdentifier[1, 1]: string + orderId_previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[1, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contractInfo_contract[0, 1]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -128,119 +95,153 @@ OrderList_OrderReport[0, None]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time + contractInfo_legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string + TradeList_TradeReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant_type[0, 1]: string + otherMarketParticipant_value[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string buySellIndicator[1, 1]: string - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - transactionTime[1, 1]: dateTime - originalEntryTime[0, 1]: dateTime - linkedOrderId[0, None]: string - priceDetails_price[0, 1]: decimal - priceDetails_priceCurrency[0, 1]: string - notionalAmountDetails_notionalAmount[0, 1]: decimal - notionalAmountDetails_notionalCurrency[0, 1]: string - quantity_value[0, 1]: decimal - quantity_unit[0, 1]: string - totalNotionalContractQuantity_value[0, 1]: decimal - totalNotionalContractQuantity_unit[0, 1]: string - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity_value[0, 1]: decimal - priceTimeIntervalQuantity_currency[0, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string -TradeList_TradeReport[0, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant_type[1, 1]: string - idOfMarketParticipant_value[1, 1]: string - traderID_traderIdForOrganisedMarket[0, 1]: string - traderID_traderIdForMarketParticipant[0, 1]: string - otherMarketParticipant_type[0, 1]: string - otherMarketParticipant_value[0, 1]: string - beneficiaryIdentification_type[0, 1]: string - beneficiaryIdentification_value[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - aggressor[0, 1]: string - clickAndTradeDetails[0, 1]: - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume_value[0, 1]: decimal - minimumExecuteVolume_unit[0, 1]: string - triggerDetails_priceLimit_value[0, 1]: decimal - triggerDetails_priceLimit_currency[0, 1]: string - triggerDetails_triggerContractId[0, 1]: string - undisclosedVolume_value[0, 1]: decimal - undisclosedVolume_unit[0, 1]: string - orderDuration_duration[0, 1]: string - orderDuration_expirationDateTime[0, 1]: dateTime - contractInfo_contractId[0, 1]: string - contractInfo_contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[0, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time organisedMarketPlaceIdentifier_type[1, 1]: string organisedMarketPlaceIdentifier_value[1, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice_value[0, 1]: decimal - optionStrikePrice_currency[0, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - transactionTime[1, 1]: dateTime - executionTime[0, 1]: dateTime - uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string - uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string - linkedTransactionId[0, None]: string - linkedOrderId[0, None]: string - voiceBrokered[0, 1]: string - priceDetails_price[0, 1]: decimal - priceDetails_priceCurrency[0, 1]: string - notionalAmountDetails_notionalAmount[0, 1]: decimal - notionalAmountDetails_notionalCurrency[0, 1]: string - quantity_value[0, 1]: decimal - quantity_unit[0, 1]: string - totalNotionalContractQuantity_value[0, 1]: decimal - totalNotionalContractQuantity_unit[0, 1]: string - terminationDate[0, 1]: dateTime - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity_value[0, 1]: decimal - priceTimeIntervalQuantity_currency[0, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string \ No newline at end of file + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string + uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/table1/table1_target_tree_version1.txt b/tests/sample_models/table1/table1_target_tree_version1.txt index bd2f775..93e4d19 100644 --- a/tests/sample_models/table1/table1_target_tree_version1.txt +++ b/tests/sample_models/table1/table1_target_tree_version1.txt @@ -1,67 +1,7 @@ -reportingEntityID_type[1, 1]: string -reportingEntityID_value[1, 1]: string -contract[0, None]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice_value[0, 1]: decimal - optionStrikePrice_currency[0, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time -OrderList_OrderReport[0, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant_type[1, 1]: string - idOfMarketParticipant_value[1, 1]: string - traderID_traderIdForOrganisedMarket[0, 1]: string - traderID_traderIdForMarketParticipant[0, 1]: string - beneficiaryIdentification_type[0, 1]: string - beneficiaryIdentification_value[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - orderId_uniqueOrderIdentifier[1, 1]: string - orderId_previousOrderIdentifier[0, 1]: string - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume_value[0, 1]: decimal - minimumExecuteVolume_unit[0, 1]: string - triggerDetails_priceLimit_value[0, 1]: decimal - triggerDetails_priceLimit_currency[0, 1]: string - triggerDetails_triggerContractId[0, 1]: string - undisclosedVolume_value[0, 1]: decimal - undisclosedVolume_unit[0, 1]: string - orderDuration_duration[1, 1]: string - orderDuration_expirationDateTime[0, 1]: dateTime - contractInfo_contractId[0, 1]: string - contractInfo_legContractId[0, None]: - contractId[1, 1]: string - buySellIndicator[1, 1]: string - contractInfo_contract[0, 1]: +REMITTable1: + reportingEntityID_type[1, 1]: string + reportingEntityID_value[1, 1]: string + contract[0, None]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -94,8 +34,35 @@ OrderList_OrderReport[0, None]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time - contractInfo_legContract[0, None]: - contract[1, 1]: + OrderList_OrderReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string + buySellIndicator[1, 1]: string + orderId_uniqueOrderIdentifier[1, 1]: string + orderId_previousOrderIdentifier[0, 1]: string + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[1, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_legContractId[0, None]: + contractId[1, 1]: string + buySellIndicator[1, 1]: string + contractInfo_contract[0, 1]: contractId[1, 1]: string contractName[0, 1]: string contractType[1, 1]: string @@ -128,119 +95,153 @@ OrderList_OrderReport[0, None]: daysOfTheWeek[0, None]: string loadDeliveryStartTime[1, None]: time loadDeliveryEndTime[1, None]: time + contractInfo_legContract[0, None]: + contract[1, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time + buySellIndicator[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + transactionTime[1, 1]: dateTime + originalEntryTime[0, 1]: dateTime + linkedOrderId[0, None]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string + TradeList_TradeReport[0, None]: + RecordSeqNumber[1, 1]: integer + idOfMarketParticipant_type[1, 1]: string + idOfMarketParticipant_value[1, 1]: string + traderID_traderIdForOrganisedMarket[0, 1]: string + traderID_traderIdForMarketParticipant[0, 1]: string + otherMarketParticipant_type[0, 1]: string + otherMarketParticipant_value[0, 1]: string + beneficiaryIdentification_type[0, 1]: string + beneficiaryIdentification_value[0, 1]: string + tradingCapacity[1, 1]: string buySellIndicator[1, 1]: string - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - transactionTime[1, 1]: dateTime - originalEntryTime[0, 1]: dateTime - linkedOrderId[0, None]: string - priceDetails_price[0, 1]: decimal - priceDetails_priceCurrency[0, 1]: string - notionalAmountDetails_notionalAmount[0, 1]: decimal - notionalAmountDetails_notionalCurrency[0, 1]: string - quantity_value[0, 1]: decimal - quantity_unit[0, 1]: string - totalNotionalContractQuantity_value[0, 1]: decimal - totalNotionalContractQuantity_unit[0, 1]: string - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity_value[0, 1]: decimal - priceTimeIntervalQuantity_currency[0, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string -TradeList_TradeReport[0, None]: - RecordSeqNumber[1, 1]: integer - idOfMarketParticipant_type[1, 1]: string - idOfMarketParticipant_value[1, 1]: string - traderID_traderIdForOrganisedMarket[0, 1]: string - traderID_traderIdForMarketParticipant[0, 1]: string - otherMarketParticipant_type[0, 1]: string - otherMarketParticipant_value[0, 1]: string - beneficiaryIdentification_type[0, 1]: string - beneficiaryIdentification_value[0, 1]: string - tradingCapacity[1, 1]: string - buySellIndicator[1, 1]: string - aggressor[0, 1]: string - clickAndTradeDetails[0, 1]: - orderType[1, 1]: string - orderCondition[0, None]: string - orderStatus[0, None]: string - minimumExecuteVolume_value[0, 1]: decimal - minimumExecuteVolume_unit[0, 1]: string - triggerDetails_priceLimit_value[0, 1]: decimal - triggerDetails_priceLimit_currency[0, 1]: string - triggerDetails_triggerContractId[0, 1]: string - undisclosedVolume_value[0, 1]: decimal - undisclosedVolume_unit[0, 1]: string - orderDuration_duration[0, 1]: string - orderDuration_expirationDateTime[0, 1]: dateTime - contractInfo_contractId[0, 1]: string - contractInfo_contract[0, 1]: - contractId[1, 1]: string - contractName[0, 1]: string - contractType[1, 1]: string - energyCommodity[1, 2]: string - fixingIndex[0, None]: - indexName[1, 1]: string - indexValue[0, 1]: decimal - settlementMethod[1, 1]: string + aggressor[0, 1]: string + clickAndTradeDetails[0, 1]: + orderType[1, 1]: string + orderCondition[0, None]: string + orderStatus[0, None]: string + minimumExecuteVolume_value[0, 1]: decimal + minimumExecuteVolume_unit[0, 1]: string + triggerDetails_priceLimit_value[0, 1]: decimal + triggerDetails_priceLimit_currency[0, 1]: string + triggerDetails_triggerContractId[0, 1]: string + undisclosedVolume_value[0, 1]: decimal + undisclosedVolume_unit[0, 1]: string + orderDuration_duration[0, 1]: string + orderDuration_expirationDateTime[0, 1]: dateTime + contractInfo_contractId[0, 1]: string + contractInfo_contract[0, 1]: + contractId[1, 1]: string + contractName[0, 1]: string + contractType[1, 1]: string + energyCommodity[1, 2]: string + fixingIndex[0, None]: + indexName[1, 1]: string + indexValue[0, 1]: decimal + settlementMethod[1, 1]: string + organisedMarketPlaceIdentifier_type[1, 1]: string + organisedMarketPlaceIdentifier_value[1, 1]: string + contractTradingHours[0, None]: + startTime[1, 1]: time + endTime[1, 1]: time + date[0, 1]: date + lastTradingDateTime[0, 1]: dateTime + optionDetails[0, 1]: + optionStyle[1, 1]: string + optionType[1, 1]: string + optionExerciseDate[0, None]: date + optionStrikePrice_value[0, 1]: decimal + optionStrikePrice_currency[0, 1]: string + deliveryPointOrZone[1, None]: string + deliveryStartDate[1, 1]: date + deliveryEndDate[1, 1]: date + duration[0, 1]: string + loadType[0, 1]: string + deliveryProfile[1, None]: + loadDeliveryStartDate[0, 1]: date + loadDeliveryEndDate[0, 1]: date + daysOfTheWeek[0, None]: string + loadDeliveryStartTime[1, None]: time + loadDeliveryEndTime[1, None]: time organisedMarketPlaceIdentifier_type[1, 1]: string organisedMarketPlaceIdentifier_value[1, 1]: string - contractTradingHours[0, None]: - startTime[1, 1]: time - endTime[1, 1]: time - date[0, 1]: date - lastTradingDateTime[0, 1]: dateTime - optionDetails[0, 1]: - optionStyle[1, 1]: string - optionType[1, 1]: string - optionExerciseDate[0, None]: date - optionStrikePrice_value[0, 1]: decimal - optionStrikePrice_currency[0, 1]: string - deliveryPointOrZone[1, None]: string - deliveryStartDate[1, 1]: date - deliveryEndDate[1, 1]: date - duration[0, 1]: string - loadType[0, 1]: string - deliveryProfile[1, None]: - loadDeliveryStartDate[0, 1]: date - loadDeliveryEndDate[0, 1]: date - daysOfTheWeek[0, None]: string - loadDeliveryStartTime[1, None]: time - loadDeliveryEndTime[1, None]: time - organisedMarketPlaceIdentifier_type[1, 1]: string - organisedMarketPlaceIdentifier_value[1, 1]: string - transactionTime[1, 1]: dateTime - executionTime[0, 1]: dateTime - uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string - uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string - linkedTransactionId[0, None]: string - linkedOrderId[0, None]: string - voiceBrokered[0, 1]: string - priceDetails_price[0, 1]: decimal - priceDetails_priceCurrency[0, 1]: string - notionalAmountDetails_notionalAmount[0, 1]: decimal - notionalAmountDetails_notionalCurrency[0, 1]: string - quantity_value[0, 1]: decimal - quantity_unit[0, 1]: string - totalNotionalContractQuantity_value[0, 1]: decimal - totalNotionalContractQuantity_unit[0, 1]: string - terminationDate[0, 1]: dateTime - priceIntervalQuantityDetails[0, None]: - intervalStartDate[0, 1]: date - intervalEndDate[0, 1]: date - daysOfTheWeek[0, 1]: string - intervalStartTime[1, None]: time - intervalEndTime[1, None]: time - quantity[0, 1]: decimal - unit[0, 1]: string - priceTimeIntervalQuantity_value[0, 1]: decimal - priceTimeIntervalQuantity_currency[0, 1]: string - actionType[1, 1]: string - Extra[0, 1]: string \ No newline at end of file + transactionTime[1, 1]: dateTime + executionTime[0, 1]: dateTime + uniqueTransactionIdentifier_uniqueTransactionIdentifier[1, 1]: string + uniqueTransactionIdentifier_additionalUtiInfo[0, 1]: string + linkedTransactionId[0, None]: string + linkedOrderId[0, None]: string + voiceBrokered[0, 1]: string + priceDetails_price[0, 1]: decimal + priceDetails_priceCurrency[0, 1]: string + notionalAmountDetails_notionalAmount[0, 1]: decimal + notionalAmountDetails_notionalCurrency[0, 1]: string + quantity_value[0, 1]: decimal + quantity_unit[0, 1]: string + totalNotionalContractQuantity_value[0, 1]: decimal + totalNotionalContractQuantity_unit[0, 1]: string + terminationDate[0, 1]: dateTime + priceIntervalQuantityDetails[0, None]: + intervalStartDate[0, 1]: date + intervalEndDate[0, 1]: date + daysOfTheWeek[0, 1]: string + intervalStartTime[1, None]: time + intervalEndTime[1, None]: time + quantity[0, 1]: decimal + unit[0, 1]: string + priceTimeIntervalQuantity_value[0, 1]: decimal + priceTimeIntervalQuantity_currency[0, 1]: string + actionType[1, 1]: string + Extra[0, 1]: string \ No newline at end of file From 66cc85b116c5b997836b32da239bc31f21f51093 Mon Sep 17 00:00:00 2001 From: cre-os Date: Wed, 12 Mar 2025 15:03:29 +0100 Subject: [PATCH 3/3] Extend tests + document --- docs/configuring.md | 37 ++++++++++++++++++++++--------------- tests/test_models_output.py | 27 +++++++++++++++++---------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/docs/configuring.md b/docs/configuring.md index 9e50683..2ca1338 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -42,6 +42,10 @@ others at the field level. The general structure of the configuration dict is th } ``` +!!! tip + Table names and column names in the config dict (`table1` and `my_column` in the above example) refer to the names before + any transformation. They refer to the names that can be found in `DataModel.source_tree`. + ## Model configuration The following options can be passed as a top-level keys of the model configuration `dict`: @@ -147,20 +151,7 @@ automatically applied `join`, as it would require a complex process of adding a ### Elevate children to upper level -If a complex child element has a minimum and maximum occurrences number of 1 and 1 respectively, it can be "pulled" up -to its parent element. This behaviour will always be applied by default. - -If a complex child element has a minimum and maximum occurrences number of 0 and 1 respectively, it can also be "pulled" -up to its parent element fields. This is applied by default if the child has less than 5 fields, because otherwise it -could clutter the parent element with many columns that will often be all `NULL`. - -This simplification can be opted out using a configuration option, and forced in the case of a child with more than 5 -fields, using the following option: - -`"transform":` `"elevate"` (default) or `"elevate_wo_prefix"` or `False` (disable). - -By default, the elevated field name is prefixed with the name of the complex child so its origin is clear and to prevent -duplicated names, but this prefixing can be avoided with the value `"elevate_wo_prefix"`. +If a complex child element has a maximum occurrences number of 1, it can be "pulled" up to its parent element. For example, complex child `timeInterval` with 2 fields of max occurrence 1, before elevation... ```shell @@ -170,13 +161,29 @@ timeInterval[1, 1]: end[1, 1]: string ``` -... and after elevation (with prefix): +... and after elevation: ```shell # Parent fields timeInterval_start[1, 1]: string timeInterval_end[1, 1]: string ``` +The resulting name concatenate the parent name and the child name, by default. + +This transformation will be applied by default when: + +* the minimum occurrence number is 1 +* or the minimum occurence number is 0 and the child has less than 5 fields, because otherwise it could clutter the parent +element with many columns that will often be all `NULL`. + +This can be configured by the `"transform"` option, with the following values: + +* `None`: default behaviour, +* `"elevate"`: force the elevation of the child, +* `"elevate_wo_prefix"`: force the elevation of the child, but drop the name of the parent element in the resulting +column name, +* `False`: disable. + !!! example Force "elevation" of a complex type to its parent: ``` python diff --git a/tests/test_models_output.py b/tests/test_models_output.py index b5245a0..b558fed 100644 --- a/tests/test_models_output.py +++ b/tests/test_models_output.py @@ -16,7 +16,7 @@ for i in range(len(model["versions"])) ], ) -def test_model_erd(test_config): +def test_model_text_outputs(test_config): """A test to check if generated ERD matches saved output""" model = DataModel( @@ -25,16 +25,23 @@ def test_model_erd(test_config): model_config=test_config["config"], ) - expected = open( - os.path.join( - models_path, - test_config["id"], - f"{test_config['id']}_erd_version{test_config['version_id']}.md", - ), - "r", - ).read() + expected = [ + open( + os.path.join( + models_path, + test_config["id"], + f"{test_config['id']}_{file_type}_version{test_config['version_id']}.{'md' if file_type == 'erd' else 'txt'}", + ), + "r", + ).read() + for file_type in ["erd", "source_tree", "target_tree"] + ] - actual = "```mermaid\n" + model.get_entity_rel_diagram(text_context=False) + "\n```" + actual = [ + "```mermaid\n" + model.get_entity_rel_diagram(text_context=False) + "\n```", + model.source_tree, + model.target_tree, + ] assert actual == expected