Development
===========

.. highlight:: bash

If you wish to contribute to this project, then you should fork the
repository found here:

https://github.com/simplistix/testfixtures/

Once that has been done and you have a checkout,
you can follow the instructions below to perform various development tasks.

For detailed development guidelines, code style requirements, and additional commands,
see ``AGENTS.md`` in the repository root.

Setting up a virtualenv
-----------------------

The recommended way to set up a development environment is to create
a virtualenv and then install the package in editable form as follows:

.. code-block:: bash

    python3 -m venv .venv
    source .venv/bin/activate
    pip install -U pip setuptools
    pip install -U -e .[test,build]

Running the tests
-----------------

Once you've set up a virtualenv, the tests can be run in the activated
virtualenv and from the root of a source checkout as follows:

.. code-block:: bash

  pytest

Building the documentation
--------------------------

The Sphinx documentation is built by doing the following from the
directory containing ``setup.py``:

.. code-block:: bash

  cd docs
  make html

To check that the description that will be used on PyPI renders properly,
do the following:

.. code-block:: bash

  python setup.py --long-description | rst2html.py > desc.html

The resulting ``desc.html`` should be checked by opening in a browser.

Making a release
----------------

To make a release, just update ``version.txt``, update the change log
and push to https://github.com/simplistix/testfixtures.
Carthorse should take care of the rest.
