This is the default RESTful Web API implementation for the Reproducible Open Benchmarks for Data Analysis Platform (ROB) using the Flask web framework.
The following installation instructions assume that you install all packages in a local folder ~/projects/rob.
# -- Change the working directory
cd ~/projects/rob
The Reproducible Open Benchmarks platform is implemented in Python. We recommend using a virtual environment for the installation.
# -- Create a new virtual environment
virtualenv venv
# -- Activate the virtual environment
source venv/bin/activate
The Flask Web API for ROB requires the flowserv
package. The following steps will install all packages from the respective GitHub repositories:
git clone [email protected]:scailfin/flowserv-core.git
pip install -e flowserv-core
git clone [email protected]:scailfin/rob-webapi-flask.git
pip install -e rob-webapi-flask
The primary configuration parameters are defined in the ROB Configuration documentation. Two additional environment variables are defined by the Web API:
- ROB_WEBAPI_LOG: Directory path for API logs (default:
$FLOWSERV_API_DIR/log
) - ROB_WEBAPI_CONTENTLENGTH: Maximum size of uploaded files (default:
16MB
)
If you run the Flask application from the command line in developer mode using flask run
, you also need to set the following environment variables:
export FLASK_APP=robflask.api
export FLASK_ENV=development
There are also more detailed instructions on the Demo Setup site to setup and run the Web API.
The robflask
package includes a command line tool to setup the ROB database and for creating and manipulating benchmarks.
Initialize database and base directories for the Reproducible Open Benchmarks (ROB) Web API. The configuration parameters for the database are taken from the respective environment variables. Creates the API base directory if it does not exist.
Usage: robadm init [OPTIONS]
Options:
-d, --dir FILE Base directory for API files (overrides FLOWSERV_API_DIR).
--help Show this message and exit.
Create a new benchmark.
Usage: robadm benchmarks create [OPTIONS]
Options:
-n, --name TEXT Unique benchmark name. [required]
-d, --description TEXT Short benchmark description.
-i, --instructions FILE File containing instructions for participants.
-s, --src DIRECTORY Benchmark template directory.
-u, --url TEXT Benchmark template Git repository URL.
-f, --specfile FILE Optional path to benchmark specification file.
--help Show this message and exit.
Delete a given benchmark.
Usage: robadm benchmarks delete [OPTIONS] IDENTIFIER
Options:
--help Show this message and exit.