Skip to content

Commit 889f8c9

Browse files
committed
added documentation
1 parent eb11995 commit 889f8c9

38 files changed

+4630
-109
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
The primary method of user-facing interaction for this service is done through the use of a high-level "notebook" api called `bio_check`.
1313
A convenient notebook demonstrating the functionality of this service is hosted on Google Colab and can be accessed by clicking the above "Open In Colab" badge.
1414

15-
[View the template notebook as markdown](docs/verification_api_demo.md)
15+
[View the template notebook as markdown](documentation/verification_api_demo.md)
1616

1717

1818
Installation of this tooling can be performed using PyPI as such:

bio_compose/runner.py

+22-25
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@ class SimulationRunner(Api):
1414
submitted_jobs: List[Dict]
1515

1616
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
18-
treat instances of this class as quasi-singletons, although not necessary for fundamental interaction.
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.
1918
"""
2019
super().__init__()
2120

2221
def run_smoldyn_simulation(self, smoldyn_configuration_filepath: str, duration: int = None, dt: float = None) -> Dict[str, Any]:
23-
"""Run a smoldyn simulation using a standard Smoldyn configuration file. Please see https://www.smoldyn.org/SmoldynManual.pdf for more information on running
24-
simulations with Smoldyn.
22+
"""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.
2523
26-
Args:
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`.
24+
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`.
3028
31-
Returns:
32-
The response for the Smoldyn simulation submission request.
29+
Returns:
30+
The response for the Smoldyn simulation submission request.
3331
3432
"""
3533
endpoint = self._format_endpoint(f'run-smoldyn')
@@ -53,15 +51,15 @@ def run_smoldyn_simulation(self, smoldyn_configuration_filepath: str, duration:
5351
def run_utc_simulation(self, sbml_filepath: str, start: int, end: int, steps: int, simulator: str) -> Dict[str, Any]:
5452
"""Run a uniform time course simulation of the model specified in `sbml_filepath` with a supported simulator.
5553
56-
Args:
57-
sbml_filepath:`str`: The path to a valid SBML file.
58-
start:`int`: The start time of the simulation.
59-
end:`int`: The end time of the simulation.
60-
steps:`int`: The number of steps to record within the ODE.
61-
simulator:`str`: The simulator to use. Currently, simulator choices include: `'amici'`, `'copasi'`, or `'tellurium'`.
54+
Args:
55+
sbml_filepath:`str`: The path to a valid SBML file.
56+
start:`int`: The start time of the simulation.
57+
end:`int`: The end time of the simulation.
58+
steps:`int`: The number of steps to record within the ODE.
59+
simulator:`str`: The simulator to use. Currently, simulator choices include: `'amici'`, `'copasi'`, or `'tellurium'`.
6260
63-
Returns:
64-
The response for the UTC simulation submission request.
61+
Returns:
62+
The response for the UTC simulation submission request.
6563
"""
6664
endpoint = self._format_endpoint(f'run-utc')
6765

@@ -84,14 +82,13 @@ def run_utc_simulation(self, sbml_filepath: str, start: int, end: int, steps: in
8482
def generate_simularium_file(self, smoldyn_output_filepath: str, box_size: float, filename: str = None) -> Dict[str, Any]:
8583
"""Run a Smoldyn simulation and generate a Simularium trajectory from the aforementioned simulation's outputs.
8684
87-
Args:
88-
smoldyn_output_filepath:`str`: The path to the Smoldyn output file for the given model simulation.
89-
box_size:`float`: The box size to use for the Simularium trajectory.
90-
filename:`str`: The name of the Simularium file that is generated. If `None` is passed, a general `'simulation.simularium'` filename will be used.
91-
Defaults to `None`.
85+
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`.
9289
93-
Returns:
94-
The response for the Simularium submission request.
90+
Returns:
91+
The response for the Simularium submission request.
9592
"""
9693
endpoint = self._format_endpoint(f'generate-simularium-file')
9794

0 commit comments

Comments
 (0)