You need the source code to run tests, generate documentation, debug, fix bugs or modify ztm.navigator itself. It can be branched from the mirror-repository at launchpad.net:
$ bzr branch lp:ztm.navigator
You should now have a copy of ztm.navigator in a folder called ztm.navigator
ztm.navigator includes buildout configuration that will configure scripts for running tests, extraction of internationalization data, building and testing documentation.
Note
navigator 0.8 requires Python 2.5 or 2.4. Higher versions of Python not supported.
Enter the directory you branched above (navigator) to and bootstrap the buildout:
$ cd ztm.navigator
$ python --version
Python 2.5.4
$ python -S bootstrap.py
Warning
There may be problems with the default Python instance included in your distribution. If you experience problems please try compiling Python yourself. (On Windows the standard python.org binaries should be fine.)
This will bootstrap a buildout setup inside the ztm.navigator package (creates a bin/ folder and places a buildout script there) . To set up the package you need to run:
$ bin/buildout
Note
Depending on your bandwidth this step may take a while the first time you as are downloading quite a few packages.
If you intend to work a lot with Python-eggs and buildout, you probably want to configure ~/.buildout/default.cfg in your home area so that already downloaded eggs are not downloaded again and again for each package.
Let it look something like this:
[buildout]
eggs-directory=/Users/arnarl/.buildout/eggs
Simply run this script again if you change any dependencies. If you need more recent packages than the ones you’ve got installed, use the -n flag like this:
$ bin/buildout -n
To reduce the likelihood that your changes interfere or break other functionality you should always run the unit tests after doing any changes.
Unit tests are mostly found in ztm.navigator/src/ztm/navigator/tests. You can use the testrunner scripts to execute them:
$ bin/tests
If you submit a bug-fix, we also need a unit-test that demonstrates the problem along with the patch. If you wish to contribute new functionality to ztm.navigator please write unit tests covering the new features so others can avoid breaking them.
Some strings and web pages in ztm.topicmaps are shown to end users and need to be translated.
ztm.topicmaps uses zope.i18n which is built on GNU gettext. You can update the .po with new strings by running:
$ bin/i18nextract
Documentation is included in the package. It is written using reStructuredText, a format defined by Python’s distutils, and generated using sphinx. You can find the texts in ztm.navigator/src/ztm/navigator/doc.
HTML versions can be generated by running:
$ bin/sphinx-build src/ztm/navigator/doc parts/documentation
This will create a mini-website inside ztm.topicmaps/parts/documentation/. You can view it by pointing your web-browser to the directory.
To get a PDF-file with the documentation:
$ bin/sphinx-build -b pdf src/ztm/navigator/doc parts/documentation
To ensure that code examples in the documentation is correct you can run:
$ bin/sphinx-build -b doctest src/ztm/navigator/doc parts/doctest
Feel free to extend and improve it directly or send us comments about things that are unclear and needs improvements.
API documentation is automatically generated when the zope.apidoc module is included and can be found at /++apidoc++/ of your site. You should only include this when developing and not when deploymed into production.
You can create your own eggs if you need changes that are not in the public eggs:
$ python setup.py bdist_egg
The eggs are now available in the ztm.navigator/dist folder. If you are making a new release, remember to update the version number in setup.py.