Development of tgmtools

Because the tgmtools package provides tools that accomplish a wide range of tasks, the main package has been structured into submodules and subpackages.

Principles of package organization

Each submodule and subpackage contain tools that logically group together. To make importing easier, the most commonly used objects are available at the top module level (see Importing tgmtools functions). General functions that are commonly used and have no external dependencies are contained within core.

Note

The main organizing principle is to group tools that perform related tasks within the same module, if this becomes unwieldy, create a subpackage.

Writing and running unit tests

Each subpackage contains a directory tests that contains test modules. Typically, each submodule within the tgmtools package contains a sister test module within its respective tests directory that starts with test_. Each test module contains typically contains tests that related to one particular submodule.

Start test functions with test_

The functions with each test module begin with test_. This allows nose to find and run them.

Run tests from the top level directory

To run all tests, execute the following from the top level tgmtools directory:

nosetests -v

Please refer to the nose documentation for advanced usage.

Building the documentation

Documentation is built using sphinx locally, however, ReadTheDocs builds and hosts the documentation after every git push to BitBucket.