Skip to content

Installation Instructions

Ioannis Michaloliakos edited this page Oct 9, 2024 · 9 revisions

Installation

  1. Install conda via the official instructions for your OS. If you would like a more lightweight installation, you can use alternatively miniconda. You will also need to have Git installed on your system. If you are on Windows, you can install Git from here. Administrator privileges are not required for the installation.

  2. Clone this repository at your desired location by running the following commands in your terminal. If you are in Windows run them in the Anaconda Prompt.

    git clone https://github.com/IonMich/instructor_pilot.git
    cd instructor_pilot
  3. Create a conda environment:

    conda update -n base -c defaults conda
    conda env create --file environment.yml --name django-ta

    This will take approximately 10 minutes on Windows and 5 minutes on Unix-based systems. You can replace django-ta with the environment name of your choice above and in what follows. After this command successfully completes, you can free up disk space by running conda clean -a (this will remove all installation caches).

  4. Activate the environment:

    conda activate django-ta
  5. Your cloned repository contains a file named .env.example which contains four environment key-value pairs. Rename the file to .env (without .txt), and edit the values of the following keys:

    • API_URL : The URL of your Canvas instance of your institution. If you are a UF member, use "https://ufl.instructure.com/".

    • API_KEY : To connect to Canvas, you will need to create a Canvas API token. You can do this by going to your Canvas Account Settings and clicking on the New Access Token button of the "Approved Integrations" section. Copy this token and paste it in the .env file as the value of the API_KEY key.

    • DJANGO_SECRET_KEY : This is a secret key used by Django to encrypt data. You can generate one by running the following command in your terminal:

      python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
    • ENV_TYPE : This should be set to "dev". No need to change it.

  6. Initialize the Django app by adding a username and password for the admin account:

    python manage.py makemigrations
    python manage.py migrate
    python manage.py createsuperuser
  7. Run the Django app:

    python manage.py runserver
  8. Open your browser and go to http://127.0.0.1:8000/admin/auth/user/1/change/. Log in with the username and password you created in the previous step. Then add your information in the First name and Last name fields and save it - your last name will be used if you are UF member to get your section class meeting times from the UF API. Feel free to add your institutional email address in the Email address field as well.

  9. All set! You can now go to http://127.0.0.1:8000/ to add a course and start using the app.

Note

This app now has an experimental React front-end, which will eventually replace the existing front-end. More details here. All new Python dependencies are already included in the environment.yml file installed above. However, the new front-end introduces additional Javascript dependencies via npm. If you would like to test the new User Interface, follow the additional instructions here:

NPM installation instructions

If you are only interested in the stable User Interface (most users), ignore these additional installation instructions, but keep an eye on the relevant discussion and Wiki pages, as the old front-end will eventually be deprecated.

Clone this wiki locally