Skip to content

Commit

Permalink
Merge branch 'release/0.10.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmmacleod committed Apr 19, 2018
2 parents 38d65a9 + 28aa544 commit d8bebb9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ matrix:

# macOS
- os: osx
osx_image: xcode9.2
env: PYTHON_VERSION='2.7'
language: minimal
sudo: required
Expand Down
10 changes: 10 additions & 0 deletions docs/dev/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ Step-by-step
second prompt is the tag message, please complete this to include the
release notes for this release.

.. note::

If ypu want to GPG sign the merge commit and the tag:

.. code-block:: bash
$ git commit --amend --gpg-sign # sign merge commit
$ git tag --sign v1.0.0 --force # regenerate tag
#. **Draft a release on GitHub**

* Go to https://github.com/gwpy/gwpy/releases/new
Expand Down
5 changes: 4 additions & 1 deletion gwpy/signal/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@

from math import ceil

from scipy.signal import windows as scipy_windows
try: # scipy 1.1.0rc1
from scipy.signal.windows import windows as scipy_windows
except ImportError: # scipy <= 1.0.x
from scipy.signal import windows as scipy_windows

from scipy.special import expit

Expand Down
12 changes: 8 additions & 4 deletions setup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from distutils.command.clean import (clean as orig_clean, log, remove_tree)
from distutils.command.bdist_rpm import bdist_rpm as distutils_bdist_rpm
from distutils.errors import DistutilsArgError
from distutils.version import LooseVersion
from distutils.version import (LooseVersion, StrictVersion)

from setuptools.command.bdist_rpm import bdist_rpm as _bdist_rpm
from setuptools.command.sdist import sdist as _sdist
Expand Down Expand Up @@ -144,7 +144,7 @@ def finalize_options(self):
raise DistutilsArgError(
"--format should be one of {!r}".format(self.FORMATS))
if self.start_tag:
self.start_tag = self.start_tag.lstrip('v')
self.start_tag = self._tag_version(self.start_tag)

def format_changelog_entry(self, tag):
log.debug(' parsing changelog entry for {}'.format(tag))
Expand Down Expand Up @@ -178,19 +178,23 @@ def _format_entry_deb(self, tag):
name, version, message,
tagger.name, tagger.email, dstr, tz))

@staticmethod
def _tag_version(tag):
return StrictVersion(str(tag).lstrip('v'))

def get_git_tags(self):
import git
repo = git.Repo()
tags = repo.tags
tags.reverse()
tags.sort(key=self._tag_version, reverse=True)
log.debug('found {} git tags'.format(len(tags)))
return tags

def run(self):
log.info('creating changelog')
lines = []
for tag in self.get_git_tags():
if self.start_tag and tag.name.lstrip('v') < self.start_tag:
if self.start_tag and self._tag_version(tag) < self.start_tag:
log.debug('reached start tag ({}), stopping'.format(
self.start_tag))
break
Expand Down

0 comments on commit d8bebb9

Please sign in to comment.