The backend for the CERP project. See CERP-webview for the frontend.
Provide information on local elections, politicians, issues, and political outcomes. Visualize and share results.
Election information should be available to citizens in an easy to understand, fun to explore, and overall interesting way so that our community can better understand itself and its political past, present, and future.
Larimer County provides information about elections at a precinct level, but the information is provided as a table of statistics. We are striving to improve the explorability of the data by building a website that lets Larimer County citizens view results on a map, compare precincts, and discover ways to reach out to elected officials.
- Show election information on a heat map of precincts in Larimer County.
- Display all election outcomes for a precinct on the same page.
- Allow different "views" of the data to be shared via hyperlinks.
This project has two parts:
- A front end built on Vue.js and located in its own repository. Be sure to clone that repo and follow the setup steps!
- A back end (this repo) built with Python + Flask. You can learn the purpose of each file in DEFINTION.md.
These steps only need to be performed once.
Although the manage
application is OS-agnostic, it assumes that the current version of Python (~3.6
) and all packages for the application are installed correctly and exist in your current $PATH
.
To get started on a Linux or Linux-like environment (e.g. OS X), create a Python virtual environment and install the project's requirements:
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
You can read about virtualenv
here.
Once you have completed the initial setup steps above, follow these instructions to start developing.
Whenever you want to view or develop the application, activate the Python virtual environment then start the Flask server:
. venv/bin/activate
python manage.py run
# OR alternate shorthand/alias
python manage.py r
To periodically run Python tests:
python manage.py test
# OR alternate shorthand/alias
python manage.py t
To generate a coverage report:
python manage.py coverage
# OR alternate shorthand/alias
python manage.py c
We welcome new contributors. Be sure to check out guide on contributing, which includes instructions on how to fork, clone, branch, commit, pull request and sync your fork.
Not sure where to start? Look for open issues on GitHub, or message the team on our Slack site. If you aren't on our Slack, click here for an invite.
TL;DR Contribution Workflow:
- Fork this repository and Clone your fork locally.
- Checkout a new branch on which to make your changes.
- Make edits. Try to match existing coding style.
- Test your changes.
- Commit your changes. Push your changes to your fork on GitHub.
- Submit a new pull request and your changes will be reviewed and merged.
We encourage you to open up an issue if you have any feedback, suggestions or bugs.
MIT, see LICENSE for full license.