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.
- {process_bigraph-0.0.45/process_bigraph.egg-info → process_bigraph-0.0.46}/PKG-INFO +1 -1
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/docker.py +13 -2
- {process_bigraph-0.0.45 → process_bigraph-0.0.46/process_bigraph.egg-info}/PKG-INFO +1 -1
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/pyproject.toml +1 -1
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.github/workflows/notebook_to_html.yml +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.github/workflows/pytest.yml +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/.gitignore +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/AUTHORS.md +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CLA.md +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CODE_OF_CONDUCT.md +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/CONTRIBUTING.md +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/LICENSE +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/README.md +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/doc/_static/process-bigraph.png +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/notebooks/process-bigraphs.ipynb +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/notebooks/visualize_processes.ipynb +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/__init__.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/composite.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/emitter.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/experiments/__init__.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/experiments/minimal_gillespie.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/package/__init__.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/package/discover.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/process_types.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/__init__.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/growth_division.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/parameter_scan.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/__init__.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/local.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/parallel.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/protocol.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/rest.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/protocols/socket.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/tests.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/units.py +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/SOURCES.txt +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/dependency_links.txt +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/requires.txt +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/top_level.txt +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/pytest.ini +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/release.sh +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/setup.cfg +0 -0
- {process_bigraph-0.0.45 → process_bigraph-0.0.46}/setup.py +0 -0
|
@@ -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 =
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/experiments/minimal_gillespie.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/growth_division.py
RENAMED
|
File without changes
|
{process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph/processes/parameter_scan.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_bigraph-0.0.45 → process_bigraph-0.0.46}/process_bigraph.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|