Skip to content

Instructions

Sebastiano Ferraris edited this page Jul 6, 2019 · 11 revisions
  • Option 1: Install the latest stable version with pip install nilabels

  • Option2: install in development mode: NiLabels can be installed in development mode in a local virtualenv. with pip. To proceed, initialise a virtual environment and execute the following instructions:

cd <folder where to clone the code>
git clone https://github.com/nipy/nilabels.git
cd nilabels
pip install -r requirements.txt
pip install -e .

In development mode every change made to your local code will be directly affecting the installed library without reinstalling.

  • For the advanced method symmetrise_wit_registration, extra examples and quick arrays visualisation with ITK-snap you can install the external software:

  • To uninstall:

pip uninstall nilabels

To delete the library in the virtualenv in case something really wrong happen and pip uninstall will not work correctly:

sudo rm -rf /path_to_site_packages_in_virtualenv/site-packages/nilabels*

For developers: how to create a new release and update the pypi library

When the master branch passes the tests and it is ready to become the next release:

  • Update the version number both in setup.py and in definitions.py (with the next release number <v1.2.3>).
  • Commit the version number upgrade with git commit -am "pre release version <v1.2.3>"
  • Create the tag with git tag -a <v1.2.3> -m "<message with major changes>"
  • git push origin master
  • git push tag v1.2.3
  • Add release documentation on github from the releases tab, adding the newly created one.
  • pip install --upgrade twine
  • python3 setup.py sdist bdist_wheel
  • python3 -m twine upload dist/* Wait for the badge to get up to date.