Skip to content

Web application that schedules Resident Assistants for nightly duty shifts and displays the schedule for the RAs to see. The application allows RAs to login and submit any conflicts they might have for a particular month, and a Hall Director, or their Assistants, may run the scheduling algorithm, view the result and make any changes.

License

Notifications You must be signed in to change notification settings

conzty01/RA_Scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resident Assistant Duty Scheduling Application

The Resident Assistant Duty Scheduling Application (RADSA) is Web application that schedules Resident Assistants for nightly duty shifts and displays the schedule for the RAs to see. The application allows RAs to login and submit any conflicts they might have for a particular month. Then a Hall Director (HD), or their Assistants (AHDs), may run the scheduling algorithm, manually manipulate the result and export the schedule to Google Calendar.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

RADSA utilizes a Flask web server to serve pages to the client. The web server also communicates with a PostgreSQL database to display the proper information to the client in addition to running the scheduling algorithm. For this application, you will need:

  • PostgreSQL 10.17
  • Python 3.6
  • VirtualEnv 15.1
  • RabbitMQ 3.8.14

Installing

Here is a step by step series of examples that tells you how to get the development environment up and running.

Installing PostgreSQL

$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib
$ sudo -u postgres createuser --interactive

Follow the prompts to create a role for yourself. I suggest creating a role that is the same name as your username and making yourself a superuser.

Installing Python

$ sudo apt-get install python3.6

Installing and Setting up a Python Virtual Env

$ sudo pip install virtualenv
$ virtualenv -p python3 /path/to/home/MyEnv
$ source /path/to/home/MyEnv/bin/activate

In order to develop in the correct Python environment, you will need to perform the last step each time after closing your terminal. Similarly, if you would like to exit the virtual environment without closing the terminal, simply type deactivate in the terminal.

After the virtual environment is created, execute the following to install of the necessary python packages into the virtual env:

pip install -r requirements.txt

RADSA uses on a number of environment variables to pass information into the runtime of the application. These can be configured in the activateEnv file. Once configured, the setting can be exported into the env by running the following command:

. activateEnv

This step will need to be performed each time a new terminal is opened.

With all of the above prerequisites installed, you should be able to run the following to initialize the database:

$ python createDB.py
$ python populateDB.py

Doing so will create the Database and populate it with some starting data.

Installing RabbitMQ

For instructions installing RabbitMQ visit their website.

Running the Application Locally

Follow the below steps in order to run this application locally.

  1. Open two terminals and active the virtual env for this applications in each.
  2. In each terminal, navigate to the application directory and run . activateEnv.
  3. In one terminal run python scheduleServer.py to start the web server.
  4. In the other terminal run python schedulerProcess.py to start the scheduler process.

After the above steps are completed, the application can be reached by opening a web browser and navigating to localhost:5000/.

Running the tests

Unit tests are automatically run against each branch and PR by Travis CI, however they can also be run manually by following the steps below:

  1. Open a terminal and navigate to the application directory (~/RAscheduler/ for example).
  2. Execute the runTests script. This will run through all of the written unit tests and generate a coverage report.
  3. To view the generated coverage report open the index.html file located in the coverageHTML/ directory.

Deployment

RADSA is deployed on Heroku.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use CalVer for versioning. The schema used by this project is YY.MM.DD

For the versions available, see the releases on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Special thanks to Ryan Ehrhardt for the inspiration for this project.

About

Web application that schedules Resident Assistants for nightly duty shifts and displays the schedule for the RAs to see. The application allows RAs to login and submit any conflicts they might have for a particular month, and a Hall Director, or their Assistants, may run the scheduling algorithm, view the result and make any changes.

Topics

Resources

License

Stars

Watchers

Forks