Instructions for adapting your code to an analysis pipeline
Step 1: Creating a YAML file
Each script should be accompanied by a YAML file (.yml extension) that specifies inputs and outputs of that step of the pipeline.
+
Markdown is supported for pipeline, script, input and output descriptions. See this CommonMark quick reference for allowed markups.
Name and description
YAML files should begin with a name, description, and authors of the script. The name should be the same as the script that it describes but with a .yml extension.
@@ -273,9 +274,9 @@
Inputs
There are several different types of user inputs that can be specified in the YAML file:
-
-
-
+
+
+
@@ -377,26 +378,31 @@
Outputs
Map widget (leaflet)
+
HTML
+
text/html
+
Open in new tab
+
+
JPG
image/jpg
tag
-
+
Shapefile
application/dbf
Link
-
+
Text
text/plain
Plain text
-
+
TSV
text/tab-separated-values
HTML table (partial content)
-
+
(any unknown type)
Plain text or link
@@ -414,7 +420,7 @@
Outputs
Specifying R package dependencies with conda
“Conda provides package, dependency, and environment management for any language.” If a script is dependent on a specific package version, conda will load that package version to prevent breaking changes when packages are updated. BON in a Box uses a central conda environment that includes commonly used libraries, and supports dedicated environments for the scripts that need it.
-
This means that instead of installing packages in R scripts, they are installed in the R environment in conda. Note that you still need to load the packages in your scripts.
+
This means that instead of installing packages in R scripts, they are installed in the R environment in Conda. Note that you still need to load the packages in your scripts.
The script reads the input.json file that is in the run folder. This JSON file is automatically created from the BON in a Box pipeline. Here is an example of how to read the input folder in the R script:
diff --git a/docs/search.json b/docs/search.json
index b2f9b0e7..741afac0 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -144,14 +144,14 @@
"href": "how_to_contribute.html#step-1-creating-a-yaml-file",
"title": "How to Contribute",
"section": "Step 1: Creating a YAML file",
- "text": "Step 1: Creating a YAML file\nEach script should be accompanied by a YAML file (.yml extension) that specifies inputs and outputs of that step of the pipeline.\n\nName and description\nYAML files should begin with a name, description, and authors of the script. The name should be the same as the script that it describes but with a .yml extension.\nExample:\nscript: script_name.R\nname: Script Name\ndescription: Describe what the script does\nauthor:\n - name: John Doe (john.doe@gmail.com)\n - name: Jane Doe (jane.doe@gmail.com)\n\n\nInputs\nNext, the YAML file should specify the inputs of the script. These inputs will either be outputs from the previous script, which can be connected by lines in the pipeline editor, or specified by the user in the input form.\nHere is an example where the input is a raster file of land cover pulled from a public database and a coordinate reference system that is specified by the user:\ninputs:\n landcover_raster:\n label: Raster of landcover\n description: Landcover data pulled from EarthEnv database with 1x1km resolution\n type: application/geo+json\n crs:\n label: coordinate reference system for output\n description: ESPG coordinate reference system for output\n type: int\n example: 4326\n unit_distance:\n label: unit for distance measurement\n description: String value of\n type: options\n options:\n - \"m2\"\n - \"km2\"\nSpecifying an example will autofill that input with the example unless changed by the user. Not specifying an example will leave that input blank (null).\nThere are several different types of user inputs that can be specified in the YAML file:\n\n\n\n\n\n\n\n\n“Type” attribute in the yaml\nIU rendering\nDescription\n\n\n\n\nboolean\nPlain text\ntrue/false\n\n\nfloat, float[]\nPlain text\npositive and negative numbers with a decimal point\n\n\nint, int[]\nPlain text\ninteger\n\n\noptions1\nPlain text\ndropdown menu\n\n\ntext, text[]\nPlain text\ntext input (words)\n\n\n(any unknown type)\nPlain text\n\n\n\n\n1options type requires an additioal options attribute to be added with the available options.\noptions_example:\n label: Options example\n description: The user has to select between a fixed number of text options. Also called select or enum. The script receives the selected option as text.\n type: options\n options:\n - first option\n - second option\n - third option\n example: third option\n\n\nOutputs\nAfter specifying the inputs, you can specify what you want the script to output.\nHere is an example:\noutputs:\n result:\n label: Analysis result\n description: The result of the analysis, in CSV form\n type: text/csv\n result_plot:\n label: Result plot\n description: Plot of results\n type: image/png\nThere are also several types of outputs that can be created\n\n\n\n\n\n\n\n\nFile Type\nMIME type to use in the yaml\nUI rendering\n\n\n\n\nCSV\ntext/csv\nHTML table (partial content)\n\n\nGeoJSON\napplication/geo+json\nMap\n\n\nGeoPackage\napplication/geopackage+sqlite3\nLink\n\n\nGeoTIFF2\nimage/tiff;application=geotiff\nMap widget (leaflet)\n\n\nJPG\nimage/jpg\ntag\n\n\nShapefile\napplication/dbf\nLink\n\n\nText\ntext/plain\nPlain text\n\n\nTSV\ntext/tab-separated-values\nHTML table (partial content)\n\n\n\n(any unknown type)\nPlain text or link\n\n\n\n2When used as an output, image/tiff;application=geotiff type allows an additional range attribute to be added with the min and max values that the tiff should hold. This will be used for display purposes.\nmap:\n label: My map\n description: Some map that shows something\n type: image/tiff;application=geotiff\n range: [0.1, 254]\n example: https://example.com/mytiff.tif\n\n\nSpecifying R package dependencies with conda\n“Conda provides package, dependency, and environment management for any language.” If a script is dependent on a specific package version, conda will load that package version to prevent breaking changes when packages are updated. BON in a Box uses a central conda environment that includes commonly used libraries, and supports dedicated environments for the scripts that need it.\nThis means that instead of installing packages in R scripts, they are installed in the R environment in conda. Note that you still need to load the packages in your scripts.\n\nCheck if the libraries you need are in conda\n\nTo check if the packages you need are already in the R environment in conda, go to runners/r-environment.yml in the BON in a Box project folder. The list of packages already installed will be under “dependencies”.\n\n\n\nInstall any libraries that are not already in the environment\n\nIf your package is not already in the R environment, you will need to add it.\nFirst, search for the package name on anaconda. Packages that are in anaconda will be recognized and easily loaded by conda. If it is there:\n\nAdd it to the runners/r-environment.yml file\nAdd it to your local environment, replacing <package name> in: docker exec -it biab-runner-conda mamba install -n rbase <package name> in the terminal. Make sure the program is in front of the package name (e.g. r-tidyverse)\n\nIf it is not found in anaconda\n\nGo to the runners/conda-dockerfile and add it to the install command. Replace <package> with your package name.\nRUN bash --login -c \"mamba activate rbase; R -e 'install.packages(c(\\<package 1>\\\", \\\n \\\"<package 2>\\\", \\\n \\\"<package 3>\\\"\\\n ), repos=\\\"https://cloud.r-project.org/\\\")'\"\nOr for packages in development loaded from github.\nRUN bash --login -c \"mamba activate rbase; R -e 'devtools::install_github(\\\"<user>/<package>\\\")'\"\nInstall in in your local environment by typing this in the terminal, replacing <packages> (three commands should be pasted separately):\ndocker exec -it biab-runner-conda bash\n\nmamba activate rbase\n\nR -e 'install.packages(c(<packages>), repose=\"https://cloud.r-project.org/\")\n\nYou can use devtools::install_github() in a similar fashion:\ndocker exec -it biab-runner-conda bash\n\nmamba activate rbase\n\nR -e 'devtools::install_github(\"<user>/<package>\")'\n\nDo not add these packages to the r-environment file or the conda portion of the yml file because conda will not be able to recognize them\n\nTo refresh the R environment to match the r-environment.yml file, run docker exec -u root -it biab-runner-conda mamba env update –file r-environment.yml in the terminal.\n\n\n\nAdd any version dependencies to your yml file\n\nIf your script does not require a specific version, you do not need to include a conda section to the yml file. The environment will be the default R environment.\nIf you need a specific version of an already installed library, such as when a breaking change occurs and the script cannot be adapted to use the new version, you can use conda to specify a specific package version in your yml file.\n\nIf you include a conda section, make sure you list all your dependencies. This is creating a new separate environment, not a supplement to the base environment. This means that all of the packages that you need need to be specified in here, even if they are in the r-environment.yml file.\n\n\nconda: # Optional: if you script requires specific versions of packages.\n channels:\n - conda-forge\n - r\n dependencies:\n - r-rjson # read inputs and save outputs for R scripts\n - package=version\nFor more information, refer to the conda documentation.\n\n\n\nExamples\nHere is an example of a complete YAML file with inputs and outputs:\nscript: script_name.R\nname: Script Name\ndescription: Describe what the script does\nauthor:\n - name: John Doe (john.doe@gmail.com)\n - name: Jane Doe (jane.doe@gmail.com)\ninputs:\n landcover_raster:\n label: Raster of landcover\n description: Landcover data pulled from EarthEnv database with 1x1km resolution\n type: application/geo+json\n crs:\n label: coordinate reference system for output\n description: ESPG coordinate reference system for output\n type: int\n example: 4326\n unit_distance:\n label: unit for distance measurement\n description: String value of\n type: options\n options:\n - \"m2\"\n - \"km2\"\noutputs:\n result:\n label: Analysis result\n description: The result of the analysis, in CSV form\n type: text/csv\n result_plot:\n label: Result plot\n description: Plot of results\n type: image/png\nconda: # Optional, only needed if your script has specific package dependencies\n channels:\n - r\n dependencies:\n - r-rjson=0.2.22 #package=version\nYAML is a space sensitive format, so make sure all the tab sets are correct in the file.\nIf inputs are outputs from a previous step in the pipeline, make sure to give the inputs and outputs the same name and they will be automatically linked in the pipeline.\nHere is an empty commented sample that can be filled in\nscript: # script file with extension, such as \"myScript.R\".\nname: # short name, such as My Script\ndescription: # Targeted to those who will interpret pipeline results and edit pipelines.\nauthor: # 1 to many\n - name: # Full name\n email: # Optional, email address of the author. This will be publicly available.\n identifier: # Optional, full URL of a unique digital identifier, such as an ORCID.\nlicense: # Optional. If unspecified, the project's MIT license will apply.\nexternal_link: # Optional, link to a separate project, github repo, etc.\ntimeout: # Optional, in minutes. By defaults steps time out after 1h to avoid hung process to consume resources. It can be made longer for heavy processes.\n\ninputs: # 0 to many\n key: # replace the word \"key\" by a snake case identifier for this input\n label: # Human-readable version of the name\n description: # Targetted to those who will interpret pipeline results and edit pipelines.\n type: # see below\n example: # will also be used as default value, can be null\n\noutputs: # 1 to many\n key:\n label:\n description:\n type:\n example: # optional, for documentation purpose only\n\nreferences: # 0 to many\n - text: # plain text reference\n doi: # link\n\nconda: # Optional, only needed if your script has specific package dependencies\n channels: # programs that you need\n - # list here\n dependencies: # any packages that are dependent on a specfic version\n - # list here\nSee example"
+ "text": "Step 1: Creating a YAML file\nEach script should be accompanied by a YAML file (.yml extension) that specifies inputs and outputs of that step of the pipeline.\nMarkdown is supported for pipeline, script, input and output descriptions. See this CommonMark quick reference for allowed markups.\n\nName and description\nYAML files should begin with a name, description, and authors of the script. The name should be the same as the script that it describes but with a .yml extension.\nExample:\nscript: script_name.R\nname: Script Name\ndescription: Describe what the script does\nauthor:\n - name: John Doe (john.doe@gmail.com)\n - name: Jane Doe (jane.doe@gmail.com)\n\n\nInputs\nNext, the YAML file should specify the inputs of the script. These inputs will either be outputs from the previous script, which can be connected by lines in the pipeline editor, or specified by the user in the input form.\nHere is an example where the input is a raster file of land cover pulled from a public database and a coordinate reference system that is specified by the user:\ninputs:\n landcover_raster:\n label: Raster of landcover\n description: Landcover data pulled from EarthEnv database with 1x1km resolution\n type: application/geo+json\n crs:\n label: coordinate reference system for output\n description: ESPG coordinate reference system for output\n type: int\n example: 4326\n unit_distance:\n label: unit for distance measurement\n description: String value of\n type: options\n options:\n - \"m2\"\n - \"km2\"\nSpecifying an example will autofill that input with the example unless changed by the user. Not specifying an example will leave that input blank (null).\nThere are several different types of user inputs that can be specified in the YAML file:\n\n\n\n\n\n\n\n\n“Type” attribute in the yaml\nIU rendering\nDescription\n\n\n\n\nboolean\nPlain text\ntrue/false\n\n\nfloat, float[]\nPlain text\npositive and negative numbers with a decimal point\n\n\nint, int[]\nPlain text\ninteger\n\n\noptions1\nPlain text\ndropdown menu\n\n\ntext, text[]\nPlain text\ntext input (words)\n\n\n(any unknown type)\nPlain text\n\n\n\n\n1options type requires an additioal options attribute to be added with the available options.\noptions_example:\n label: Options example\n description: The user has to select between a fixed number of text options. Also called select or enum. The script receives the selected option as text.\n type: options\n options:\n - first option\n - second option\n - third option\n example: third option\n\n\nOutputs\nAfter specifying the inputs, you can specify what you want the script to output.\nHere is an example:\noutputs:\n result:\n label: Analysis result\n description: The result of the analysis, in CSV form\n type: text/csv\n result_plot:\n label: Result plot\n description: Plot of results\n type: image/png\nThere are also several types of outputs that can be created\n\n\n\n\n\n\n\n\nFile Type\nMIME type to use in the yaml\nUI rendering\n\n\n\n\nCSV\ntext/csv\nHTML table (partial content)\n\n\nGeoJSON\napplication/geo+json\nMap\n\n\nGeoPackage\napplication/geopackage+sqlite3\nLink\n\n\nGeoTIFF2\nimage/tiff;application=geotiff\nMap widget (leaflet)\n\n\nHTML\ntext/html\nOpen in new tab\n\n\nJPG\nimage/jpg\ntag\n\n\nShapefile\napplication/dbf\nLink\n\n\nText\ntext/plain\nPlain text\n\n\nTSV\ntext/tab-separated-values\nHTML table (partial content)\n\n\n\n(any unknown type)\nPlain text or link\n\n\n\n2When used as an output, image/tiff;application=geotiff type allows an additional range attribute to be added with the min and max values that the tiff should hold. This will be used for display purposes.\nmap:\n label: My map\n description: Some map that shows something\n type: image/tiff;application=geotiff\n range: [0.1, 254]\n example: https://example.com/mytiff.tif\n\n\nSpecifying R package dependencies with conda\n“Conda provides package, dependency, and environment management for any language.” If a script is dependent on a specific package version, conda will load that package version to prevent breaking changes when packages are updated. BON in a Box uses a central conda environment that includes commonly used libraries, and supports dedicated environments for the scripts that need it.\nThis means that instead of installing packages in R scripts, they are installed in the R environment in Conda. Note that you still need to load the packages in your scripts.\n\nCheck if the libraries you need are in conda\n\nTo check if the packages you need are already in the R environment in conda, go to runners/r-environment.yml in the BON in a Box project folder. The list of packages already installed will be under “dependencies”.\n\n\n\nInstall any libraries that are not already in the environment\n\nIf your package is not already in the R environment, you will need to add it.\nFirst, search for the package name on anaconda. Packages that are in anaconda will be recognized and easily loaded by conda. If it is there:\n\nAdd it to the runners/r-environment.yml file\nAdd it to your local environment, replacing <package name> in: docker exec -it biab-runner-conda mamba install -n rbase <package name> in the terminal. Make sure the program is in front of the package name (e.g. r-tidyverse)\n\nIf it is not found in anaconda\n\nGo to the runners/conda-dockerfile and add it to the install command. Replace <package> with your package name.\nRUN bash --login -c \"mamba activate rbase; R -e 'install.packages(c(\\<package 1>\\\", \\\n \\\"<package 2>\\\", \\\n \\\"<package 3>\\\"\\\n ), repos=\\\"https://cloud.r-project.org/\\\")'\"\nOr for packages in development loaded from github.\nRUN bash --login -c \"mamba activate rbase; R -e 'devtools::install_github(\\\"<user>/<package>\\\")'\"\nInstall in in your local environment by typing this in the terminal, replacing <packages> (three commands should be pasted separately):\ndocker exec -it biab-runner-conda bash\n\nmamba activate rbase\n\nR -e 'install.packages(c(\"<packages>\"\"), repos=\"https://cloud.r-project.org/\")'\n\nYou can use devtools::install_github() in a similar fashion:\ndocker exec -it biab-runner-conda bash\n\nmamba activate rbase\n\nR -e 'devtools::install_github(\"<user>/<package>\")'\n\nDo not add these packages to the r-environment file or the conda portion of the yml file because conda will not be able to recognize them\n\nTo refresh the R environment to match the r-environment.yml file, run docker exec -u root -it biab-runner-conda mamba env update –file r-environment.yml in the terminal.\n\n\n\nAdd any version dependencies to your yml file\n\nIf your script does not require a specific version, you do not need to include a conda section to the yml file. The environment will be the default R environment.\nIf you need a specific version of an already installed library, such as when a breaking change occurs and the script cannot be adapted to use the new version, you can use conda to specify a specific package version in your yml file.\n\nIf you include a conda section, make sure you list all your dependencies. This is creating a new separate environment, not a supplement to the base environment. This means that all of the packages that you need need to be specified in here, even if they are in the r-environment.yml file.\n\n\nconda: # Optional: if you script requires specific versions of packages.\n channels:\n - conda-forge\n - r\n dependencies:\n - r-rjson # read inputs and save outputs for R scripts\n - package=version\nFor more information, refer to the conda documentation.\n\n\n\nExamples\nHere is an example of a complete YAML file with inputs and outputs:\nscript: script_name.R\nname: Script Name\ndescription: Describe what the script does\nauthor:\n - name: John Doe (john.doe@gmail.com)\n - name: Jane Doe (jane.doe@gmail.com)\ninputs:\n landcover_raster:\n label: Raster of landcover\n description: Landcover data pulled from EarthEnv database with 1x1km resolution\n type: application/geo+json\n crs:\n label: coordinate reference system for output\n description: ESPG coordinate reference system for output\n type: int\n example: 4326\n unit_distance:\n label: unit for distance measurement\n description: String value of\n type: options\n options:\n - \"m2\"\n - \"km2\"\noutputs:\n result:\n label: Analysis result\n description: The result of the analysis, in CSV form\n type: text/csv\n result_plot:\n label: Result plot\n description: Plot of results\n type: image/png\nconda: # Optional, only needed if your script has specific package dependencies\n channels:\n - r\n dependencies:\n - r-rjson=0.2.22 #package=version\nYAML is a space sensitive format, so make sure all the tab sets are correct in the file.\nIf inputs are outputs from a previous step in the pipeline, make sure to give the inputs and outputs the same name and they will be automatically linked in the pipeline.\nHere is an empty commented sample that can be filled in\nscript: # script file with extension, such as \"myScript.R\".\nname: # short name, such as My Script\ndescription: # Targeted to those who will interpret pipeline results and edit pipelines.\nauthor: # 1 to many\n - name: # Full name\n email: # Optional, email address of the author. This will be publicly available.\n identifier: # Optional, full URL of a unique digital identifier, such as an ORCID.\nlicense: # Optional. If unspecified, the project's MIT license will apply.\nexternal_link: # Optional, link to a separate project, github repo, etc.\ntimeout: # Optional, in minutes. By defaults steps time out after 1h to avoid hung process to consume resources. It can be made longer for heavy processes.\n\ninputs: # 0 to many\n key: # replace the word \"key\" by a snake case identifier for this input\n label: # Human-readable version of the name\n description: # Targetted to those who will interpret pipeline results and edit pipelines.\n type: # see below\n example: # will also be used as default value, can be null\n\noutputs: # 1 to many\n key:\n label:\n description:\n type:\n example: # optional, for documentation purpose only\n\nreferences: # 0 to many\n - text: # plain text reference\n doi: # link\n\nconda: # Optional, only needed if your script has specific package dependencies\n channels: # programs that you need\n - # list here\n dependencies: # any packages that are dependent on a specfic version\n - # list here\nSee example"
},
{
"objectID": "how_to_contribute.html#step-2-integrating-yaml-inputs-and-outputs-into-your-script",
"href": "how_to_contribute.html#step-2-integrating-yaml-inputs-and-outputs-into-your-script",
"title": "How to Contribute",
"section": "Step 2: Integrating YAML inputs and outputs into your script",
- "text": "Step 2: Integrating YAML inputs and outputs into your script\nNow that you have created your YAML file, the inputs and outputs need to be integrated into your scripts.\nThe scripts perform the actual work behind the scenes. They are located in /scripts folder\nCurrently supported : - R v4.3.1 - Julia v1.9.3 - Python3 v3.9.2 - sh\nScript lifecycle:\n\nScript launched with output folder as a parameter. (In R, an outputFolder variable in the R session. In Julia, Shell and Python, the output folder is received as an argument.)\nScript reads input.json to get execution parameters (ex. species, area, data source, etc.)\nScript performs its task\nScript generates output.json containing links to result files, or native values (number, string, etc.)\n\nSee empty R script for a minimal script lifecycle example.\n\nReceiving inputs\nWhen running a script, a folder is created for each given set of parameters. The same parameters result in the same folder, different parameters result in a different folder. The inputs for a given script are saved in an input.json file in this unique run folder.\nThe file contains the id of the parameters that were specified in the yaml script description, associated to the values for this run. Example:\n{\n \"fc\": [\"L\", \"LQ\", \"LQHP\"],\n \"method_select_params\": \"AUC\",\n \"n_folds\": 2,\n \"orientation_block\": \"lat_lon\",\n \"partition_type\": \"block\",\n \"predictors\": [\n \"/output/data/loadFromStac/6af2ccfcd4b0ffe243ff01e3b7eccdc3/bio1_75548ca61981-01-01.tif\",\n \"/output/data/loadFromStac/6af2ccfcd4b0ffe243ff01e3b7eccdc3/bio2_7333b3d111981-01-01.tif\"\n ],\n \"presence_background\": \"/output/SDM/setupDataSdm/edb9492031df9e063a5ec5c325bacdb1/presence_background.tsv\",\n \"proj\": \"EPSG:6623\",\n \"rm\": [0.5, 1.0, 2.0]\n}\nThe script reads the input.json file that is in the run folder. This JSON file is automatically created from the BON in a Box pipeline. Here is an example of how to read the input folder in the R script:\nFirst, set the environment for the script:\nSys.getenv(\"SCRIPT_LOCATION\")\nAnd then set the ‘input’ environment variables. The ‘input’ environment contains the specified inputs from the BON in a Box platform.\ninput <- rjson::fromJSON(file=file.path(outputFolder, \"input.json\")) # Load input file\nNext, for any functions that are using these inputs, they need to be specified.\nInputs are specified by input$input_name.\nFor example, to create a function to take the square root of a number that was input by the user in the UI:\nresult <- sqrt(input$number)\nThis means if the user inputs the number 144, this will be run in the function and output 12.\nHere is another example to read in an output from a previous step of the pipeline, which was output in csv format.\ndat <- read.csv(input$csv_file)\nNext, you have to specify the outputs, which can be saved in a variety of formats. The format must be accurately specified in the YAML file.\nHere is an example of an output with a csv file and a plot in png format.\nresult_path <- file.path(outputFolder, \"result.csv\")\nwrite.csv(result, result_path, row.names = F )\n\nresult_plot_path <- file.path(outputFolder, \"result_plot.png\")\nggsave(result_path, result)\n\noutput <- list(result = result_path,\nresult_plot = result_plot_path)\nLastly, write the output as a JSON file:\nsetwd(outputFolder)\njsonlite::write_json(output, \"output.json\", auto_unbox = TRUE, pretty = TRUE)\n\n\nScript validation\nThe syntax and structure of the script description file will be validated on push. To run the validation locally, run validate.sh\nThis validates that the syntax and structure are correct, but not that it’s content is correct. Hence, peer review of the scripts and the description files is mandatory before accepting a pull requests.\n\n\nReporting problems\nThe output keys info, warning and error can be used to report problems in script execution. They do not need to be described in the outputs section of the description. They will be displayed specially in the UI.\nAny error message will halt the rest of the pipeline.\nTo code an error so it prints in the pipeline step, you will need to wrap your script in a try catch function and then code it to print errors.\n{r}\noutput<- tryCatch({\n\nSCRIPT BODY HERE\n\n}, error = function(e) { list(error= conditionMessage(e)) })\nThis will print any errors in the output of the script in the UI.\nYou can also code specific error messages. For example, if a user wanted the analysis to stop if the result was less than 0:\noutput<- tryCatch({\n\nif (result < 0){\nstop(\"Analysis was halted because result is less than 0.\")\n}\n\n}, error = function(e) { list(error= conditionMessage(e)) })\nAnd then the customized error message would appear in the UI."
+ "text": "Step 2: Integrating YAML inputs and outputs into your script\nNow that you have created your YAML file, the inputs and outputs need to be integrated into your scripts.\nThe scripts perform the actual work behind the scenes. They are located in /scripts folder\nCurrently supported : - R v4.3.1 - Julia v1.9.3 - Python3 v3.9.2 - sh\nScript lifecycle:\n\nScript launched with output folder as a parameter. (In R, an outputFolder variable in the R session. In Julia, Shell and Python, the output folder is received as an argument.)\nScript reads input.json to get execution parameters (ex. species, area, data source, etc.)\nScript performs its task\nScript generates output.json containing links to result files, or native values (number, string, etc.)\n\nSee empty R script for a minimal script lifecycle example.\n\nReceiving inputs\nWhen running a script, a folder is created for each given set of parameters. The same parameters result in the same folder, different parameters result in a different folder. The inputs for a given script are saved in an input.json file in this unique run folder.\nThe file contains the id of the parameters that were specified in the yaml script description, associated to the values for this run. Example:\n{\n \"fc\": [\"L\", \"LQ\", \"LQHP\"],\n \"method_select_params\": \"AUC\",\n \"n_folds\": 2,\n \"orientation_block\": \"lat_lon\",\n \"partition_type\": \"block\",\n \"predictors\": [\n \"/output/data/loadFromStac/6af2ccfcd4b0ffe243ff01e3b7eccdc3/bio1_75548ca61981-01-01.tif\",\n \"/output/data/loadFromStac/6af2ccfcd4b0ffe243ff01e3b7eccdc3/bio2_7333b3d111981-01-01.tif\"\n ],\n \"presence_background\": \"/output/SDM/setupDataSdm/edb9492031df9e063a5ec5c325bacdb1/presence_background.tsv\",\n \"proj\": \"EPSG:6622\",\n \"rm\": [0.5, 1.0, 2.0]\n}\nThe script reads the input.json file that is in the run folder. This JSON file is automatically created from the BON in a Box pipeline. Here is an example of how to read the input folder in the R script:\nFirst, set the environment for the script:\nSys.getenv(\"SCRIPT_LOCATION\")\nAnd then set the ‘input’ environment variables. The ‘input’ environment contains the specified inputs from the BON in a Box platform.\ninput <- rjson::fromJSON(file=file.path(outputFolder, \"input.json\")) # Load input file\nNext, for any functions that are using these inputs, they need to be specified.\nInputs are specified by input$input_name.\nFor example, to create a function to take the square root of a number that was input by the user in the UI:\nresult <- sqrt(input$number)\nThis means if the user inputs the number 144, this will be run in the function and output 12.\nHere is another example to read in an output from a previous step of the pipeline, which was output in csv format.\ndat <- read.csv(input$csv_file)\nNext, you have to specify the outputs, which can be saved in a variety of formats. The format must be accurately specified in the YAML file.\nHere is an example of an output with a csv file and a plot in png format.\nresult_path <- file.path(outputFolder, \"result.csv\")\nwrite.csv(result, result_path, row.names = F )\n\nresult_plot_path <- file.path(outputFolder, \"result_plot.png\")\nggsave(result_path, result)\n\noutput <- list(result = result_path,\nresult_plot = result_plot_path)\nLastly, write the output as a JSON file:\nsetwd(outputFolder)\njsonlite::write_json(output, \"output.json\", auto_unbox = TRUE, pretty = TRUE)\n\n\nScript validation\nThe syntax and structure of the script description file will be validated on push. To run the validation locally, run validate.sh\nThis validates that the syntax and structure are correct, but not that it’s content is correct. Hence, peer review of the scripts and the description files is mandatory before accepting a pull requests.\n\n\nReporting problems\nThe output keys info, warning and error can be used to report problems in script execution. They do not need to be described in the outputs section of the description. They will be displayed specially in the UI.\nAny error message will halt the rest of the pipeline.\nTo code an error so it prints in the pipeline step, you will need to wrap your script in a try catch function and then code it to print errors.\n{r}\noutput<- tryCatch({\n\nSCRIPT BODY HERE\n\n}, error = function(e) { list(error= conditionMessage(e)) })\nThis will print any errors in the output of the script in the UI.\nYou can also code specific error messages. For example, if a user wanted the analysis to stop if the result was less than 0:\noutput<- tryCatch({\n\nif (result < 0){\nstop(\"Analysis was halted because result is less than 0.\")\n}\n\n}, error = function(e) { list(error= conditionMessage(e)) })\nAnd then the customized error message would appear in the UI."
},
{
"objectID": "how_to_contribute.html#step-3-connect-your-scripts-with-the-bon-in-a-box-pipeline-editor.",
@@ -306,5 +306,103 @@
"title": "Developer documentation",
"section": "",
"text": "Since runner-r and runner-julia run in a separate docker, when the user stops the pipeline, the signal must go from the script-server, to the runner, to the running script. Docker does not allow this by default, this is why we save the PID in a file and use a separate exec command to kill the process.\nThe PID file is called .pid and is located in the output folder of the run. It is deleted when the script completes. For details, see ScriptRun.kt."
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "All URIs are relative to http://localhost\n\n\n\nMethod\nHTTP request\nDescription\n\n\n\n\ngetHistory\nGET /api/history\nGet the history of runs for all pipelines on this server\n\n\ngetInfo\nGET /{type}/{descriptionPath}/info\nGet metadata about this script or pipeline.\n\n\ngetListOf\nGET /{type}/list\nGet a list of available steps of given type and their names.\n\n\ngetOutputFolders\nGET /{type}/{id}/outputs\nGet the output folders of the scripts composing this pipeline\n\n\ngetPipeline\nGET /pipeline/{descriptionPath}/get\nGet JSON file that describes the pipeline.\n\n\ngetVersions\nGET /api/versions\nReturns the version of system components.\n\n\nrun\nPOST /{type}/{descriptionPath}/run\nRuns the script or pipeline matching `descriptionPath`.\n\n\nsavePipeline\nPOST /pipeline/save/{filename}\nSave a json file to the pipeline folder.\n\n\nstop\nGET /{type}/{id}/stop\nStop the specified pipeline run.\n\n\n\n\n\n\n[GetHistory200ResponseInner] getHistory()\n\nGet the history of runs for all pipelines on this server\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\napiInstance.getHistory((error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\nThis endpoint does not need any parameter.\n\n\n\n[GetHistory200ResponseInner]\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json\n\n\n\n\n\n\nInfo getInfo(type, descriptionPath)\n\nGet metadata about this script or pipeline.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\napiInstance.getInfo(type, descriptionPath, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\n\n\n\n\nInfo\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json\n\n\n\n\n\n\n{String: String} getListOf(type)\n\nGet a list of available steps of given type and their names.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\napiInstance.getListOf(type, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\n\n\n\n\n{String: String}\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json\n\n\n\n\n\n\n{String: String} getOutputFolders(type, id)\n\nGet the output folders of the scripts composing this pipeline\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet id = \"id_example\"; // String | Where to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run. \napiInstance.getOutputFolders(type, id, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\nid\nString\nWhere to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run.\n\n\n\n\n\n\n\n{String: String}\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json\n\n\n\n\n\n\nObject getPipeline(descriptionPath)\n\nGet JSON file that describes the pipeline.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\napiInstance.getPipeline(descriptionPath, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\n\n\n\n\nObject\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json\n\n\n\n\n\n\nString getVersions()\n\nReturns the version of system components.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\napiInstance.getVersions((error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\nThis endpoint does not need any parameter.\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: text/plain\n\n\n\n\n\n\nString run(type, descriptionPath, opts)\n\nRuns the script or pipeline matching `descriptionPath`.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\nlet opts = {\n 'body': \"body_example\" // String | Content of input.json for this run\n};\napiInstance.run(type, descriptionPath, opts, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\nbody\nString\nContent of input.json for this run\n[optional]\n\n\n\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: text/plain\nAccept: text/plain\n\n\n\n\n\n\nString savePipeline(filename, requestBody)\n\nSave a json file to the pipeline folder.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet filename = \"filename_example\"; // String | The name of the JSON file (without extension).\nlet requestBody = {key: null}; // {String: Object} | Content of pipeline.json to save\napiInstance.savePipeline(filename, requestBody, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\nfilename\nString\nThe name of the JSON file (without extension).\n\n\n\nrequestBody\n{String: Object}\nContent of pipeline.json to save\n\n\n\n\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: application/json\nAccept: text/plain\n\n\n\n\n\n\nstop(type, id)\n\nStop the specified pipeline run.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet id = \"id_example\"; // String | Where to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run. \napiInstance.stop(type, id, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully.');\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\nid\nString\nWhere to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run.\n\n\n\n\n\n\n\nnull (empty response body)\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: Not defined"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#gethistory",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#gethistory",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "[GetHistory200ResponseInner] getHistory()\n\nGet the history of runs for all pipelines on this server\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\napiInstance.getHistory((error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\nThis endpoint does not need any parameter.\n\n\n\n[GetHistory200ResponseInner]\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#getinfo",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#getinfo",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "Info getInfo(type, descriptionPath)\n\nGet metadata about this script or pipeline.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\napiInstance.getInfo(type, descriptionPath, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\n\n\n\n\nInfo\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#getlistof",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#getlistof",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "{String: String} getListOf(type)\n\nGet a list of available steps of given type and their names.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\napiInstance.getListOf(type, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\n\n\n\n\n{String: String}\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#getoutputfolders",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#getoutputfolders",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "{String: String} getOutputFolders(type, id)\n\nGet the output folders of the scripts composing this pipeline\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet id = \"id_example\"; // String | Where to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run. \napiInstance.getOutputFolders(type, id, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\nid\nString\nWhere to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run.\n\n\n\n\n\n\n\n{String: String}\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#getpipeline",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#getpipeline",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "Object getPipeline(descriptionPath)\n\nGet JSON file that describes the pipeline.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\napiInstance.getPipeline(descriptionPath, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\n\n\n\n\nObject\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: application/json"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#getversions",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#getversions",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "String getVersions()\n\nReturns the version of system components.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\napiInstance.getVersions((error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\nThis endpoint does not need any parameter.\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: text/plain"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#run",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#run",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "String run(type, descriptionPath, opts)\n\nRuns the script or pipeline matching `descriptionPath`.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet descriptionPath = \"descriptionPath_example\"; // String | Where to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\nlet opts = {\n 'body': \"body_example\" // String | Content of input.json for this run\n};\napiInstance.run(type, descriptionPath, opts, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\ndescriptionPath\nString\nWhere to find the step. For scripts, paths are relative to the /script folder. For pipelines, paths are relative to the /pipeline folder.\n\n\n\nbody\nString\nContent of input.json for this run\n[optional]\n\n\n\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: text/plain\nAccept: text/plain"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#savepipeline",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#savepipeline",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "String savePipeline(filename, requestBody)\n\nSave a json file to the pipeline folder.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet filename = \"filename_example\"; // String | The name of the JSON file (without extension).\nlet requestBody = {key: null}; // {String: Object} | Content of pipeline.json to save\napiInstance.savePipeline(filename, requestBody, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully. Returned data: ' + data);\n }\n});\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\nfilename\nString\nThe name of the JSON file (without extension).\n\n\n\nrequestBody\n{String: Object}\nContent of pipeline.json to save\n\n\n\n\n\n\n\nString\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: application/json\nAccept: text/plain"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/DefaultApi.html#stop",
+ "href": "ui/BonInABoxScriptService/docs/DefaultApi.html#stop",
+ "title": "BonInABoxScriptService.DefaultApi",
+ "section": "",
+ "text": "stop(type, id)\n\nStop the specified pipeline run.\n\n\nimport BonInABoxScriptService from 'bon_in_a_box_script_service';\n\nlet apiInstance = new BonInABoxScriptService.DefaultApi();\nlet type = \"type_example\"; // String | Script or pipeline\nlet id = \"id_example\"; // String | Where to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run. \napiInstance.stop(type, id, (error, data, response) => {\n if (error) {\n console.error(error);\n } else {\n console.log('API called successfully.');\n }\n});\n\n\n\n\n\n\n\n\n\n\n\n\nName\nType\nDescription\nNotes\n\n\n\n\ntype\nString\nScript or pipeline\n\n\n\nid\nString\nWhere to find the pipeline or step outputs in ./output folder. It also acts as a handle to stop the run.\n\n\n\n\n\n\n\nnull (empty response body)\n\n\n\nNo authorization required\n\n\n\n\nContent-Type: Not defined\nAccept: Not defined"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html",
+ "href": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html",
+ "title": "BonInABoxScriptService.GetHistory200ResponseInner",
+ "section": "",
+ "text": "Name\nType\nDescription\nNotes\n\n\n\n\nname\nString\nHuman readable name of the pipeline.\n[optional]\n\n\nrunId\nString\nWhere to find the pipeline outputs in ./output folder.\n[optional]\n\n\ntype\nString\nIf it's a script or a pipeline\n[optional]\n\n\nstartTime\nDate\nUTC date and time when the run was started\n[optional]\n\n\nstatus\nString\nInformation on the completion status\n[optional]\n\n\ninputs\nObject\nInputs that were given to the pipeline form for this run.\n[optional]\n\n\n\n\n\n\n\nscript (value: \"script\")\npipeline (value: \"pipeline\")\n\n\n\n\n\nrunning (value: \"running\")\nerror (value: \"error\")\ncancelled (value: \"cancelled\")\ncompleted (value: \"completed\")"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#properties",
+ "href": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#properties",
+ "title": "BonInABoxScriptService.GetHistory200ResponseInner",
+ "section": "",
+ "text": "Name\nType\nDescription\nNotes\n\n\n\n\nname\nString\nHuman readable name of the pipeline.\n[optional]\n\n\nrunId\nString\nWhere to find the pipeline outputs in ./output folder.\n[optional]\n\n\ntype\nString\nIf it's a script or a pipeline\n[optional]\n\n\nstartTime\nDate\nUTC date and time when the run was started\n[optional]\n\n\nstatus\nString\nInformation on the completion status\n[optional]\n\n\ninputs\nObject\nInputs that were given to the pipeline form for this run.\n[optional]"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#enum-typeenum",
+ "href": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#enum-typeenum",
+ "title": "BonInABoxScriptService.GetHistory200ResponseInner",
+ "section": "",
+ "text": "script (value: \"script\")\npipeline (value: \"pipeline\")"
+ },
+ {
+ "objectID": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#enum-statusenum",
+ "href": "ui/BonInABoxScriptService/docs/GetHistory200ResponseInner.html#enum-statusenum",
+ "title": "BonInABoxScriptService.GetHistory200ResponseInner",
+ "section": "",
+ "text": "running (value: \"running\")\nerror (value: \"error\")\ncancelled (value: \"cancelled\")\ncompleted (value: \"completed\")"
}
]
\ No newline at end of file
diff --git a/docs/ui/BonInABoxScriptService/docs/DefaultApi.html b/docs/ui/BonInABoxScriptService/docs/DefaultApi.html
index 92b3f560..809873ed 100644
--- a/docs/ui/BonInABoxScriptService/docs/DefaultApi.html
+++ b/docs/ui/BonInABoxScriptService/docs/DefaultApi.html
@@ -7,7 +7,7 @@
-defaultapi – bon-in-a-box-pipeline-engine
+defaultapi – BON in a Box
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
BonInABoxScriptService.GetHistory200ResponseInner
+
+
Properties
+
+
+
+
+
+
+
+
+
+
Name
+
Type
+
Description
+
Notes
+
+
+
+
+
name
+
String
+
Human readable name of the pipeline.
+
[optional]
+
+
+
runId
+
String
+
Where to find the pipeline outputs in ./output folder.
+
[optional]
+
+
+
type
+
String
+
If it's a script or a pipeline
+
[optional]
+
+
+
startTime
+
Date
+
UTC date and time when the run was started
+
[optional]
+
+
+
status
+
String
+
Information on the completion status
+
[optional]
+
+
+
inputs
+
Object
+
Inputs that were given to the pipeline form for this run.