Web Packet is used by CSH to facilitate the evaluations of our members and keep track of packet signatures on the web
Authentication happens via pyOIDC with CSH SSO, authenticating as the user who is viewing the page. We have two different realms, and the site changes depending which realm is in use.
The server uses heavy caching via lru_cache to speed up the results as much as possible
For local development setup follow these steps:
pip install -r requirements.txt
Create config.py
or set environment variables- Several of these variables require keys and information, please reach out to an RTP for testing information
- Run
wsgi.py
The flask CLI provides all the methods needed to setup a packet and a packet season
create-packets Creates a new packet season for each of the freshmen in the given CSV.
create-secret Generates a securely random token.
db Perform database migrations.
ldap-sync Updates the upper and misc sigs in the DB to match ldap.
sync-freshmen Updates the freshmen entries in the DB to match the given CSV.
fetch-results Fetches and prints the results from a given packet season.
Use Pylint to ensure your code follows standards. Commits will be pylinted by Travis CI, if your build fails you must fix whatever it tells you is wrong before it will be merged.
To check locally, run pylint packet