simstack 2.0.1__py3-none-any.whl → 2.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
simstack/_version.py CHANGED
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '2.0.1'
22
- __version_tuple__ = version_tuple = (2, 0, 1)
21
+ __version__ = version = '2.0.2'
22
+ __version_tuple__ = version_tuple = (2, 0, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
simstack/core/context.py CHANGED
@@ -151,6 +151,8 @@ class GlobalState:
151
151
  if db_name is None or connection_string is None or db_type is None:
152
152
  # use not all info in the kwargs
153
153
  simstack_toml_path = project_root / "simstack.toml"
154
+ if not simstack_toml_path.exists():
155
+ raise ValueError(f"simstack.toml not found in {project_root}")
154
156
  toml_reader = TomlReader(project_root, config_file=Path(simstack_toml_path).resolve())
155
157
  db_info = DatabaseInformation.from_config(toml_reader.config, **kwargs)
156
158
  else:
@@ -137,9 +137,9 @@ class NodeExecutionService(BaseService):
137
137
  return await run_node_from_registry(registry_entry)
138
138
  else:
139
139
  logger.error(
140
- f"Queue {queue} not supported for task_id: {registry_entry.id}"
140
+ f"Queue {queue} not supported {registry_entry.name} for task_id: {registry_entry.id}"
141
141
  )
142
- return False
142
+ raise RuntimeError(f"Queue {queue} not supported for task_id: {registry_entry.id}")
143
143
 
144
144
  except Exception as e:
145
145
  logger.exception(
@@ -62,6 +62,17 @@ class CreateNodeTable(TableBuilderBase):
62
62
  if func.__module__ == module_name
63
63
  ]
64
64
 
65
+ @staticmethod
66
+ def _annotation_type_str(annotation: Any) -> str:
67
+ """Return a display string for a signature annotation without assuming a class."""
68
+ if annotation is inspect.Parameter.empty:
69
+ return "Any"
70
+ if isinstance(annotation, str):
71
+ return annotation
72
+ if hasattr(annotation, "__name__"):
73
+ return annotation.__name__
74
+ return str(annotation)
75
+
65
76
  def _build_inputs(
66
77
  self,
67
78
  sig: inspect.Signature,
@@ -72,23 +83,37 @@ class CreateNodeTable(TableBuilderBase):
72
83
  for param_name, param in sig.parameters.items():
73
84
  if param_name == "self": # Skip self parameter for methods
74
85
  continue
86
+ # *args / **kwargs are runtime plumbing, not node inputs.
87
+ if param.kind in (
88
+ inspect.Parameter.VAR_POSITIONAL,
89
+ inspect.Parameter.VAR_KEYWORD,
90
+ ):
91
+ continue
75
92
 
76
- try:
77
- param_info: Dict[str, Any] = {
78
- "name": param_name,
79
- "type": type_hints.get(param_name, param.annotation.__name__),
80
- "type_str": str(
81
- type_hints.get(
82
- param_name,
83
- param.annotation.__name__
84
- if param.annotation != inspect.Parameter.empty
85
- else "Any",
86
- )
87
- ),
88
- }
89
- except AttributeError as e:
90
- logger.error(f"Could not parse type for {param_name}: {e}")
91
- param_info = {}
93
+ # Prefer resolved type hints. Do not evaluate param.annotation.__name__
94
+ # as a dict.get() default: with `from __future__ import annotations`,
95
+ # annotations are strings and that attribute access raises, wiping the
96
+ # input entry and leaving NodeModel.input_mappings empty.
97
+ resolved_type = type_hints.get(param_name)
98
+ if resolved_type is None:
99
+ resolved_type = (
100
+ None
101
+ if param.annotation is inspect.Parameter.empty
102
+ else param.annotation
103
+ )
104
+ type_str = self._annotation_type_str(param.annotation)
105
+ else:
106
+ type_str = self._annotation_type_str(resolved_type)
107
+
108
+ if resolved_type is None:
109
+ logger.error(f"Could not parse type for {param_name}: missing annotation")
110
+ continue
111
+
112
+ param_info: Dict[str, Any] = {
113
+ "name": param_name,
114
+ "type": resolved_type,
115
+ "type_str": type_str,
116
+ }
92
117
 
93
118
  if doc_params and param_name in doc_params:
94
119
  param_info["description"] = doc_params[param_name].get("description")
@@ -28,7 +28,17 @@ def find_project_root(current_file=None, marker_files=(".git", "simstack.toml",
28
28
  prev_dir = None
29
29
  while current_dir != prev_dir:
30
30
  # Check if any marker files/directories exist in the current directory
31
- found_marker = any((current_dir / marker).exists() for marker in marker_files)
31
+ found_marker = False
32
+ for marker in marker_files:
33
+ marker_path = current_dir / marker
34
+ if marker == ".git":
35
+ if marker_path.is_dir():
36
+ found_marker = True
37
+ break
38
+ elif marker_path.exists():
39
+ found_marker = True
40
+ break
41
+
32
42
  found_skip = any((current_dir / marker).exists() for marker in skip_files)
33
43
  if found_marker and not found_skip:
34
44
  return current_dir
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simstack
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: A python based workflow engineering platform with a react-js UI
5
5
  Author-email: Wolfgang Wenzel <wolfgang.wenzel@kit.edu>, Artem Buildin <artem.buildin@kit.edu>, Nikita Mitagin <nikita.mitagin@kit.edu>, Phillip Dullinger <phillip.dullinger@kit.edu>, Celso Rego <celso.rego@kit.edu>, Oliver Pettkau <oliver.pettkau@kit.edu>, Timo Strunk <timo.strunk@nanomatch.de>
6
6
  License: MIT
@@ -1,11 +1,11 @@
1
1
  simstack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- simstack/_version.py,sha256=AJvqZqEOrEKVHQbALacgWiM-1U44ZzqQ-ZsR-NbTbjg,520
2
+ simstack/_version.py,sha256=sVjF22s1nC1gDJghVADCtaHANvgBEIHMKX4cQ4akn7w,520
3
3
  simstack/simstack_marker.com,sha256=GO0pd1JSAafSVUVTDoNs_kcJK_bKEqbz33kfjrn7K2k,53
4
4
  simstack/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  simstack/core/artifacts.py,sha256=g8UpMZOQpmRy9bWCdMZN_pmNDZePAC2v2Vq2l081KOM,15385
6
6
  simstack/core/asnyc_helper.py,sha256=Qm_S3aYValevB1QmdpRV8uDBPUMTgahKGbFIMgYnXLU,232
7
7
  simstack/core/config_file.py,sha256=vx83YWgi4BU0obAj9qYOtUZqn8F9owzejUd9Oe4O41A,1870
8
- simstack/core/context.py,sha256=9EG_fojGVrfnVrZmXG05COhj9Ah7XY88o6TIsAiBS-s,11354
8
+ simstack/core/context.py,sha256=kn1YLeuAQsvCUg1tFCUe7n8J9XbK62o_0ZKH6zDCPcw,11481
9
9
  simstack/core/definitions.py,sha256=hg5zkKyKFBwWe7FOpgQkfZe7I0xDga2srwmgaokpZCE,479
10
10
  simstack/core/engine.py,sha256=uv75r0I7DUYQM52gc_oOagJQugJL6zGvK7M8nYsJGtI,4245
11
11
  simstack/core/find_simstack_modules.py,sha256=gBPgZgiUlyVYcjgZXCvUnJ-uuAZhynMcxAKe777ObjE,1276
@@ -30,7 +30,7 @@ simstack/core/services/base_service.py,sha256=BkGLAnKpRGV86VhWYpta4LINlGAt2K87Ny
30
30
  simstack/core/services/file_transfer_service.py,sha256=pAxdJ-vTgQG9DQJlVbHQ7wNU5hrwFmVVp_vYZzd_-Ws,4219
31
31
  simstack/core/services/git_restart_service.py,sha256=2zERFDaj3Oxfgyl6ng1w1n4UyS7TP658y7kCORAhQuk,488
32
32
  simstack/core/services/git_uv_update_service.py,sha256=W4xzk6rsWrLQkCQqxzVA22bztVqMd0_l_C57soBPdNs,4829
33
- simstack/core/services/node_execution_service.py,sha256=nPoH65Grm2xOwn6GPCzTGJaBP0tdi9uEX3tttbG9ulU,7264
33
+ simstack/core/services/node_execution_service.py,sha256=j_xDAxHcxPlHtYKGyc0qwlNg_UaxP8eQV-QaUXYYlc8,7357
34
34
  simstack/core/services/resource_branch_monitor_service.py,sha256=GuiLAaxsYiCp3Pje4QdGV7IZSe_thrPpdJlkGo2uqgw,2698
35
35
  simstack/core/services/runner_cleanup_service.py,sha256=A2x3_npf_FyYiDxNV4Ar08tJzyVxCUDn312yCEX45tA,5139
36
36
  simstack/core/services/runner_manager.py,sha256=JYZg-_1EzL__OeCwLuKYW7tnRe62QqZ_g6Mlj4QdATU,6696
@@ -297,7 +297,7 @@ simstack/static/docs/simstack/modules/simstack.util.html,sha256=r7W7HetE2yk0wdpW
297
297
  simstack/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
298
298
  simstack/tables/model_table.py,sha256=Gd3Y0797B1yKPtsXjxQYAvJ4kwLrfpxFsE-B-sYVMTA,7644
299
299
  simstack/tables/node_children.py,sha256=cknW_FrxsNbkEKTomjJDNxoSaWxm1qycja48i7GhdlY,9840
300
- simstack/tables/node_table.py,sha256=EuXH2yByjAKW6aNYA5ohPjN0cIf6jkh-7e2Iw_emtr0,20906
300
+ simstack/tables/node_table.py,sha256=I9ESkRYHbLtdA_o6_AKUakpqSMZNRodziWRktm9L9XU,21960
301
301
  simstack/tables/table_builder.py,sha256=2CG_4HNvYT-1GwqNmFiHQQswW0S6IyyI6fh20jfXGM8,11243
302
302
  simstack/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
303
303
  simstack/util/async_zip_utils.py,sha256=qW6fZPCdRqQNCl2lCBH_FSV7AyiMiy-4VendkdgK0MI,588
@@ -332,7 +332,7 @@ simstack/util/mock_db.py,sha256=8uufj-qhUAV7HJvhIWPRER6CfrZu5SFK9MIc3BTwNao,4853
332
332
  simstack/util/module_path_checker.py,sha256=Lh0p41F832fXit0aS4nS4wK-zzTeGxSv_Fn7IjmBDJ4,1430
333
333
  simstack/util/object_list_mixin.py,sha256=31bM2Zd1Y3UBy6LatJMfH1_mZzZrHBAaYBTcf6Lspz8,10860
334
334
  simstack/util/path_manager.py,sha256=8pnsrp0s_IsHC5oNu5C8eqFjmxuKTrmg7fKtJXwY8aE,7322
335
- simstack/util/project_root_finder.py,sha256=mf8YTihxMSiXMNFTPLYPzW1f0achg1RSfAkA0bf3lZk,1521
335
+ simstack/util/project_root_finder.py,sha256=ZmwzOZVOumuzjgbfEQANTrDOfhrg8BkC1MmtqDTb134,1784
336
336
  simstack/util/queue_watcher.py,sha256=5I2zI5Pofw9tXt832Etz6dTfJkzYEVg-SgCAK6Ce6o8,8841
337
337
  simstack/util/resource_config.py,sha256=1Hpv3QWwpCvXyWP3MG0wsk4vR0x0fPGxybtAUaqticw,7697
338
338
  simstack/util/route_finder.py,sha256=NNylq4lztd2qJ8kqs8DBsCOyj3FOCrmh2EU0EA4pR7Y,2112
@@ -346,9 +346,9 @@ simstack/util/submit_to_watchdog.py,sha256=R6cH4R2KY8UKyjcn4u7Z6u0LxH50NYeS7LXlR
346
346
  simstack/util/toml_reader.py,sha256=zlAiaiWaseqQW_ekvLgOkFNBakMxl_zGEDSVzeqFNEY,5460
347
347
  simstack/util/transform_file_name.py,sha256=3jXosi3YjJyuZcg3Y1TVlHgDYrSaFMlTzdpXqXRWRVQ,1275
348
348
  simstack/util/ui_tools.py,sha256=iSO6z6kNnJZQ6kqbKAv8pjuUB4hde95iQpynnfvE9js,7109
349
- simstack-2.0.1.dist-info/licenses/LICENSE,sha256=H5wo5y-DywFxjVbYr5YHwNpTTfI1eh0ztz-xQwU92mw,1080
350
- simstack-2.0.1.dist-info/METADATA,sha256=xoIxFvwFs2dxeFjRGTxgcE0pMhz5Mvy_MMvuQbY1hqQ,15923
351
- simstack-2.0.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
352
- simstack-2.0.1.dist-info/entry_points.txt,sha256=z81wDsEyDTMeoLqb6fjTAYpVN-ltRL_NeK4obbTeY_w,536
353
- simstack-2.0.1.dist-info/top_level.txt,sha256=-tfARSqXVVKmSYiL_cknn5ZEvohMhvoWXOavCmWFN9A,9
354
- simstack-2.0.1.dist-info/RECORD,,
349
+ simstack-2.0.2.dist-info/licenses/LICENSE,sha256=H5wo5y-DywFxjVbYr5YHwNpTTfI1eh0ztz-xQwU92mw,1080
350
+ simstack-2.0.2.dist-info/METADATA,sha256=e_JYD52zARX9mVfnCW3YtatJlNQ7gGBrajMyBqK9uzg,15923
351
+ simstack-2.0.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
352
+ simstack-2.0.2.dist-info/entry_points.txt,sha256=z81wDsEyDTMeoLqb6fjTAYpVN-ltRL_NeK4obbTeY_w,536
353
+ simstack-2.0.2.dist-info/top_level.txt,sha256=-tfARSqXVVKmSYiL_cknn5ZEvohMhvoWXOavCmWFN9A,9
354
+ simstack-2.0.2.dist-info/RECORD,,