Skip to content

Commit

Permalink
Clean up of tests and draw io error logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Semprini committed Sep 25, 2024
1 parent 440068f commit c10bbb0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mdg/parse/drawio_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ def generalization_parse(package: UMLPackage, element, root):
source: Optional[UMLClass] = package.find_class_by_id(cell.get("source"))
target: Optional[UMLClass] = package.find_class_by_id(cell.get("target"))
if source == None or target == None:
logger.warn(f"Cannot find generalization class. Source Id:{cell.get("source")}, Target Id: {cell.get("target")}")
s = cell.get("source")
t = cell.get("target")
logger.warn(f"Cannot find generalization class. Source Id:{s}, Target Id: {t}")
else:
source.generalization = target
target.specialized_by.append(source)
Expand Down
11 changes: 11 additions & 0 deletions mdg/parse/excel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from openpyxl import load_workbook


workbook = load_workbook(filename="sample.xlsx")
workbook.sheetnames

# file as root node
# sheets as packages

# Sheet column format
# DataSet = Package | Segment = Object | Attribute | Data Type | M / C / O | Definition
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ lxml
jinja2
pyyaml
sqlalchemy
openpyxl

0 comments on commit c10bbb0

Please sign in to comment.