From a4b1e33937238c96bbe2f962bf0e8c0846e1c048 Mon Sep 17 00:00:00 2001 From: AlexDo1 Date: Mon, 14 Nov 2022 15:57:58 +0100 Subject: [PATCH 1/3] rename tool.json to parameters.json --- in/{tool.json => parameters.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename in/{tool.json => parameters.json} (100%) diff --git a/in/tool.json b/in/parameters.json similarity index 100% rename from in/tool.json rename to in/parameters.json From 0443afbfebf2b9a53320efdad3b3af6472c1bff8 Mon Sep 17 00:00:00 2001 From: AlexDo1 Date: Mon, 14 Nov 2022 15:58:12 +0100 Subject: [PATCH 2/3] install json2args v0.4.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d137a78..9b4d509 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN pip install scikit-gstat==1.0.2 gstools==1.4.0 plotly==5.11.0 skgstat-uncert RUN pip install progressbar2 # install the Python toolbox-runner -RUN pip install json2args==0.3.0 +RUN pip install json2args==0.4.0 # create the tool input structure RUN mkdir /in From e31e9883f1008c6eb736444abe36ed83d6b59e4d Mon Sep 17 00:00:00 2001 From: AlexDo1 Date: Mon, 14 Nov 2022 15:58:19 +0100 Subject: [PATCH 3/3] update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 499965e..7300930 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Each container needs at least the following structure: ``` / |- in/ -| |- tool.json +| |- parameters.json |- out/ | |- ... |- src/ @@ -25,7 +25,7 @@ Each container needs at least the following structure: | |- run.py ``` -* `tool.json` are parameters. Whichever framework runs the container, this is how parameters are passed. +* `parameters.json` are parameters. Whichever framework runs the container, this is how parameters are passed. * `tool.yml` is the tool specification. It contains metadata about the scope of the tool, the number of endpoints (functions) and their parameters * `run.py` is the tool itself, or a Python script that handles the execution. It has to capture all outputs and either `print` them to console or create files in `/out` @@ -48,9 +48,9 @@ in the repository secrets in order to run properly. ## How to run? -This template installs the toolbox-runner python package to parse the parameters in the `/in/tool.json`. This assumes that +This template installs the json2args python package to parse the parameters in the `/in/parameters.json`. This assumes that the files are not renamed and not moved and there is actually only one tool in the container. For any other case, the environment variables -`PARAM_FILE` can be used to specify a new location for the `tool.json` and `TOOL_RUN` can be used to specify the tool to be executed. +`PARAM_FILE` can be used to specify a new location for the `parameters.json` and `TOOL_RUN` can be used to specify the tool to be executed. The `run.py` has to take care of that. To invoke the docker container directly run something similar to: