Contributing

Getting the Source

Get the source for HTPC Launcher from this GitHub project: https://github.com/tctimmeh/htpc-launcher

git clone https://github.com/tctimmeh/htpc-launcher.git

Setting Up a Development Environment

Use a python virtualenv to work on HTPC Launcher. The included makefile will create an appropriate virtual environment with all of the necessary third-party libraries installed. Run the following command to create the virtual environment:

make venv

The virtual environment must then be activated before running tests, or building documentation or installation packages. Activate the virtual environment with by running this command from the project root directory:

. venv/bin/activate

For reference, the following third-party libraries are required to test and/or build HTPC Launcher:

  • pytest
  • mock
  • sphinx

Executing the Tests

Run the HTPC Launcher tests by executing this command from the project root directory:

make test

Code Coverage

Testing coverage reports are created automatically using the python Coverage module. A coverage report is shown when the tests are run. Run coverage html after running the tests to generate the report as HTML.

Continuous Integration

This project is built and tested automatically by Travis CI after every commit to the main repository. Find the latest build here: https://travis-ci.org/tctimmeh/htpc-launcher. See the Travis CI documentation for information about how to configure the build: http://about.travis-ci.org/docs/.

Travis CI also automatically publishes code coverage reports to Coveralls. Find the coveralls page for this project here: https://coveralls.io/r/tctimmeh/htpc-launcher.

Building Installation Package

The HTPC Launcher source code includes a python setup.py file to create a python installation package. The Distribute python packaging library provides some additional functionality to the standard setup.py file. Here are some common operations that can performed using the setup.py file.

Build a source distibution for testing
./setup.py sdist
Install the Development Working Copy to the Python Virtual Environment
./setup.py develop
Upload a New Version to the Python Package Index

./setup.py sdist register upload

or

make upload

Building This Documentation

Build this documentation by running the following command from the project root directory:

make doc

To build only the HTML or man page, run make html or make man respectively from the docs directory.

Making a New Release

Follow these steps to release a new version:

  1. Increment the product version number
  • Increment the release number if only bug fixes were made, the minor number if new features were added, or the major number if changes have broken backwards compatibility.
  1. Tag the code with the new version number
  2. Update the release notes by changing the 1.x label to the new version number. Create a new 1.x label.
  3. Upload the new version to the Python Package Index by running make upload
  4. If any documentation was changed since the previous release, move the doc-latest branch to match the latest tagged release