Skip to content

Commit

Permalink
Merge pull request #161 from QGEP/fixTypoSchema
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
ponceta authored Sep 19, 2024
2 parents 84e0f1c + f0b272f commit 41d4b70
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ check_wastewater_structures = check_wastewater_structures - table_elements::inte

-- falls null ist gut, sonst
IF check_wastewater_structures <> 0 THEN
list = list || 'ERROR: number of subclass elements of wastewater_structures NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_structures || ', ';
list = list || 'ERROR: number of subclass elements of wastewater_structures NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_structures || ', ';
ELSE
list = list || ' OK: number of subclass elements of wastewater_structures OK in schema vsa_dss_2015_2_d_3122!' || ', ';
END IF;
Expand Down Expand Up @@ -194,7 +194,7 @@ list = list || table_elements || ', ';

-- falls null ist gut, sonst
IF check_wastewater_networkelements <> 0 THEN
list = list || 'ERROR: number of subclass elements of wastewater_networkelements NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_networkelements || ', ';
list = list || 'ERROR: number of subclass elements of wastewater_networkelements NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_networkelements || ', ';
ELSE
list = list || ' OK: number of subclass elements of wastewater_networkelements OK in schema vsa_dss_2015_2_d_3122!' || ', ';
END IF;
Expand Down Expand Up @@ -254,7 +254,7 @@ check_structure_parts = check_structure_parts - table_elements::integer;

-- falls null ist gut, sonst
IF check_structure_parts <> 0 THEN
list = list || 'ERROR: number of subclass elements of structure parts NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_structure_parts || ', ';
list = list || 'ERROR: number of subclass elements of structure parts NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_structure_parts || ', ';
ELSE
list = list || ' OK: number of subclass elements of structure parts OK in schema vsa_dss_2015_2_d_3122!' || ', ';
END IF;
Expand Down
13 changes: 7 additions & 6 deletions qgepqwat2ili/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@

def _show_results(title, message, log_path, level):
widget = iface.messageBar().createMessage(title, message)
button = QPushButton(widget)
button.setText("Show logs")
button.pressed.connect(lambda p=log_path: webbrowser.open(p))
widget.layout().addWidget(button)
if log_path:
button = QPushButton(widget)
button.setText("Show logs")
button.pressed.connect(lambda p=log_path: webbrowser.open(p))
widget.layout().addWidget(button)
iface.messageBar().pushWidget(widget, level)


Expand Down Expand Up @@ -433,7 +434,7 @@ def action_do_export():
progress_dialog.close()
print("number of subclass elements of organisation NOT CORRECT")
show_failure(
"ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od",
"ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od",
f"Add missing obj_id in organisation subclasses so that number of subclass elements match organisation elements. See qgep logs tab for details.",
None,
)
Expand All @@ -456,7 +457,7 @@ def action_do_export():
progress_dialog.close()
print("ERROR: number of subclass elements of wastewater_structure NOT CORRECT")
show_failure(
"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od",
"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od",
f"Add missing obj_id in wastewater_structure subclasses so that number of subclass elements match wastewater_structure elements. See qgep logs tab for details.",
None,
)
Expand Down
20 changes: 14 additions & 6 deletions qgepqwat2ili/utils/ili2db.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ def check_organisation_subclass_data():
organisation_subclass_check=True
logger.info(f"OK: number of subclass elements of class organisation OK in schema qgep_od!")
else:
organisation_subclass_check=False
logger.info(f"ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)")
print (f"ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)")
organisation_subclass_check = False
logger.info(
f"ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)"
)
print(
f"ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)"
)

return organisation_subclass_check

Expand Down Expand Up @@ -76,9 +80,13 @@ def check_wastewater_structure_subclass_data():
wastewater_structure_subclass_check=True
logger.info(f"OK: number of subclass elements of class wastewater_structure OK in schema qgep_od!")
else:
wastewater_structure_subclass_check=False
logger.info(f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)")
print (f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)")
wastewater_structure_subclass_check = False
logger.info(
f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)"
)
print(
f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)"
)

return wastewater_structure_subclass_check

Expand Down

0 comments on commit 41d4b70

Please sign in to comment.