You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bio_compose/data_model.py
+19-15
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,19 @@ def to_dict(self):
13
13
returnasdict(self)
14
14
15
15
16
-
classApi:
17
-
endpoint_root: str
18
-
data: Dict
19
-
submitted_jobs: List[Dict]
16
+
classApi(object):
17
+
"""
18
+
Base class inherited by the domain-specific polymorphisms native to this package: ``verifier.Verifier``, ``composer.Composer``, and ``runner.SimulationRunner``.
19
+
20
+
Params:
21
+
- **endpoint_root**: `str`: default base endpoint used by this packaging.
22
+
- **data**: `dict`: default historical collection of data fetched by the given instance of this class.
23
+
- **submitted_jobs**: `list[dict]`: default list of jobs submitted by the given instance.
24
+
"""
20
25
21
26
def__init__(self):
22
-
"""Generic base instance which is inherited by any flavor (tag group) of the BioCompose REST API.
23
-
Each the methods of polymorphism of this base class should pertain entirely to the tag group
24
-
domain with which it is associated (e.g., 'execute-simulations', 'verification', etc.)
27
+
"""
28
+
Generic base instance which is inherited by any flavor (tag group) of the BioCompose REST API. Polymorphism of this base class should pertain entirely to the tag group domain with which it is associated (e.g., 'execute-simulations', 'verification', etc.)
"""Fetch the current state of the job referenced with `job_id`. If the job has not yet been processed, it will return a `status` of `PENDING`. If the job is being processed by
64
-
the service at the time of return, `status` will read `IN_PROGRESS`. If the job is complete, the job state will be returned, optionally with included result data (either JSON or downloadable file data).
67
+
"""
68
+
Fetch the current state of the job referenced with `job_id`. If the job has not yet been processed, it will return a `status` of `PENDING`. If the job is being processed by the service at the time of return, `status` will read `IN_PROGRESS`. If the job is complete, the job state will be returned, optionally with included result data (either JSON or downloadable file data).
65
69
66
-
Args:
67
-
job_id:`str`: The id of the job submission.
68
-
download_dest:`Optional[str]`: Optional directory where the file will be downloaded if the output is a file. Defaults to the current directory.
69
-
filename:`Optional[str]`: Optional filename to save the downloaded file as if the output is a file. If not provided, the filename will be extracted from the Content-Disposition header.
70
+
Args:
71
+
- **job_id**: `str`: The id of the job submission.
72
+
- **download_dest**: `Optional[str]`: Optional directory where the file will be downloaded if the output is a file. Defaults to the current directory.
73
+
- **filename**: `Optional[str]`: Optional filename to save the downloaded file as if the output is a file. If not provided, the filename will be extracted from the Content-Disposition header.
70
74
71
-
Returns:
72
-
If the output is a JSON response, return the parsed JSON as a dictionary. If the output is a file, download the file and return the filepath. If an error occurs, return a RequestError.
75
+
Returns:
76
+
If the output is a JSON response, return the parsed JSON as a dictionary. If the output is a file, download the file and return the filepath. If an error occurs, return a RequestError.
Copy file name to clipboardExpand all lines: bio_compose/runner.py
+25-21
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,22 @@ class SimulationRunner(Api):
14
14
submitted_jobs: List[Dict]
15
15
16
16
def__init__(self):
17
-
"""A new instance of the Verifier class. NOTE: this may clash with your record keeping in a notebook, so it is highly recommended that users treat instances of this class as quasi-singletons, although not necessary for fundamental interaction.
17
+
"""
18
+
A new instance of the Verifier class. NOTE: this may clash with your record keeping in a notebook, so it is highly recommended that users treat instances of this class as quasi-singletons, although not necessary for fundamental interaction.
"""Run a smoldyn simulation using a standard Smoldyn configuration file. Please see https://www.smoldyn.org/SmoldynManual.pdf for more information on running simulations with Smoldyn.
Run a smoldyn simulation using a standard Smoldyn configuration file. Please see https://www.smoldyn.org/SmoldynManual.pdf for more information on running simulations with Smoldyn.
23
25
24
26
Args:
25
-
smoldyn_configuration_filepath:`str`: The path to the Smoldyn configuration file for the given model simulation.
26
-
duration:`int`: The duration of the simulation. If `None` is passed, duration inference will be attempted using `time_stop` parameter within the Smoldyn configuration. Defaults to `None`.
27
-
dt:`float`: The timestep to use within the Smoldyn simulation. If `None` is passed, dt inference will be attempted using the `.dt` parameter of the loaded Smoldyn simulation. Defaults to `None`.
27
+
- **smoldyn_configuration_filepath**: `str`: The path to the Smoldyn configuration file for the given model simulation.
28
+
- **duration**: `int`: The duration of the simulation. If `None` is passed, duration inference will be attempted using `time_stop` parameter within the Smoldyn configuration. Defaults to `None`.
29
+
- **dt**: `float`: The timestep to use within the Smoldyn simulation. If `None` is passed, dt inference will be attempted using the `.dt` parameter of the loaded Smoldyn simulation. Defaults to `None`.
28
30
29
31
Returns:
30
-
The response for the Smoldyn simulation submission request.
32
+
The response for the Smoldyn simulation submission request.
Run a Smoldyn simulation and generate a Simularium trajectory from the aforementioned simulation's outputs.
84
88
85
89
Args:
86
-
smoldyn_output_filepath:`str`: The path to the Smoldyn output file for the given model simulation.
87
-
box_size:`float`: The box size to use for the Simularium trajectory.
88
-
filename:`str`: The name of the Simularium file that is generated. If `None` is passed, a general `'simulation.simularium'` filename will be used. Defaults to `None`.
90
+
- **smoldyn_output_filepath**: `str`: The path to the Smoldyn output file for the given model simulation.
91
+
- **box_size**: `float`: The box size to use for the Simularium trajectory.
92
+
- **filename**: `str`: The name of the Simularium file that is generated. If `None` is passed, a general `'simulation.simularium'` filename will be used. Defaults to `None`.
89
93
90
94
Returns:
91
-
The response for the Simularium submission request.
95
+
The response for the Simularium submission request.
0 commit comments