Development

Getting the source code

The source code is maintained on GitHub. To check out the trunk:

$ git clone https://github.com/zms-publishing/Products.ZMySQLDA.git

You can also browse the code online at https://github.com/zms-publishing/Products.ZMySQLDA

Bug tracker

For bug reports, suggestions or questions please use the GitHub issue tracker at https://github.com/zms-publishing/Products.ZMySQLDA/issues.

Running the tests using zc.buildout

Products.ZMySQLDA ships with its own buildout.cfg file and bootstrap.py for setting up a development buildout:

$ python bootstrap.py
...
Generated script '.../bin/buildout'
$ bin/buildout
...

Once you have a buildout, the tests can be run as follows:

$ bin/test
Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
..............................................................
  Ran 62 tests with 0 failures and 0 errors in 0.043 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

To run tests for all supported Python versions, code coverage and a PEP-8 coding style checker, you can use tox after completing the buildout step above:

$ bin/tox
GLOB sdist-make: ...
...
____________________________________ summary _____________________________________
py27: commands succeeded
py27_zope213: commands succeeded
py35: commands succeeded
py36: commands succeeded
flake8: commands succeeded
coverage: commands succeeded
congratulations :)

Building the documentation using zc.buildout

The Products.ZMySQLDA buildout installs the Sphinx scripts required to build the documentation, including testing its code snippets:

$ cd docs
$ make html
...
build succeeded.

The HTML pages are in _build/html.

Making a release

These instructions assume that you have a development sandbox set up using zc.buildout as the scripts used here are generated by the buildout.

$ bin/buildout -N
$ python setup.py sdist bdist_wheel upload --sign

The bin/buildout step will make sure the correct package information is used.