If you want to try out the development version of
tskit, or add features or
documentation improvements, please read the following. If you think there is anything
missing, please open an issue or
pull request on GitHub!
Make a fork of the tskit repo on GitHub
Clone your fork into a local directory, making sure that the submodules are correctly initialised:
$ git clone email@example.com:tskit-dev/tskit.git --recurse-submodules
For an already checked out repo, the submodules can be initialised using:
$ git submodule update --init --recursive
(note that on Windows you may have to run this as administrator, in order to create the correct symlinks)
Install the Python development requirements using
pip install -r python/requirements/development.txt.
Build the low level module by running
Run the tests to ensure everything has worked:
python -m nose -vs. These should all pass.
Make your changes in a local branch, and open a pull request on GitHub when you are ready. Please make sure that (a) the tests pass before you open the PR; and (b) your code passes PEP8 checks (see Code style below for a git commit hook to ensure this happens automatically) before opening the PR.
Continuous integration tests¶
Three different continuous integration providers are used, which run different combinations of tests on different platforms:
CircleCI Runs all Python tests using the apt-get infrastructure for system requirements. Additionally, the low-level tests are run, coverage statistics calculated using CodeCov, and the documentation built.
AppVeyor Runs Python tests on 32 and 64 bit Windows using conda.
Submitted code should conform to PEP8.
An easy way to ensure this is the case is to add a
pre-commit file to the
.git/hooks/ directory in your local installation. We recommending adding something
like the following line to your
exec flake8 python/setup.py python/tskit python/tests --max-line-length=89
(the flake8 python package should have been installed as part of the Python development requirements above)
Installing development versions¶
Because the python package is not defined in the project root directory, using pip to
install the bleeding-edge package directly from the tskit github repository requires you
python3 -m pip install git+https://github.com/tskit-dev/tskit.git#subdirectory=python