Skip to content

Getting Started with BallotLab

Neil Johnson edited this page Oct 27, 2021 · 3 revisions

First, clone this repo into your a folder on your development computer. Then, follow these steps to set up your development environment: How to set up a perfect Python project

TL;DR: here's a summary listing of the bash commands:

cd [vour/repo/directory]
# install pipenv (system-wide)
pip install pipenv
# set up pipenv with python 3.9
pipenv install --python 3.9
# install development tools
pipenv install isort --dev
# currently, black is pre-release so use the --pre flag
pipenv install black --pre --dev  
pipenv install flake8 --dev
pipenv install mypy --dev
pipenv install pytest pytest-cov --dev

Install Required Python Packages

Once you've set up your development environment, install the required Python packages:

# Create PDF ballot files
pipenv install reportlab
# Add images to PDF files (replaces deprecated PIL)
pipenv install pillow
# (optional) extract text from PDFs
pipenv install pdfminer.six
Clone this wiki locally