Skip to content

Commit

Permalink
Merge pull request #1431 from virtualcell/sbml-to-finite-volume-input
Browse files Browse the repository at this point in the history
Sbml to finite volume input
  • Loading branch information
AvocadoMoon authored Jan 30, 2025
2 parents 46e03a3 + 233d741 commit cdf2777
Show file tree
Hide file tree
Showing 36 changed files with 3,008 additions and 3 deletions.
3 changes: 2 additions & 1 deletion python-restclient/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ setup.cfg
setup.py
test-requirements.txt
.gitlab-ci.yml
.travis.yml
.travis.yml
pyproject.toml
3 changes: 2 additions & 1 deletion python-restclient/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ docs/SimulationQueueEntryStatusRecord.md
docs/SimulationQueueID.md
docs/SimulationResourceApi.md
docs/SimulationStatusPersistentRecord.md
docs/SolverResourceApi.md
docs/Status.md
docs/StatusMessage.md
docs/User.md
Expand All @@ -45,7 +46,6 @@ docs/UsersResourceApi.md
docs/VCSimulationIdentifier.md
docs/VariableDomain.md
docs/VariableType.md
pyproject.toml
test/__init__.py
tox.ini
vcell_client/__init__.py
Expand All @@ -56,6 +56,7 @@ vcell_client/api/field_data_resource_api.py
vcell_client/api/hello_world_api.py
vcell_client/api/publication_resource_api.py
vcell_client/api/simulation_resource_api.py
vcell_client/api/solver_resource_api.py
vcell_client/api/users_resource_api.py
vcell_client/api_client.py
vcell_client/api_response.py
Expand Down
1 change: 1 addition & 0 deletions python-restclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Class | Method | HTTP request | Description
*SimulationResourceApi* | [**get_simulation_status**](docs/SimulationResourceApi.md#get_simulation_status) | **GET** /api/v1/Simulation/{simID}/simulationStatus | Get the status of simulation running
*SimulationResourceApi* | [**start_simulation**](docs/SimulationResourceApi.md#start_simulation) | **POST** /api/v1/Simulation/{simID}/startSimulation | Start a simulation.
*SimulationResourceApi* | [**stop_simulation**](docs/SimulationResourceApi.md#stop_simulation) | **POST** /api/v1/Simulation/{simID}/stopSimulation | Stop a simulation.
*SolverResourceApi* | [**get_fv_solver_input**](docs/SolverResourceApi.md#get_fv_solver_input) | **GET** /api/v1/solver/getFVSolverInput | Retrieve finite volume input from SBML spatial model.
*UsersResourceApi* | [**forgot_legacy_password**](docs/UsersResourceApi.md#forgot_legacy_password) | **POST** /api/v1/users/forgotLegacyPassword | The end user has forgotten the legacy password they used for VCell, so they will be emailed it.
*UsersResourceApi* | [**get_guest_legacy_api_token**](docs/UsersResourceApi.md#get_guest_legacy_api_token) | **POST** /api/v1/users/guestBearerToken | Method to get legacy tokens for guest users
*UsersResourceApi* | [**get_legacy_api_token**](docs/UsersResourceApi.md#get_legacy_api_token) | **POST** /api/v1/users/bearerToken | Get token for legacy API
Expand Down
73 changes: 73 additions & 0 deletions python-restclient/docs/SolverResourceApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# vcell_client.SolverResourceApi

All URIs are relative to *https://vcell-dev.cam.uchc.edu*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_fv_solver_input**](SolverResourceApi.md#get_fv_solver_input) | **GET** /api/v1/solver/getFVSolverInput | Retrieve finite volume input from SBML spatial model.


# **get_fv_solver_input**
> bytearray get_fv_solver_input(sbml_file=sbml_file)
Retrieve finite volume input from SBML spatial model.

### Example

```python
import time
import os
import vcell_client
from vcell_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
# See configuration.py for a list of all supported configuration parameters.
configuration = vcell_client.Configuration(
host = "https://vcell-dev.cam.uchc.edu"
)


# Enter a context with an instance of the API client
with vcell_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vcell_client.SolverResourceApi(api_client)
sbml_file = None # bytearray | (optional)

try:
# Retrieve finite volume input from SBML spatial model.
api_response = api_instance.get_fv_solver_input(sbml_file=sbml_file)
print("The response of SolverResourceApi->get_fv_solver_input:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolverResourceApi->get_fv_solver_input: %s\n" % e)
```



### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sbml_file** | **bytearray**| | [optional]

### Return type

**bytearray**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/octet-stream

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

73 changes: 73 additions & 0 deletions python-restclient/docs/SpatialResourceApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# vcell_client.SpatialResourceApi

All URIs are relative to *https://vcell-dev.cam.uchc.edu*

Method | HTTP request | Description
------------- | ------------- | -------------
[**retrieve_finite_volume_input_from_spatial_model**](SpatialResourceApi.md#retrieve_finite_volume_input_from_spatial_model) | **GET** /api/v1/spatial/retrieveFiniteVolumeInputFromSpatialModel | Retrieve finite volume input from spatial model


# **retrieve_finite_volume_input_from_spatial_model**
> bytearray retrieve_finite_volume_input_from_spatial_model(sbml_file=sbml_file)
Retrieve finite volume input from spatial model

### Example

```python
import time
import os
import vcell_client
from vcell_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
# See configuration.py for a list of all supported configuration parameters.
configuration = vcell_client.Configuration(
host = "https://vcell-dev.cam.uchc.edu"
)


# Enter a context with an instance of the API client
with vcell_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vcell_client.SpatialResourceApi(api_client)
sbml_file = None # bytearray | (optional)

try:
# Retrieve finite volume input from spatial model
api_response = api_instance.retrieve_finite_volume_input_from_spatial_model(sbml_file=sbml_file)
print("The response of SpatialResourceApi->retrieve_finite_volume_input_from_spatial_model:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SpatialResourceApi->retrieve_finite_volume_input_from_spatial_model: %s\n" % e)
```



### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sbml_file** | **bytearray**| | [optional]

### Return type

**bytearray**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/octet-stream

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

39 changes: 39 additions & 0 deletions python-restclient/test/test_solver_resource_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# coding: utf-8

"""
VCell API
VCell API
The version of the OpenAPI document: 1.0.1
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501


import unittest

from vcell_client.api.solver_resource_api import SolverResourceApi


class TestSolverResourceApi(unittest.TestCase):
"""SolverResourceApi unit test stubs"""

def setUp(self) -> None:
self.api = SolverResourceApi()

def tearDown(self) -> None:
pass

def test_get_fv_solver_input(self) -> None:
"""Test case for get_fv_solver_input
Retrieve finite volume input from SBML spatial model.
"""
pass


if __name__ == '__main__':
unittest.main()
39 changes: 39 additions & 0 deletions python-restclient/test/test_spatial_resource_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# coding: utf-8

"""
VCell API
VCell API
The version of the OpenAPI document: 1.0.1
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501


import unittest

from vcell_client.api.spatial_resource_api import SpatialResourceApi


class TestSpatialResourceApi(unittest.TestCase):
"""SpatialResourceApi unit test stubs"""

def setUp(self) -> None:
self.api = SpatialResourceApi()

def tearDown(self) -> None:
pass

def test_retrieve_finite_volume_input_from_spatial_model(self) -> None:
"""Test case for retrieve_finite_volume_input_from_spatial_model
Retrieve finite volume input from spatial model
"""
pass


if __name__ == '__main__':
unittest.main()
1 change: 1 addition & 0 deletions python-restclient/vcell_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from vcell_client.api.hello_world_api import HelloWorldApi
from vcell_client.api.publication_resource_api import PublicationResourceApi
from vcell_client.api.simulation_resource_api import SimulationResourceApi
from vcell_client.api.solver_resource_api import SolverResourceApi
from vcell_client.api.users_resource_api import UsersResourceApi

# import ApiClient
Expand Down
1 change: 1 addition & 0 deletions python-restclient/vcell_client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
from vcell_client.api.hello_world_api import HelloWorldApi
from vcell_client.api.publication_resource_api import PublicationResourceApi
from vcell_client.api.simulation_resource_api import SimulationResourceApi
from vcell_client.api.solver_resource_api import SolverResourceApi
from vcell_client.api.users_resource_api import UsersResourceApi

Loading

0 comments on commit cdf2777

Please sign in to comment.