-
Oberon
This repo contains the backend for the Villanova Courses platform
-
Primary Features
Fetches course data from Banner on a schedule
Parses Course data and writes the data into a database
-
Setup Instructions
** Install Postgres [OSX for now]
brew doctor
to make sure your package manager is running properly
brew update
to update brew package links
brew install postgres
to install postgresql
- Read the Caveats (I personally boot psql each time I want to work but you can also setup
background / startup processes. Here's a good link for that)
which psql
should match /usr/local/bin/psql
- Boot by typing
psql
in your shell
** How to Initialize your DB
createdb VillanovaCourseDB
createdb TestVillanovaCourseDB
- Now try this
psql VillanovaCourseDB
and you should be presented with the CLI for postgres
you can even see your tables and relations by typing \d
in the CLI
** Populate your Database
- Create an HTML file generated by the response to the post request (from banner)
- Navigate to the top level directory of the repo
- Build the database from your HTML file by running the following script
python setup.py [-filename]
- The database will now include all of the information from the HTML file
** Set up the Configurations
- From the dropbox, retrieve the config and private files
- Place them into /Oberon/oberon
- These files are required
** Running the Test Suite
- From the top level of the repo, run the following shell command
nose2
** Run the server
- Run the run.py script to start the server
python run.py
- Recap
- Install Postgres correctly
- Create the Database
- Run the setup.py script and pass the HTML file as the command line argument
- Run the test suite to make sure the build isn't broken
- Run the run.py script to start the server