Development Setup

Make sure that you have the repository installed.

Install Requirements

To install all requirements for the development setup, execute

pip install --upgrade -r requirements.txt -r test-requirements.txt -r dev-requirements.txt

Sphinx Documentation Setup

Sphinx was setup using the tutorial from readthedocs. It should be already setup if you completed the previous step.

Further reading:

With Notepad++ under Windows, you can run the make_html.bat file in the docs directory to create the documentation and show undocumented code.

Code Climate

To install the code climate command line interface (cli), read about it in their github repository You need docker to be installed. Under Linux you can execute this in the Terminal to install docker:

wget -qO- | sh
sudo usermod -aG docker $USER

Then, log in and out. Then, you can install the command line interface:

wget -qO- | tar xvz
cd codeclimate-* && sudo make install

Then, go to the ObservableList repository and analyze it.

codeclimate analyze

Version Pinning

We use version pinning, described in this blog post (outdated). Also read the current version for how to set up.

After installation you can run

pip install -r -r -r
pip-compile --output-file requirements.txt
pip-compile --output-file test-requirements.txt
pip-compile --output-file dev-requirements.txt
pip-sync requirements.txt dev-requirements.txt test-requirements.txt
pip install --upgrade -r requirements.txt -r test-requirements.txt -r dev-requirements.txt

pip-sync uninstalls every package you do not need and writes the fix package versions to the requirements files.

Continuous Integration to Pypi

Before you put something on Pypi, ensure the following:

  1. The version is in the master branch on github.
  2. The tests run by travis-ci run successfully.

Pypi is automatically deployed by travis. See here. To upload new versions, tag them with git and push them. tag_and_deploy

The tag shows up as a travis build. If the build succeeds, it is automatically deployed to Pypi.

Manual Upload to the Python Package Index

However, here you can see how to upload this package manually.


Throughout this chapter, <new_version> refers to a a string of the form [0-9]+\.[0-9]+\.[0-9]+[ab]? or <MAYOR>.<MINOR>.<STEP>[<MATURITY>] where <MAYOR>, <MINOR> and, <STEP> represent numbers and <MATURITY> can be a letter to indicate how mature the release is.

  1. Create a new branch for the version.
git checkout -b <new_version>
  1. Increase the __version__ in
    • no letter at the end means release
    • b in the end means Beta
    • a in the end means Alpha
  2. Commit and upload this version.
git add ObservableList/
git commit -m "version <new_version>"
git push origin <new_version>
  1. Create a pull-request.
  2. Wait for travis-ci to pass the tests.
  3. Merge the pull-request.
  4. Checkout the master branch and pull the changes from the commit.
git checkout master
git pull
  1. Tag the version at the master branch with a v in the beginning and push it to github.
git tag v<new_version>
git push origin v<new_version>
  1. Upload the code to Pypi.


First ensure all tests are running: pep8

From sdist bdist_wininst upload register


You can find all Pypi classifiers here.