/csh-selections

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Selections

Python 3.8 Linting

Selections is a Flask / Python web app meant to help facilitate the application review process for Computer Science House.

Running locally

There are 2 methods for configuring this project:

  1. Environment variables: various variables are pulled from the environment by config.env.py. This is especially useful for running selections in a container, as configuration may be injected into the env rather than written to a file.
  2. Local config file: creating a file named config.py will allow you to write secrets and configuration to a file. Variables specified in config.py will be passed to the application. By default this will be ignored by git. Please do not commit configuration secrets.

Configuration secrets for local development may be obtained from an RTP.

If you add configuration variables or secrets, you will need to add entries to config.env.py so they may be configured in the production environment.

Selections requires Python 3 (install steps) and pip. Production selections runs python 3.6.

We recommend using either the python venv module or virtualenv, as virtual environments help isolate your project dependencies and keep your system cleaner and more stable. Please refer to the documentation on those projects for guides on usage.

Dependiencies are specified by requirements.txt, and may be installed through pip. Note that on some systems, pip for python 3 must be specified as pip3.

pip install -r requirements.txt

The application may be run locally with the following command.

flask run -h localhost -p 8080

Code standards

This project uses Pylint for linting and enforcement of code standards and styling. Every pull request of this project will be tested by Travis CI. Failing the linting step will block merging of your PR. Please run pylint locally before making your PR, it will help save you some time and headache.

To run pylint use this command:

pylint selections

Administration

Preparing selections for a new year

Please see the new year guide.

Deploying selections

Deployment resources and documentation are in the deploy directory.