Hacking on zope.hookable

Getting the Code

The main repository for zope.hookable is in the Zope Foundation Github repository:

You can get a read-only checkout from there:

$ git clone https://github.com/zopefoundation/zope.hookable.git

or fork it and get a writeable checkout of your fork:

$ git clone git@github.com/jrandom/zope.hookable.git

Using tox

Running Tests on Multiple Python Versions

tox is a Python-based test automation tool designed to run tests against multiple Python versions. It creates a virtualenv for each configured version, installs the current package and configured dependencies into each virtualenv, and then runs the configured commands.

zope.hookable configures the following tox environments via its tox.ini file:

  • The defined Python environments build a virtualenv/venv, install zope.hookable and dependencies, and run the tests via zope.testrunner There are environments both for with and without using the C code extension.

  • The coverage environment builds a virtualenv, installs zope.hookable and dependencies, installs coverage, and runs the tests with coverage.

  • The docs environment builds a virtualenv installs zope.hookable and dependencies, installs Sphinx and dependencies, and then builds the docs and exercises the doctest snippets.

This example requires that you have a working python3.11 on your path, as well as an installed tox:

$ tox -e py311

Running tox with no arguments runs all the configured environments, including building the docs and testing their snippets:

$ tox

To run the tests in parallel use:

$ tox -p auto

To see the coverage output:

$ tox -e coverage

Building the documentation

zope.hookable uses the nifty Sphinx documentation system for building its docs.

$ tox -e docs

It also tests the code snippets in the documentation.

Contributing to zope.hookable

Submitting a Bug Report

zope.hookable tracks its bugs on Github:

Please submit bug reports and feature requests there.

Sharing Your Changes

If have made a change you would like to share, the best route is to fork the GitHub repository, check out your fork, make your changes on a branch in your fork, and push it. You can then submit a pull request from your branch: