@abi-software/simulationvuer 2.0.14 → 2.0.15

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.
package/README.md CHANGED
@@ -1,18 +1,15 @@
1
1
  # SimulationVuer
2
2
 
3
- SimulationVuer is a [Vue](https://vuejs.org/) component used in the [SPARC portal](https://sparc.science/) to run some simulation-based [datasets](https://sparc.science/data?type=dataset).
4
- Some of those datasets (e.g., [135](https://sparc.science/datasets/135?type=simulation) and [157](https://sparc.science/datasets/157?type=simulation)) reference a [CellML](https://cellml.org/)-based model of some biological process and include a [JSON](https://json.org/) file.
3
+ SimulationVuer is a [Vue](https://vuejs.org/) 3 component used in the [SPARC portal](https://sparc.science/) to run some simulation-based [datasets](https://sparc.science/data?type=dataset) that include a [JSON](https://json.org/) file. That JSON file is used by SimulationVuer to create a user interface (Fig. 1) which can then be used by someone to configure a simulation before running it.
5
4
 
6
- The JSON file is used by SimulationVuer to create a user interface (Fig. 1).
7
- The interface can then be used by someone to configure the simulation and then run it.
8
- Using the [SPARC API](https://github.com/nih-sparc/sparc-api), SimulationVuer asks [oSPARC](https://osparc.io/) to run the model (using its [OpenCOR](https://opencor.ws/)-based service) and to retrieve the simulation results, which can then be visualised and interacted with using the interface.
5
+ The simulation is run either on [oSPARC](https://osparc.io/) or in a user's browser, depending on how the simulation-based dataset is referenced (see the `id` property below). In the oSPARC case, SimulationVuer relies on the [SPARC API](https://github.com/nih-sparc/sparc-api) to ask oSPARC to run the model and to retrieve the simulation results, which can then be visualised and interacted with using the interface.
9
6
 
10
7
  ![SimulationVuer](res/135.png)
11
8
  *Figure 1: user interface for dataset [135](https://sparc.science/datasets/simulationviewer?id=135).*
12
9
 
13
10
  ## How to use
14
11
 
15
- To install the package to your Vue application:
12
+ To install the package in your Vue application:
16
13
 
17
14
  ```bash
18
15
  npm install @abi-software/simulationvuer
@@ -24,7 +21,7 @@ To include the package in your script:
24
21
  import { SimulationVuer } from '@abi-software/simulationvuer';
25
22
  ```
26
23
 
27
- To register in a Vue component:
24
+ To register the package as a Vue component:
28
25
 
29
26
  ```javascript
30
27
  export default {
@@ -38,14 +35,21 @@ export default {
38
35
  }
39
36
  ```
40
37
 
41
- The above registers the SimulationVuer component into the global scope.
42
- You can now use the SimulationVuer in your Vue template as follows:
38
+ The above registers the SimulationVuer component into the global scope. You can now use SimulationVuer in your Vue template as follows:
43
39
 
44
40
  ```html
45
41
  <SimulationVuer :apiLocation="apiLocation" :id=123 />
46
42
  ```
47
43
 
48
- where `apiLocation` is the URL to the API location and `id` the id of the simulation-based dataset, if it is a number, or the path to a PMR file, if it is a string.
44
+ where:
45
+ - `apiLocation` is the URL of a running copy of the [SPARC API](https://github.com/nih-sparc/sparc-api); and
46
+ - `id` is:
47
+ - the id of a SPARC simulation-based dataset (as a `Number`, e.g., `135`);
48
+ - the [PMR](https://models.physiomeproject.org/) path to an [OMEX](https://combinearchive.org/) file (as a `String`, e.g., `workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/135.omex`);
49
+ - the direct URL to an OMEX file (as a `String`, e.g., `https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/135.omex`); or
50
+ - a raw OMEX file (as a `Uint8Array`).
51
+
52
+ Note that a simulation will be run on oSPARC if the `id` references a SPARC simulation-based dataset, in a user's browser otherwise.
49
53
 
50
54
  ## Project setup
51
55
 
@@ -77,8 +81,7 @@ npm run build-bundle
77
81
 
78
82
  ## Vue 2 vs. Vue 3
79
83
 
80
- SimulationVuer is now being developed as a Vue 3 component only.
81
- The [Vue 2 version of SimulationVuer](https://github.com/ABI-Software/simulationvuer/tree/vue2) is not maintained anymore.
84
+ SimulationVuer is now being developed as a Vue 3 component only. The [Vue 2 version of SimulationVuer](https://github.com/ABI-Software/simulationvuer/tree/vue2) is not maintained anymore.
82
85
 
83
86
  ## Documentation
84
87