Doc explainer for those that stumble on the repo goes here
Before contributing to the EGES, please read the style guide.
The documentation is built with Sphinx. Use of pipenv is optional, but encouraged for easier requirements management, built-in virtual environments, and local testing. See the pipenv documentation for installation options.
Navigate to the project directory (assuming you're not already there) and install the required packages.
cd /path/to/Essential-Guide-to-Election-Security
This one line should install all the necessary requirements.
pipenv install
Using pip, you'll have to specify the requirements file that contains the list of required packages.
pip install -r requirements.txt
If this is the first time you're building the documentation–or if you've made changes to any of the files–do the following:
cd docs
pipenv run sphinx-build -b html source build
sphinx-build -b html source build
After executing the above, navigate to the docs
folder and run the following commands:
python -m http.server --directory build
Open a browser and connect to http://localhost:8000 and you should see the documentation.
Regardless of whether you're using either pipenv
or pip
, there are two requirements files to be kept up to date: the Pipfile
and requirements.txt
. Pipenv
is useful for local development, but Read the Docs will only install from requirements.txt
. When you perform pipenv install <some_package>
, pipenv
updates the Pipfile
for you. To update requirements.txt
, run the following command:
pipenv run pip freeze > requirements.txt
This will overwrite the existing requirements.txt
file with the newest updates.
If you add a package with pip
, you'll have to edit the Pipfile
with the package and version using the required syntax.