arkitekt-next 0.8.4__py3-none-any.whl → 0.8.5__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.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

@@ -76,9 +76,9 @@ def check_and_import_services() -> ServiceBuilderRegistry:
76
76
  rekuest_module.init_services(service_builder_registry)
77
77
  logging.info(f"Called init_service function from {module_name}")
78
78
  else:
79
- logging.debug(f"No init_services function in {module_name}.__arkitekt__. Skipping.")
79
+ print(f"No init_services function in {module_name}.__arkitekt__")
80
80
  except Exception as e:
81
- logging.critical(f"Failed to call init_services for {module_name}: {e}")
81
+ print(f"Failed to call init_services for {module_name}: {e}")
82
82
  traceback.print_exc()
83
83
 
84
84
  # Check local modules in the current working directory
@@ -109,72 +109,3 @@ def check_and_import_services() -> ServiceBuilderRegistry:
109
109
  traceback.print_exc()
110
110
 
111
111
  return service_builder_registry
112
-
113
-
114
- def check_and_return_already_imported_services() -> ServiceBuilderRegistry:
115
- service_builder_registry = ServiceBuilderRegistry()
116
-
117
- # Function to load and call init_services from __arkitekt__.py
118
- def load_and_call_init_services(module_name, arkitekt_path):
119
- try:
120
- # Compute the full module name of the __arkitekt__ module
121
- arkitekt_module_name = f"{module_name}.__arkitekt__"
122
-
123
-
124
- # Create a module spec
125
- spec = importlib.util.spec_from_file_location(
126
- arkitekt_module_name, arkitekt_path
127
- )
128
- arkitekt_module = importlib.util.module_from_spec(spec)
129
-
130
- # Execute the module
131
- spec.loader.exec_module(arkitekt_module)
132
-
133
- # Now call init_services
134
- if hasattr(arkitekt_module, "init_services"):
135
- arkitekt_module.init_services(service_builder_registry)
136
- logging.info(f"Called init_services function from {arkitekt_module_name}")
137
- else:
138
- logging.debug(f"No init_services function in {arkitekt_module_name}. Skipping.")
139
- except Exception as e:
140
- logging.critical(f"Failed to call init_services for {module_name}: {e}")
141
- traceback.print_exc()
142
-
143
- # Create a static list of sys.modules items to avoid RuntimeError
144
- imported_modules = list(sys.modules.items())
145
-
146
- # Keep track of processed top-level modules to avoid duplicates
147
- processed_modules = set()
148
-
149
- # Iterate over currently imported modules
150
- for module_name, module in imported_modules:
151
- if module is None:
152
- continue
153
-
154
- # Get the top-level parent module name
155
- top_level_module_name = module_name.split('.')[0]
156
-
157
- # Avoid processing the same top-level module multiple times
158
- if top_level_module_name in processed_modules:
159
- continue # Already processed
160
-
161
- # Get the module from sys.modules
162
- top_level_module = sys.modules.get(top_level_module_name)
163
- if top_level_module is None:
164
- continue
165
-
166
- # Get the module's file location
167
- module_file = getattr(top_level_module, '__file__', None)
168
- if not module_file:
169
- continue # Skip modules without a file attribute
170
-
171
- # Get the module's directory
172
- module_dir = os.path.dirname(module_file)
173
- arkitekt_path = os.path.join(module_dir, '__arkitekt__.py')
174
-
175
- # Check if __arkitekt__.py exists in the top-level module directory
176
- if os.path.isfile(arkitekt_path):
177
- load_and_call_init_services(top_level_module_name, arkitekt_path)
178
- processed_modules.add(top_level_module_name)
179
-
180
- return service_builder_registry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.8.4
3
+ Version: 0.8.5
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -129,11 +129,11 @@ arkitekt_next/qt/builders.py,sha256=S5XzxzH-Tq-OAvrbP9V8BtY34Et4Zgj_7RFmnWjRN_8,
129
129
  arkitekt_next/qt/magic_bar.py,sha256=o3Z9F2QutVd6JLEY4tEQ5-vfjIBXpgfYz8HXcWgaqfc,18308
130
130
  arkitekt_next/qt/types.py,sha256=jI9UHt1Rn-fxGZfeImTO9-yHh0zJPzk7CwvpnUXdirg,1085
131
131
  arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
132
- arkitekt_next/service_registry.py,sha256=YH59EuGy_gKziWHjnU7tQrjKNchhNTurHbYzlGNCiCc,6314
132
+ arkitekt_next/service_registry.py,sha256=0Qt3PNPRBlhIGWMeB04ZVmOmNI-cFCt_o2F6UrplKA8,3577
133
133
  arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
134
134
  arkitekt_next/utils.py,sha256=csBRBnxnErMRTilNBYAtIe0lPBb6E3uplqwsVGs5Wkk,2390
135
- arkitekt_next-0.8.4.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
136
- arkitekt_next-0.8.4.dist-info/METADATA,sha256=aoeCJIWABr4uAuurpz5II9VnHRHhIr3LQmKS029Q9-Q,6084
137
- arkitekt_next-0.8.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
- arkitekt_next-0.8.4.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
139
- arkitekt_next-0.8.4.dist-info/RECORD,,
135
+ arkitekt_next-0.8.5.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
136
+ arkitekt_next-0.8.5.dist-info/METADATA,sha256=rpuO5LRMkS_Cfm5aZbD9GjwJ67J1ftUVvkgRjrJMHP0,6084
137
+ arkitekt_next-0.8.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
+ arkitekt_next-0.8.5.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
139
+ arkitekt_next-0.8.5.dist-info/RECORD,,