Skip to content

Commit

Permalink
[WIP] Define a BCO specific uri object
Browse files Browse the repository at this point in the history
apply #49 #48 #50 #51
Define a BCO specific `uri` object
  • Loading branch information
HadleyKing committed Dec 6, 2018
1 parent c3d1c06 commit 49f0aad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
5 changes: 3 additions & 2 deletions HCV1a.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@
]
},
"execution_domain": {
"script_access_type": "URI",
"script": ["https://example.com/workflows/antiviral_resistance_detection_hive.py"],
"script": {
"uri": "https://example.com/workflows/antiviral_resistance_detection_hive.py"
},
"script_driver": "shell",
"software_prerequisites": [
{
Expand Down
18 changes: 5 additions & 13 deletions execution-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,23 @@ Condensed example:
}
```

### 2.5.1 Script Access Type "script_access_type"

This field indicates whether the code of the "script" to execute the BioCompute Object is accessed as an external file via HTTP (URI) or in-line text in the `script` field. Valid options are `URI` or `text`.

```json
"script_access_type": "URI" OR "text"
```

### 2.5.2 Script "script"
### 2.5.1 Script "script"

The Script field points to an internal or external reference to a script object that was used to perform computations for this BCO instance. This may be a reference to an object in GitHub, a computational service or any other type of script.

```json
"script": ["https://example.com/workflows/antiviral_resistance_detection_hive.py"]
```

### 2.5.3 Script driver "script_driver"
### 2.5.2 Script driver "script_driver"

This field provides a space to indicate what kind of executable can be launched in order to perform a sequence of commands described in the script (see above) in order to run the pipeline.

```json
"script_driver": "shell"
```

### 2.5.4 Algorithmic tools and Software Prerequisites "software_prerequisites"
### 2.5.3 Algorithmic tools and Software Prerequisites "software_prerequisites"

An optional multi-value field listing the minimal necessary prerequisites, library, tool versions needed to successfully run the script to produce BCO. The keys are `name`, `version`, and `uri`.

Expand All @@ -73,7 +65,7 @@ An optional multi-value field listing the minimal necessary prerequisites, libra
]
```

### 2.5.5 External Data Endpoints "external_data_endpoints"
### 2.5.4 External Data Endpoints "external_data_endpoints"

An optional multi-value field listing the minimal necessary domain specific external data source access in order to successfully run the script to produce BCO. The values under this field present the requirements for network protocol endpoints used by a pipeline’s scripts, or other software.

Expand All @@ -94,7 +86,7 @@ The key `name` should describe the service that is accessed.
]
```

### 2.5.6 Environment Variables "environment_variables"
### 2.5.5 Environment Variables "environment_variables"

Multi-value additional key value pairs useful to configure the execution environment on the target platform. For example, one might specify the number of compute cores, or available memory use of the script. The possible keys are specific to each platform. The "value" should be a JSON string.

Expand Down
10 changes: 7 additions & 3 deletions schemas/biocomputeobject.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
"uri": {
"$comment": "https://github.com/biocompute-objects/BCO_Specification/blob/1935b9c2765a3d00e44e338ead5b637a5b20b648/primitives.json#L41-L56",
"type": "object",
"description": "TODO",
"additionalProperties": false,
"required": [
"address"
"uri"
],
"properties": {
"address": {
"filename": {
"type": "string"
},
"uri": {
"type": "string",
"format": "uri"
},
Expand All @@ -48,7 +52,7 @@
},
"sha1_chksum": {
"type": "string",
"description": "Sha256 or any hash function that produces a message digest",
"description": "hash function that produces a message digest",
"pattern": "[A-Za-z0-9]+"
}
}
Expand Down
19 changes: 1 addition & 18 deletions schemas/execution_domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"title": "The Execution_domain Schema",
"description": "TODO",
"required": [
"script_access_type",
"script",
"script_driver",
"software_prerequisites",
Expand All @@ -14,24 +13,8 @@
],
"additionalProperties": false,
"properties": {
"script_access_type": {
"type": "string",
"enum": [
"URI",
"text"
],
"description": "Indication of whether the code of the 'script' to execute the BioCompute Object is accessed as an external file via HTTP (URI) or in-line text in the script field."
},
"script": {
"type": "array",
"description": "Points to internal or external references to a script object that was used to perform computations for this BCO instance",
"items": {
"type": "string",
"description": "An internal or external reference to a script object",
"examples": [
"https://example.com/workflows/antiviral_resistance_detection_hive.py"
]
}
"$ref": "biocomputeobject.json#/definitions/uri"
},
"script_driver": {
"type": "string",
Expand Down

0 comments on commit 49f0aad

Please sign in to comment.