From 6bb761f2f79724fc53fc4ebeaf66a9120d5ba154 Mon Sep 17 00:00:00 2001 From: sandorstormen Date: Tue, 2 Dec 2025 10:31:41 +0100 Subject: [PATCH 1/4] Make requirements work with mal-sim --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 26e34ef..a961649 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ authors = [ {name="Sandor Berglund", email="sandorb@kth.se"}, ] readme = "README.md" -requires-python = ">=3.8,<=3.13" +requires-python = ">=3.10,<=3.13" dependencies = [ "networkx==3.2.1", "numpy==1.26.4", From 753d8902a4d6285d13a7163074c54b6dea649df6 Mon Sep 17 00:00:00 2001 From: sandorstormen Date: Tue, 2 Dec 2025 10:31:50 +0100 Subject: [PATCH 2/4] Fix: bug --- mal_gui/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mal_gui/main_window.py b/mal_gui/main_window.py index a8c7202..a88116c 100644 --- a/mal_gui/main_window.py +++ b/mal_gui/main_window.py @@ -309,7 +309,7 @@ def update_properties_window(self, asset_item: AssetItem): if attack_step.name in asset.defenses: continue if attack_step.type == "defense": - if attack_step.ttc: + if attack_step.ttc and len(attack_step.ttc['arguments']) > 0: default_value = attack_step.ttc['arguments'][0] else: default_value = 0.0 From cc1b39a02ad4c62e75719cbffdf24b1c0e6aaa6b Mon Sep 17 00:00:00 2001 From: sandorstormen Date: Tue, 2 Dec 2025 10:32:15 +0100 Subject: [PATCH 3/4] Update .gitignore to include uv.lock and logs directory --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index beacb59..753625f 100644 --- a/.gitignore +++ b/.gitignore @@ -167,4 +167,8 @@ myvenv/ vscode/ #Mac Specific -.DS_Store \ No newline at end of file +.DS_Store + +uv.lock + +logs/** \ No newline at end of file From 0ebbc7f55253b8c6f7bd17f27f68e94bb1bddb88 Mon Sep 17 00:00:00 2001 From: sandorstormen Date: Tue, 2 Dec 2025 10:58:15 +0100 Subject: [PATCH 4/4] Enhance defense argument check in MainWindow to ensure ttc has valid arguments --- mal_gui/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mal_gui/main_window.py b/mal_gui/main_window.py index a88116c..8ee0069 100644 --- a/mal_gui/main_window.py +++ b/mal_gui/main_window.py @@ -298,7 +298,7 @@ def update_properties_window(self, asset_item: AssetItem): for attack_step_name, value in asset.defenses.items(): # Add defenses that are set in model attack_step = asset.lg_asset.attack_steps[attack_step_name] - if attack_step.ttc: + if attack_step.ttc and len(attack_step.ttc['arguments']) > 0: default_value = attack_step.ttc['arguments'][0] else: default_value = 0.0