Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmmacleod committed Jan 22, 2018
2 parents bba71af + 0508b34 commit 5e0b715
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 32 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ include versioneer.py
include gwpy.spec
include gwpy/_version.py
include debian/*
include debian/source/*
20 changes: 5 additions & 15 deletions ci/install-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,15 @@ apt-get -yq install \
python-git \
python-jinja2 \

# install setuptools from jessie-backports
if [ `get_debian_version` -eq 8 ]; then
# enable backports
apt-cache policy | grep "jessie-backports/main" &> /dev/null || \
{
echo "deb http://ftp.debian.org/debian jessie-backports main" \
> /etc/apt/sources.list.d/backports.list;
apt-get update -yqq;
}
# install setuptools
apt-get -yq install -t jessie-backports \
python-setuptools \
python3-setuptools
fi

# get versions
GWPY_VERSION=`python setup.py version | grep Version | cut -d\ -f2`
GWPY_RELEASE=${GWPY_VERSION%%+*}

# upgrade setuptools for development builds only to prevent version munging
if [[ "${GWPY_VERSION}" == *"+"* ]]; then
pip install "setuptools>=25"
fi

# prepare the tarball (sdist generates debian/changelog)
python setup.py sdist

Expand Down
6 changes: 4 additions & 2 deletions ci/install-el.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ yum -y install rpm-build git2u python-jinja2 ${PY_PREFIX}-jinja2

GWPY_VERSION=`python setup.py version | grep Version | cut -d\ -f2`

# update setuptools for bdist_rpm
pip install "setuptools>=25"
# upgrade setuptools for development builds only to prevent version munging
if [[ "${GWPY_VERSION}" == *"+"* ]]; then
pip install "setuptools>=25"
fi

# build the RPM
python setup.py bdist_rpm
Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Build-Depends: debhelper (>= 9),
dh-python,
python-all,
python3-all,
python-setuptools (>= 33.0),
python3-setuptools (>= 33.0),
python-setuptools,
python3-setuptools,

# -- python-gwpy --------------------------------------------------------------

Expand Down
128 changes: 128 additions & 0 deletions docs/dev/release.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.. _gwpy-dev-release:

####################
Publishing a release
####################

This page describes the steps required to author a release of GWpy.

Notes:

* gwpy uses the `git flow <https://github.com/nvie/gitflow>`__ branching model
for releases
* all release numbers must follow `Semantic Versioning 2 <segmver.org>`__ and
include major, minor, and patch numbers, e.g. ``1.0.0`` rather than
``1.0`` or just ``1``

============
Step-by-step
============

#. **Create a release branch using git flow**

.. code-block:: bash
$ git flow release start 1.0.0
and then ``publish`` it, allowing CI to run, and others to contribute:

.. code-block:: bash
$ git flow release publish 1.0.0
#. **Wait patiently for the continuous integration to finish**

#. **Announce the release** and ask for final contributions

#. **Finalise the release and push**

.. code-block:: bash
$ git flow release finish 1.0.0
$ git push origin master
$ git push origin --tags
.. note::

The ``git flow release finish`` command will open two prompts, one
to merge the release branch into `master`, just leave that as is. The
second prompt is the tag message, please complete this to include the
release notes for this release.

#. **Draft a release on GitHub**

* Go to https://github.com/gwpy/gwpy/releases/new
* Use ``v1.0.0`` as the *Tag version*
* Use 1.0.0 as the *Release title*
* Copy the tag message into the text box to serve as release notes

#. **Publish the release documentation**

This is done from the LDAS computing centre at Caltech:

.. code-block:: bash
$ cd /home/duncan.macleod/gwpy-nightly-build/
$ bash release-build.sh 1.0.0
Once that is complete (~20 minutes), a few manual updates must be made

.. code-block:: bash
$ cd /home/duncan.macleod/gwpy-nightly-build/gwpy.github.io/docs
$ unlink stable && ln -s 1.0.0 stable
$ sed -i 's/0.9.9/1.0.0/g' index.html
The final command should be modified to replace the previous release ID
with the current one.

Then:

.. code-block:: bash
$ git commit --gpg-sign --message="1.0.0: release docs"
$ git push # <- this step needs an SSH key
It should take ~5 minutes for the release documentation to actually
appear on https://gwpy.github.io/docs/

====================================
Distributing the new release package
====================================

Package distributions for Debian, RHEL, and Macports, is still done manually:

Debian/RHEL
-----------

* Upload the source tarball to software.ligo.org
* Email daswg+announce@ligo.org to announce the new release and the presence of the tarball on http://software.ligo.org.

Macports
--------

* Generate an updated ``Portfile``

.. code-block:: bash
$ python setup.py port
* Open a new Pull Request on https://github.com/macports/macports-ports that
replaces the old ``/python/py-gwpy/Portfile`` with this new version.

==============
Linked updates
==============

PyPI
----

Finishing the release and pushing the tags to ``origin`` will trigger a new
CI run on https://travis-ci.org, which will automatically deploy the new
release tarball to https://pypi.python.org and publish the release there.

Zenodo
------

Creating a new release on GitHub will automatically trigger a new DOI on
https://zenodo.org.
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ Working with data
time/index
astro/index

**Developer notes**

.. toctree::
:maxdepth: 1

dev/release

.. ----------------------------------------------------------------
.. other sections (not directly linked, but need for cross-linking)
Expand Down
8 changes: 0 additions & 8 deletions etc/Portfile.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

# -- basic -------------------------------------------------------------------

PortSystem 1.0
PortGroup python 1.0
PortGroup github 1.0
Expand All @@ -21,17 +19,13 @@ long_description GWpy is a collaboration-driven Python package providing \
gravitational-wave detectors.
homepage https://gwpy.github.io

# -- sources -----------------------------------------------------------------

master_sites pypi:g/gwpy \
https://github.com/gwpy/gwpy/releases/v${version}/
distname gwpy-${version}

checksums rmd160 {{ rmd160 }} \
sha256 {{ sha256 }}

# -- python configuration ----------------------------------------------------

# until glue is available for multiple python versions, we are stuck to
# python 2.7
#python.versions 27 34 35 36
Expand All @@ -54,8 +48,6 @@ if {${name} ne ${subport}} {

depends_build-append port:py${python.version}-setuptools

# -- variants -------------------------------

variant nds2 description {Add NDS2 support} {
depends_lib-append port:py${python.version}-nds2-client
}
Expand Down
2 changes: 1 addition & 1 deletion etc/spec.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Name: python-%{srcname}
Version: {{ version }}
Release: 1
Release: 1%{?dist}
Summary: {{ description }}

License: {{ license }}
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
from __future__ import print_function

import sys
from distutils.version import LooseVersion

from setuptools import (setup, find_packages)
from setuptools import (setup, find_packages,
__version__ as setuptools_version)

import versioneer
from setup_utils import (CMDCLASS, get_setup_requires, get_scripts)
Expand All @@ -43,13 +45,17 @@
install_requires = [
'numpy>=1.7.1',
'scipy>=0.12.1',
'matplotlib>=1.2.0,!=2.1.*',
'matplotlib>=1.2.0',
'astropy>=1.1.1',
'six>=1.5',
'lscsoft-glue>=1.55.2',
'python-dateutil',
]

# exclude matplotlib 2.1.x (see matplotlib/matplotlib#10003) if possible
if LooseVersion(setuptools_version) >= '25': # exclude matplotlib 2.1.x
install_requires[2] += ',!=2.1.*'

# test for LAL
try:
import lal # pylint: disable=unused-import
Expand Down
4 changes: 2 additions & 2 deletions setup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ def run(self):
log.info(' %s: %s' % (key, val))
# write finished portfile to file
with open(self.portfile, 'w') as fport:
fport.write(self._template.render(
version=self.distribution.get_version(), **digest))
print(self._template.render(
version=self.distribution.get_version(), **digest), file=fport)
log.info('portfile written to %r' % self.portfile)

@staticmethod
Expand Down

0 comments on commit 5e0b715

Please sign in to comment.