Skip to content

Commit

Permalink
document biosim_pipeline commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Dec 3, 2023
1 parent 57b0445 commit 033ad5e
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 158 deletions.
131 changes: 1 addition & 130 deletions python-utils/README.md
Original file line number Diff line number Diff line change
@@ -1,130 +1 @@
create a .env file with the following:

```properties
CLIENT_ID=<<auth-provider-client-id>>
CLIENT_SECRET=<<auth-provider-client-secret>>
AUTH_HOST=auth.biosimulations.org
AUTH_AUDIENCE=api.biosimulations.org
API_BASE_URL=https://api.biosimulations.org
RUN_APP_BASE_URL=https://run.biosimulations.org

OMEX_SOURCE_DIR=<<path-to-source-omex-files>>
OMEX_OUTPUT_DIR=<<path-to-output-artifacts>>
```

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py --help
```

```
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help Show this message and exit.
Commands:
compare_runs compare downloaded runs
download_runs download runs (results.zip) from BioSimulations
publish publish validated projects to BioSimulations
refresh_status fetch status of runs and update biosimulations_runs.ndjson
upload_omex upload and run OMEX files at BioSimulations
```

## upload OMEX files

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py upload_omex --help
```

```
Usage: cli.py upload_omex [OPTIONS]
upload and run OMEX files at BioSimulations
Options:
--simulator [tellurium|copasi|amici|vcell|pysces|libsbmlsim]
simulator to run [default: Simulator.vcell]
--project-id TEXT filter by project_id
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--help Show this message and exit.
```

## download runs

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py download_runs --help
```

```
Usage: cli.py download_runs [OPTIONS]
download runs (results.zip) from BioSimulations
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--simulator [tellurium|copasi|amici|vcell|pysces|libsbmlsim]
filter by simulator
--help Show this message and exit.
```

## refresh status

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py refresh_status --help
```

```
Usage: cli.py refresh_status [OPTIONS]
fetch status of runs and update biosimulations_runs.ndjson
Options:
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--help Show this message and exit.
```

## compare runs

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py compare_runs --help
```

```
Usage: cli.py compare_runs [OPTIONS]
compare downloaded runs
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--help Show this message and exit.
```

## publish

```bash
poetry run python vcutils/biosimulations_pipeline/cli.py publish --help
```

```
Usage: cli.py publish [OPTIONS]
publish validated projects to BioSimulations
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--help Show this message and exit.
```
See [Managed Biosim pipeline](vcutils/biosim_pipeline/README.md) for details about series of commands to upload/run, check status, download, compare results, and publish models to BioSimulations.
120 changes: 120 additions & 0 deletions python-utils/vcutils/biosim_pipeline/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@

# Managed Biosim pipeline

## Command Overview

1. [upload OMEX files](#upload-omex-files)
2. [refresh status](#refresh-status)
3. [download runs](#download-runs)
4. [compare runs](#compare-runs)
5. [publish](#publish)

## Setup

create a .env file with the following:

```properties
CLIENT_ID=<<auth-provider-client-id>>
CLIENT_SECRET=<<auth-provider-client-secret>>
AUTH_HOST=auth.biosimulations.org
AUTH_AUDIENCE=api.biosimulations.org
API_BASE_URL=https://api.biosimulations.org
RUN_APP_BASE_URL=https://run.biosimulations.org

OMEX_SOURCE_DIR=<<path-to-source-omex-files>>
OMEX_OUTPUT_DIR=<<path-to-output-artifacts>>
```

## upload OMEX files

```bash
poetry run python main.py upload_omex --help
```

```
Usage: main.py upload_omex [OPTIONS]
upload and run OMEX files at BioSimulations
Options:
--simulator [tellurium|copasi|amici|vcell|pysces|libsbmlsim]
simulator to run [default: Simulator.vcell]
--project-id TEXT filter by project_id
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--help Show this message and exit.
```

## refresh status

```bash
poetry run python main.py refresh_status --help
```

```
Usage: main.py refresh_status [OPTIONS]
fetch status of runs and update biosimulations_runs.ndjson
Options:
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--help Show this message and exit.
```

## download runs

```bash
poetry run python main.py download_runs --help
```

```
Usage: main.py download_runs [OPTIONS]
download runs (results.zip) from BioSimulations
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--simulator [tellurium|copasi|amici|vcell|pysces|libsbmlsim]
filter by simulator
--help Show this message and exit.
```


## compare runs

```bash
poetry run python main.py compare_runs --help
```

```
Usage: main.py compare_runs [OPTIONS]
compare downloaded runs
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--help Show this message and exit.
```

## publish

```bash
poetry run python main.py publish --help
```

```
Usage: main.py publish [OPTIONS]
publish validated projects to BioSimulations
Options:
--omex-src-dir PATH defaults env.OMEX_SOURCE_DIR
--out-dir PATH defaults to env.OMEX_OUTPUT_DIR
--project-id TEXT filter by project_id
--help Show this message and exit.
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import requests
from pydantic import BaseModel

from data_manager import DataManager
from datamodels import SourceOmex, Simulator, SimulationRun, BiosimulationsProject
from vcutils.biosim_pipeline.data_manager import DataManager
from vcutils.biosim_pipeline.datamodels import SourceOmex, Simulator, SimulationRun, BiosimulationsProject


class _SimulationRunApiRequest(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import Optional

from vcutils.biosimulations_pipeline.datamodels import (
from vcutils.biosim_pipeline.datamodels import (
BiosimulationsProject,
SourceOmex,
SimulationRun,
Expand Down
Loading

0 comments on commit 033ad5e

Please sign in to comment.