Development

This page contains reference material for those interested in developing and contributing to the mosromgr module.

The project source code is hosted on GitHub at https://github.com/bbc/mosromgr which also includes the issue tracker.

Setting up for Development

  1. Clone the repository and enter the directory:

    $ git clone https://github.com/bbc/mosromgr
    $ cd mosromgr
    
  2. Create a virtual environment e.g. using virtualenvwrapper:

    $ mkvirtualenv mosromgr
    
  3. Install the project for development:

    $ make develop
    

After completing these steps, the library and command line interface will be available to use within your environment. Any modifications made to the source code will be automatically reflected within the environment.

Tests

The test suite uses pytest. Tests are organised mirroring the source code.

Running the tests

To run the linter, test suite and coverage analysis, activate the environment and run:

$ make test

For more control when running tests, run pytest directly, for example pytest -vvxk story will run tests with story in the name (-k story) with verbose output (-vv), and stop at the first failure (-x).

Documentation

The documentation is built using sphinx using the diataxis framework.

Building the documentation

To build the documentation, activate the environment and run:

$ make doc

This will generate the required diagrams and build the HTML docs which will be located in docs/build/html. Serve them with the command:

$ make doc-serve

You’ll now be able to open the docs on your browser at http://localhost:8000/.