Skip to content

krishnabhattaram/hknlib

 
 

Repository files navigation

elections

Scripts for running HKN elections.

Usage

Getting API credentials

You will first need the API key for OAuth. Specifically, you will need the service account key from the Google Developers console, with the hkn-ops login.

12/12/2019 UPDATE: service account and scope have been temporarily migrated. Please contact anthony.ding@hkn.mu for the service account credentials.

Download this service account key, which should be in a JSON file hknlib.json. Place this file into secret/.

Installing dependencies

This script won't work unless you install the dependencies:

pip install -r requirements.txt

If you followed the setup instructions from the hknweb wiki, you can install with pipenv:

pipenv install -r requirements.txt

Scripts

The three scripts new_members.py, new_officers.py, and old_officers.py should now work, using these credentials and the hknlib/election module.

Development

Relevant docs:

Tasks:

  • Login with the right access permissions
  • Grab data from the spreadsheet
  • Hunt through the Admin API to find out how to make a new user
    • If the username is taken (you should probably check before making a user), complain (print the problematic people)
    • Ask people for a backup (which might also be taken)
  • Find out how to add a user to a Google Group (email list)
    • If they're an elected officer, add them to -officers@
    • If they're an assistant officer, same thing
    • If they're a 'committee member', i.e. they're on another committee but want to be added, add them to -cmembers@
  • Make it work
  • Bonus! Make it work for the member signup too, but only for cmembers + jobs + alumni

About

Account management and election scripts for HKN.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%