This repository contains the following RAMP modules:
ramp-database
- RAMP database moduleramp-engine
- RAMP runner servicedataboard
- RAMP frontend server
The modules can be installed independently but have been added to the same repository so they can be kept in sync.
-
Retrieve the main repository
git clone https://github.com/paris-saclay-cds/ramp-board cd ramp-board
-
Install Python dependencies using
conda
orpip
-
with
conda
# Make sure you run the latest version of conda conda update conda # Set up the virtual environment conda env create -f environment.yml # Activate it conda activate ramp-server
-
with
pip
pip install -r requirements.txt
-
-
Install all the elements at once
make install
or each project independently
cd ramp-<project> pip install .
databoard
comes with a default configuration that can be overwritten via environment variables or a JSON configuration file.
Note: If you use both (e.g. general JSON config file AND environment variables for sensitive parameters like passwords), know that the user configuration file is loaded last so it will take precedence over the environment variables. You should therefore remove these entries from the JSON file.
The DATABOARD_USER_CONFIG
environment variable must be set to the absolute path of the config file in order to be used by the ramp-server
.
export DATABOARD_USER_CONFIG=/path/to/userconfig.json
export DATABOARD_STAGE=TESTING (or PRODUCTION)
# used when DATABOARD_STAGE=TESTING
export DATABOARD_DB_URL_TEST=postgresql://<db_user>:<db_password>@localhost/<db_name_test>
export DATABOARD_DEPLOYMENT_PATH_TEST=/path/to/<db_name_test>
# used when DATABOARD_STAGE=PRODUCTION
export DATABOARD_DB_URL=postgresql://<db_user>:<db_password>@localhost/<db_name_prod>
export DATABOARD_DEPLOYMENT_PATH=/path/to/<db_name_prod>
All modules can be tested with pytest
pytest <module>
Note that testing requires a database to be setup and running.