process-bigraph 0.0.45__tar.gz → 0.0.46__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 (43) hide show
  1. {process_bigraph-0.0.45/process_bigraph.egg-info → process_bigraph-0.0.46}/PKG-INFO +1 -1
  2. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/docker.py +13 -2
  3. {process_bigraph-0.0.45 → process_bigraph-0.0.46/process_bigraph.egg-info}/PKG-INFO +1 -1
  4. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/pyproject.toml +1 -1
  5. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.github/workflows/notebook_to_html.yml +0 -0
  6. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.github/workflows/pytest.yml +0 -0
  7. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.gitignore +0 -0
  8. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/AUTHORS.md +0 -0
  9. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CLA.md +0 -0
  10. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CODE_OF_CONDUCT.md +0 -0
  11. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CONTRIBUTING.md +0 -0
  12. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/LICENSE +0 -0
  13. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/README.md +0 -0
  14. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/doc/_static/process-bigraph.png +0 -0
  15. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/notebooks/process-bigraphs.ipynb +0 -0
  16. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/notebooks/visualize_processes.ipynb +0 -0
  17. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/__init__.py +0 -0
  18. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/composite.py +0 -0
  19. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/emitter.py +0 -0
  20. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/experiments/__init__.py +0 -0
  21. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/experiments/minimal_gillespie.py +0 -0
  22. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/package/__init__.py +0 -0
  23. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/package/discover.py +0 -0
  24. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/process_types.py +0 -0
  25. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/__init__.py +0 -0
  26. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/growth_division.py +0 -0
  27. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/parameter_scan.py +0 -0
  28. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/__init__.py +0 -0
  29. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/local.py +0 -0
  30. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/parallel.py +0 -0
  31. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/protocol.py +0 -0
  32. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/rest.py +0 -0
  33. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/socket.py +0 -0
  34. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/tests.py +0 -0
  35. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/units.py +0 -0
  36. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/SOURCES.txt +0 -0
  37. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/dependency_links.txt +0 -0
  38. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/requires.txt +0 -0
  39. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/top_level.txt +0 -0
  40. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/pytest.ini +0 -0
  41. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/release.sh +0 -0
  42. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/setup.cfg +0 -0
  43. {process_bigraph-0.0.45 → process_bigraph-0.0.46}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-bigraph
3
- Version: 0.0.45
3
+ Version: 0.0.46
4
4
  Summary: protocol and execution for compositional systems biology
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -16,6 +16,8 @@ from typing import Any, Dict, Optional, Union, List, Tuple
16
16
 
17
17
  import docker
18
18
 
19
+ from docker import DockerClient
20
+
19
21
  from process_bigraph.composite import Process, SyncUpdate
20
22
  from process_bigraph.protocols.protocol import Protocol
21
23
  from process_bigraph.protocols.local import LocalProtocol
@@ -228,12 +230,21 @@ class DockerProcess(Process):
228
230
  def __del__(self) -> None:
229
231
  self.end()
230
232
 
233
+ def initialize_docker():
234
+ client: DockerClient = None
235
+ try:
236
+ client = docker.from_env()
237
+ except Exception:
238
+ pass # We handle this by checking if client is None elsewhere.
239
+ return client
231
240
 
232
241
  class DockerProtocol(Protocol):
233
- client = docker.from_env()
242
+ client = initialize_docker()
234
243
 
235
244
  @classmethod
236
245
  def interface(cls, core, data):
246
+ if cls.client is None:
247
+ raise NotImplementedError("Docker was unable to be initialized; check your installation and try again.")
237
248
  image = cls.client.images.get(
238
249
  data['image'])
239
250
 
@@ -248,4 +259,4 @@ class DockerProtocol(Protocol):
248
259
  core)
249
260
 
250
261
  instantiate.config_schema = config_schema
251
- return instantiate
262
+ return instantiate
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-bigraph
3
- Version: 0.0.45
3
+ Version: 0.0.46
4
4
  Summary: protocol and execution for compositional systems biology
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "process-bigraph"
3
- version = "0.0.45"
3
+ version = "0.0.46"
4
4
  description = "protocol and execution for compositional systems biology"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"