-
Notifications
You must be signed in to change notification settings - Fork 1
Points leaderboard design doc
As an SSE member I would like to be able to see my attendance totals for the quarter to see how many tickets I will get for the end of quarter raffle.
The SSE points leaderboard was implemented using a web service written in Python using an extension of the Flask framework Flask-RESTful. The web service parses the SSE attendance sheet located in Google Sheets into JSON and when called from the website that JSON is used in displaying the leaderboard of SSE points on the points webpage.
The Python web serivce is then deployed to the cloud service Heroku. We have two deployment tiers in Heroku, staging and production. The staging app is named user-ranking-endpoint-staging and it's released once there is a commit to master. Once the service has been tested on staging the webmaster then will promote the staging app to production. The production app is named user-ranking-endpoint-production.
The endpoint can be accessed from the URLs below
- Staging: https://user-ranking-endpoint-staging.herokuapp.com
- Production: https://user-ranking-endpoint-production.herokuapp.com

{
"meetings": ["meeting 1", "meeting 2"],
"students": [
{
"name": "Student Name",
"pointsBreakdown": [1, 2],
"pointTotal": 3
}
]
}GoogleServiceBuilder: Builds a Google resource object which represents access to one of Google’s API services
GoogleSheetsPointsService: Parses an SSE attendance spreadsheet in google sheets as a python dictionary similar to our JSON schema
Points: A Flask-RESTful resource object which calls the GoogleSheetsPointsService and converts the dictionary to a JSON string to be used by the website. The resource only supports GET operations on any domain.
Note there were some additional classes in the beginning for parsing an attendance sheet from an Excel file located in Google Drive that were deleted since they were not being used. The commit that removed these classes was this commit
Original Developer: Andy Wojciechowski