bohr-agent-sdk 0.1.22__tar.gz → 0.1.24__tar.gz

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.
Files changed (47) hide show
  1. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/PKG-INFO +1 -1
  2. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/setup.py +1 -1
  3. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/PKG-INFO +1 -1
  4. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/executor/local_executor.py +12 -4
  5. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/README.md +0 -0
  6. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/pyproject.toml +0 -0
  7. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/setup.cfg +0 -0
  8. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/SOURCES.txt +0 -0
  9. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/dependency_links.txt +0 -0
  10. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/entry_points.txt +0 -0
  11. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/requires.txt +0 -0
  12. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/bohr_agent_sdk.egg-info/top_level.txt +0 -0
  13. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/__init__.py +0 -0
  14. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/__init__.py +0 -0
  15. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/adk/__init__.py +0 -0
  16. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/adk/client/__init__.py +0 -0
  17. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/adk/client/calculation_mcp_tool.py +0 -0
  18. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/adk/storage_artifact_service.py +0 -0
  19. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/adk/utils.py +0 -0
  20. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/camel/__init__.py +0 -0
  21. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/camel/client/__init__.py +0 -0
  22. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/adapter/camel/client/calculation_mcp_client.py +0 -0
  23. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cli/__init__.py +0 -0
  24. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cli/cli.py +0 -0
  25. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cloud/__init__.py +0 -0
  26. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cloud/main.py +0 -0
  27. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cloud/mcp.py +0 -0
  28. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/cloud/mqtt.py +0 -0
  29. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/device/__init__.py +0 -0
  30. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/device/device/__init__.py +0 -0
  31. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/device/device/device.py +0 -0
  32. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/device/device/types.py +0 -0
  33. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/device/mqtt_device_twin.py +0 -0
  34. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/__init__.py +0 -0
  35. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/calculation_mcp_server.py +0 -0
  36. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/executor/__init__.py +0 -0
  37. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/executor/base_executor.py +0 -0
  38. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/executor/dispatcher_executor.py +0 -0
  39. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/preprocessor.py +0 -0
  40. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/__init__.py +0 -0
  41. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/base_storage.py +0 -0
  42. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/bohrium_storage.py +0 -0
  43. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/http_storage.py +0 -0
  44. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/local_storage.py +0 -0
  45. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/storage/oss_storage.py +0 -0
  46. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/src/dp/agent/server/utils.py +0 -0
  47. {bohr_agent_sdk-0.1.22 → bohr_agent_sdk-0.1.24}/tests/test_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bohr-agent-sdk
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
9
9
 
10
10
  setup(
11
11
  name="bohr-agent-sdk",
12
- version="0.1.22",
12
+ version="0.1.24",
13
13
  description="SDK for science agent and mcp tools",
14
14
  long_description=long_description,
15
15
  long_description_content_type="text/markdown",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bohr-agent-sdk
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -34,6 +34,8 @@ class Tee(io.TextIOBase):
34
34
 
35
35
  def wrapped_fn(fn, kwargs, redirect_file=None):
36
36
  pid = os.getpid()
37
+ # explicitly reload dflow config
38
+ reload_dflow_config()
37
39
  if redirect_file:
38
40
  stdout = sys.stdout
39
41
  flog = open(redirect_file, "w")
@@ -61,7 +63,8 @@ def reload_dflow_config():
61
63
  s3_config = sys.modules["dflow"].s3_config
62
64
  s3_config["storage_client"] = None
63
65
  importlib.reload(sys.modules["dflow.config"])
64
- if "dflow.plugins.bohrium" in sys.modules:
66
+ reload_bohrium = "dflow.plugins.bohrium" in sys.modules
67
+ if reload_bohrium:
65
68
  bohrium_config = sys.modules["dflow.plugins.bohrium"].config
66
69
  importlib.reload(sys.modules["dflow.plugins.bohrium"])
67
70
  importlib.reload(sys.modules["dflow"])
@@ -69,7 +72,7 @@ def reload_dflow_config():
69
72
  sys.modules["dflow"].config = config
70
73
  s3_config.update(sys.modules["dflow"].s3_config)
71
74
  sys.modules["dflow"].s3_config = s3_config
72
- if "dflow.plugins.bohrium" in sys.modules:
75
+ if reload_bohrium:
73
76
  bohrium_config.update(sys.modules["dflow.plugins.bohrium"].config)
74
77
  sys.modules["dflow.plugins.bohrium"].config = bohrium_config
75
78
 
@@ -127,7 +130,12 @@ class LocalExecutor(BaseExecutor):
127
130
  extra_info["workflow_link"] = wf_link
128
131
  break
129
132
  if not alive:
130
- break
133
+ if os.path.isfile("err"):
134
+ with open("err", "r") as f:
135
+ err_msg = f.read()
136
+ else:
137
+ err_msg = "No workflow submitted"
138
+ raise RuntimeError(err_msg)
131
139
  logger.info("Waiting workflow to be submitted")
132
140
  time.sleep(1)
133
141
  self.recover_env(old_env)
@@ -167,7 +175,7 @@ class LocalExecutor(BaseExecutor):
167
175
  os.environ["DP_AGENT_RUNNING_MODE"] = "1"
168
176
  old_env = self.set_env()
169
177
  try:
170
- # explicitly reload dflow config in sync mode
178
+ # explicitly reload dflow config
171
179
  reload_dflow_config()
172
180
  if inspect.iscoroutinefunction(fn):
173
181
  result = await fn(**kwargs)