How to Make a Release

A core developer should use the following steps to create a release X.Y.Z of pynwb.


Since the pynwb wheels do not include compiled code, they are considered pure and could be generated on any supported platform.

That said, considering the instructions below have been tested on a Linux system, they may have to be adapted to work on macOS or Windows.


Documentation conventions

The commands reported below should be evaluated in the same terminal session.

Commands to evaluate starts with a dollar sign. For example:

$ echo "Hello"

means that echo "Hello" should be copied and evaluated in the terminal.

Setting up environment

  1. First, register for an account on PyPI.

  2. If not already the case, ask to be added as a Package Index Maintainer.

  3. Create a ~/.pypirc file with your login credentials:

    index-servers =
where <your-username> and <your-password> correspond to your PyPI account.

PyPI: Step-by-step

  1. Choose the next release version number:

    $ release=X.Y.Z
  2. Download latest sources:

    $ cd /tmp && git clone && cd pynwb
  3. Tag the release:

    $ git tag -s -m "pynwb ${release}" ${release} origin/dev

    Requires a GPG signing key

  4. Create a new virtual environment and install release requirements:

$ mkvirtualenv pynwb-${release}-release && \
  pip install tox twine
  1. Create source distribution and wheels:

    $ rm -rf dist/
    $ tox
      py35: commands succeeded
      py27: commands succeeded
      congratulations :)


    Move forward only if the tox command completed successfully. If not, abort the release process and report the problem.

  2. Confirm that expected packages have been generated:

$ ls -1 dist/*


X.Y.Z correspond to the release version selected earlier.

  1. Sign and upload the packages to the PyPI testing server:

    $ twine upload --sign -r pypitest dist/*


Confirm that the packages are available on both testing servers:

  1. Upload the packages to the production PyPI server:

    $ twine upload --sign dist/*


Confirm that the packages are available on both servers:

  1. Create a clean testing environment to test installation:
$ mkvirtualenv pynwb-${release}-install-test && \
  pip install pynwb
  1. Publish the release tag:
$ git push origin ${release}
  1. Create GitHub release and upload packages:
$ pip install githubrelease
$ githubrelease release NeurodataWithoutBorders/pynwb create ${release} --name ${release} --publish ./dist/*
  1. Cleanup
$ deactivate  && \
  rm -rf dist/* && \
  rmvirtualenv pynwb-${release}-release && \
  rmvirtualenv pynwb-${release}-install-test

Conda: Step-by-step

In order to release a new version on conda-forge, follow the steps below:

  1. Clone feedstock

    $ cd /tmp && \
      git clone
  2. Create a new branch

    $ cd pynwb-feedstok && \
      git checkout -b $release
  3. Modify meta.yaml

    Update the version string and sha256.

    $ sed -i "2s/.*/{% set version = \"$release\" %}/" recipe/meta.yaml
    $ sha=$(openssl sha256 ../pynwb/dist/*.tar.gz | awk '{print $2}')
    $ sed -i "3s/.*/{$ set sha256 = \"$sha\" %}/" recipe/meta.yaml
  4. Push the changes

    $ git push origin $release
  5. Create a Pull Request

    Create a pull request against the main repository. If the tests are passed a new release will be published on Anaconda cloud.