Skip to content

Slange-Mhath/Erganiser

Repository files navigation

Erganiser

Django Postgres Python macOs Linux Docker

Pytest Black

Table of Contents
  1. About
  2. Development

About

Erganiser is a small web application which allows athletes and their coaches to log, monitor and compare their erg scores in a safe and anonymous way.

In rowing, erg scores are a good indicator of an athlete's fitness and can be the deciding factor in selection for a crew. However, erg scores are sensitive information and can be a source of anxiety for athletes. This is especially true for younger athletes who are still developing and may not be able to perform at their best yet. Whilst comparing scores with other athletes can be a good motivator, it can also lead to stress and shame. Erganiser tries to keep the positive aspects of comparing scores whilst minimalising the negative ones, by allowing athletes to compare their scores within their squad in an anonymous way. Only coaches can see the names of their athletes, and their respective scores.

Features

  • Log your erg scores
  • Compare your scores anonymously within your squad
  • Syncronise your scores from your concept2 logbook

FAQ

I want to sync my concept2 logbook scores but get an oauth error

  • This might be related to an issue with the refresh token from the oauth service concept2 uses to authorize your account. Try to go into your profile settings, ensure that your logbook id is correct and delete the stored api key and try it again. If that doesn't help please feel free to drop me a message.

Can I sync my scores from my concept2 logbook automatically?

  • This is a feature I would like to implement in the future. However, I would like to make sure that the user has full control over when and how their data is synced.

Why can't I sync my scores from the rp3 app?

  • I would absolutely love to be able to implement a feature which allows to sync the scores from the rp3 app. However, the rp3 app does not provide an open API to access the data.

I have a feature request or found a bug

  • Please feel free to open an issue on github or drop me a message.

Development

If you want to contribute to the code base or just want to run the service yourself, please read on.

Dependencies

This code is developed and tested to be deployed on macOS or Linux. It is not tested on Windows. I recommend using the Installation with Docker for Windows users.

  • Python Version 3.9
  • Django Version 4.1
  • Psycopg2 2.9.5
  • Python-dateutil 2.8.2
  • Django-crispy-forms 1.14.0
  • Django-ses 3.4.1
  • Django-tempus-dominus 5.1.2.17
  • Django-Verify-Email 2.0.3
  • Python-dateutil 2.8.2
  • Python-dotenv 1.0.0

To install all dependencies navigate into the project folder and run:

pip install -r requirements.txt

Installation

  1. Clone the repo

    git clone git@github.com:Slange-Mhath/Erganiser.git
  2. Navigate into the project directory

    cd Erganiser
  3. Set the environment variables

    export SECRET_KEY=YOUR_DJANGO_SECRET_KEY
    export C2_CLIENT_ID=YOUR_C2_CLIENT_ID
    export C2_CLIENT_SECRET=YOUR_C2_CLIENT_SECRET
    export AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
    export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY

    or alternatively create a .env file in the root directory and add the required variables there.

  4. Create a superuser by following the prompts after entering the following command

    python3 manage.py createsuperuser
  5. start the server

    python3 manage.py runserver   

Using Docker

If you want to run this service in a Docker Container, no problem at all!

  1. Clone the repo

    git clone git@github.com:Slange-Mhath/Erganiser.git
    
  2. Navigate into the project directory

    cd Erganiser
  3. Build the Docker image

     docker build -t erganiser .
  4. Create .env file in Erganiser root folder and add the following env variables:

    • SECRET_KEY
    • C2_CLIENT_ID
    • C2_CLIENT_SECRET
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
  5. Run Docker Compose to start Postgres and Webserver

    docker-compose up -d 
  6. Create a superuser by following the prompts after entering the following command

    docker-compose exec web python manage.py createsuperuser

Contributing and supporting Ergansier

If you want to contribute to the project, that's great! You can do so by one of the following ways:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published