Skip to content

Developer documentation

Mihail Anton edited this page Nov 16, 2023 · 24 revisions

Deployment guide

There is a cron job pulling in the latest changes in the main branch each morning. In the case of migration conflicts, manual intervention would be required.

  1. Log into the machine as the correct (non-root) user.
  2. Change directory.
  3. Run docker compose down --volumes to bring down the server and erase the database.
  4. Make sure all the data is correct in raw-tmd-data/real-data and that load.py uses all those files.
  5. Pull in the latest changes from this repository (main branch), no login required.
  6. Only once: set up the environment files in the folder env/ by copying from the .default files provided.
  7. Run docker compose up -d.
  8. Run docker compose exec tmd-dj python manage.py load_data.

Data migration

There is a script to extract data from the old database in the data_migration folder, though insertion has to be done manually for now.

Maintenance guide

This project aims to use few dependencies to reduce the maintenance overhead.

Django

Dash

Bootstrap

The Bootstrap framework is used in this project via CDN.

User management guide

There are three types of users currently supported by Tango

  • Administrators/maintainers: They have the responsibility of statically defining the users' accounts as pairs of usernames and passwords. Currently, this must be implemented manually by the administrator (e.g. through a script) and it is planned to stay this way until external authentication mechanisms are implemented, as discussed in https://github.com/elixir-europe-training/ELIXIR-TrP-Training-Metrics-Database-Tango/issues/13
  • Users: These are the user accounts that are created for each ELIXIR Node, by the administrator.
  • Anonymous: These correspond to all guests visiting Tango

Data model overview

  • Questions with free text answers were removed
  • Created and Modified fields were put on top of each table
  • Obsolete questions (Excelerate WP related, for instance) were removed