Skip to content
ESalomons edited this page Jul 9, 2021 · 7 revisions

Preconditions

This project assumes that the following software is installed:

  • Python 3 (anaconda)
  • Node.js / npm
  • MongoDB

Bootstrap scripts can be found in the folder /scripts

Setup process

1. Create python environment

The folder /scripts/conda-env contains an environment.yml file that can be used to create an anaconda environment with all dependencies:

conda env create -f environment.yml

This will create an environment called "alm".

For more information about installation and usage of anaconda, see https://www.anaconda.com/

2. Start mongo server

A startup script for mongodb can be found in /scripts/start-scripts. In order for this script to work, the folders that are indicated in the file mongod.conf must exist.

3. Initialize mongodb

Run the create_initial_data.py script in /scripts/initialize-scripts/:

python create_initial_data.py

This script creates the initial data needed for an application. Mainly it created a database called "general" and creates an administrator with these credentials:

Email: admin@admin.com
Password: admin

4. Install npm dependencies

From the /frontend/ folder run:

npm install

This will install all dependencies locally.

5. Start backend and frontend

Run the start scripts startBackend.sh and startFrontend.sh

6. Create a club

Open the address http://localhost:8080 in a browser and login as administrator. Open the (hamburger) menu on the left and add a new club (e.g. FC Ami). This club name will translate into the database name fc_ami (lowercase, spaces converted to underscores). This database name must be used in the next steps.

7. Import data formats

The import data formats are described in json files. An example is given in scripts/initialize-scripts/data/fc_ami_config.json. Per file the columns are described (including internal / database name, data resolvers etc).

This configuration can be imported using the import_configuration script. For this script, two arguments are required: database name and filename. The file needs to be placed in the data folder within the initialize-scripts folder.

Command to execute script:

python import configuration.py <file_name.json> <database_name>

Example:

python import_configuration.py fc_ami_import_config.json fc_ami

!IMPORTANT

The import configuration has a specific structure. Detailed information can be found in the page Import System

8. Import machine learning configuration

The machine learning configuration is also described as a json file.

Command to execute script:

python import_ml_configuration.py <file_name.json> <database_name>

Example:

python import_ml_configuration.py fc_ami_ml_config.json fc_ami

!IMPORTANT

Import configuration needs to have a specific structure. Detailed information can be found in the chapter "Machine learning"

Clone this wiki locally