pyatran development¶
Repository¶
The pyatran repository lives at GitLab. Source code is managed using Git version control. pyatran adopts the branching model by Vincent Driessen.
Setting up the development environment¶
First, you’ll have to login to GitLab and create a fork of the pyatran repository.
The simplest way to set up a development environment is via conda:
$ git clone git@gitlab.com:YOURUSERNAME/pyatran.git
$ cd pyatran
$ conda create -n pyatran_dev --file requirements_dev.txt
Now, whenever you want to work on pyatran, you simply have to activate this environment:
$ source activate pyatran_dev
Version numbers¶
pyatran uses versioneer for managing version numbers. This means that it is never necessary to edit any version numbers in any files, as the version is determined automatically from the state of the version control system.
Making a release¶
Branch
release-x.y.z
offdevelop
:$ git checkout develop $ git checkout -b release-x.y.z
Make last changes to
release-x.y.z
. At least, you should replace the Unreleased heading indocs/changelog.rst
with the release version and date.Merge the
release-x.y.z
branch intomaster
:$ git checkout master $ git merge --no-ff release-x.y.z
Create a tag for the release:
$ git tag -a vx.y.z
You will be asked to enter a tag annotation.
Note
The automatic build and upload of conda packages is triggered by any new tag in the repository. Whenever a new tag is pushed to the main GitLab repository, the CI build will get the most recent release from PyPI, build this, and upload to anaconda.org. Therefore it is important to only push the new tag to gitlab after uploading the build to PyPI.
Create the source distribution:
$ python setup.py sdist
Upload this source distribution to PyPI:
$ twine upload --repository pypi dist/pyatran-x-y-z.tar.gz
Push the release to GitLab:
$ git push origin master $ git push --tags
Merge the “last changes” (see point 2. above) back into
develop
:$ git checkout develop $ git merge --no-ff master