Developing django-uswds-forms

Important

This section is about developing django-uswds-forms itself, not using it in your Django project. For details on the latter, see the Quick start guide.

First, clone the git repository:

git clone https://github.com/18F/django-uswds-forms

Then create a virtualenv for the project and install development dependencies:

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt

Then install django-uswds-forms in development mode:

python setup.py develop

You will also need to download PhantomJS and put it somewhere on your PATH, as it’s required by the test suite.

Running tests

You can run all the tests with code coverage:

pytest

You can also ensure that there aren’t any linting errors:

flake8

To run all tests, linters, and other automated QA against all supported runtimes and dependencies, run:

tox

Writing documentation

If you want to work on documentation, you can run the development documentation server with:

python setup.py devdocs