- Fork from github
- Develop on your fork
- Test locally
- Make a pull request
Before making a pull request, make sure that your fork is up to date and that all the tests pass locally. This will make it less likely that your pull request will get rejected by making breaking chages or by failing the test requirements.
The tests require that you have cloned the repository, since the test code is not distributed in the package. It is recommended to use nosetests
for this. There are two options:
Use the provided Makefile
to run the tests using make
:
$ git clone https://github.com/BlueBrain/NeuroM.git
$ cd NeuroM
$ make test
This runs pep8
, pylint
and the unit tests in sequence.
This method takes care of installing all extra dependencies needed for running the tests, diagnosing the results, performing linting on the source code. These dependencies are installed into a virtuanelv
named neurom_test_venv
:
The Makefile
also has targets for running only pylint and pep8 individually:
$ make lint # runs pep8 and pylint if that succeeds
$ make run_pep8 # run only pep8
$ make run_pylint # run only pep8
Note that you can also install the test dependencies and run the tests inside of your own virtualenv:
(nrm)$ pip install -r requirements_dev.txt
This installs the following packages into your virtualenv
unless they are already installed:
../../requirements_dev.txt
Then, run the tests manually in the virtualenv
. For example,
(nrm)$ nosetests -v --with-coverage --cover-min-percentage=100 --cover-package neurom
Warning
To ensure that the test requirements are the same as those run in continuous integration, you should run the tests using the make test
command. This is the same command used in continuous integration. Failure to pass means will result in a pull request being rejected.
We test the code against Python 2.6, 2.7, 3.5.