Skip to content

Latest commit

 

History

History
110 lines (70 loc) · 3 KB

README.md

File metadata and controls

110 lines (70 loc) · 3 KB

RAMP bundle

Build Status License

This repository contains the following RAMP modules:

The modules can be installed independently but have been added to the same repository so they can be kept in sync.

Contents

Installation

  1. Retrieve the main repository

    git clone https://github.com/paris-saclay-cds/ramp-board
    cd ramp-board
  2. Install Python dependencies using conda or pip

    • 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
  3. Install all the elements at once

    make install

    or each project independently

    cd ramp-<project>
    pip install .

Configuration

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.

JSON configuration 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

Environment variables

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>

Testing

All modules can be tested with pytest

pytest <module>

Note that testing requires a database to be setup and running.