From e230ab32872985054ef47cd3a4ae1d42367b5e9c Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Thu, 16 Aug 2018 15:41:04 +0100 Subject: [PATCH 1/5] Collapse apt-gets to single line and add pip - Pip is needed for fpm. This was missing before so would lead to errors during the build. - Apt-get install commands collapsed to single line to save copy pasting. --- scripts/ssm-build-deb.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/ssm-build-deb.sh b/scripts/ssm-build-deb.sh index f23af50c..e4d0d006 100755 --- a/scripts/ssm-build-deb.sh +++ b/scripts/ssm-build-deb.sh @@ -1,8 +1,7 @@ #!/bin/bash -# Execute the following as root to install lintian and fpm: -# apt-get install lintian -# apt-get install ruby ruby-dev build-essential +# Execute the following as root to install lintian, pip, and fpm: +# apt-get install lintian ruby ruby-dev build-essential python-pip # gem install --no-ri --no-rdoc fpm # Then run this file, as any user, altering the From 5bbbbdfd9ea9621b0fb79a40ee4c130f901c9f56 Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Mon, 1 Oct 2018 16:16:52 +0100 Subject: [PATCH 2/5] Split test requirements out and add constraint (#81) Split test requirements out and add constraint - Move test requirements into separate requirements file to make it clearer that they are only needed for running unit tests. - Add constraints file called from the test requirements file to limit one of coveralls' dependencies to an earlier version that works with Python 2.6. --- .travis.yml | 13 ++++++++----- constraints.txt | 4 ++++ requirements-test.txt | 8 ++++++++ requirements.txt | 6 ++---- 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 constraints.txt create mode 100644 requirements-test.txt diff --git a/.travis.yml b/.travis.yml index 48ae7f01..7a9be572 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,16 +16,19 @@ cache: pip # Avoid pip log from affecting cache before_cache: rm -fv ~/.cache/pip/log/debug.log -# Install defaults to "pip install -r requirements.txt" +install: + # Base requirements for ssm + - pip install -r requirements.txt + # Additional requirements for the unit and coverage tests + - pip install -r requirements-test.txt +# Commands to prepare environment for the test before_script: - export TMPDIR=$PWD/tmp - mkdir $TMPDIR - export PYTHONPATH=$PYTHONPATH:`pwd -P` - cd test -script: - - coverage run --branch --source=ssm,bin -m unittest2 discover --buffer +script: coverage run --branch --source=ssm,bin -m unittest2 discover --buffer -after_success: - - coveralls +after_success: coveralls diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 00000000..6c3eab64 --- /dev/null +++ b/constraints.txt @@ -0,0 +1,4 @@ +# Constraints that apply to pip installed requirements + +# coveralls dependency that needs an older version for Python 2.6 +pycparser<2.19 diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 00000000..b2f109e1 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,8 @@ +# Additional requirements for the unit and coverage tests + +# Constraints on the requirements below +-c constraints.txt + +unittest2 +coveralls +mock diff --git a/requirements.txt b/requirements.txt index eef22014..a5977a79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ +# Base requirements for ssm + stomp.py>=3.1.1 python-daemon<2.2.0 python-ldap dirq -# Dependencies for testing -unittest2 -coveralls -mock From 9afcf43a9bcc653c6be7848fb8992e4ef614d979 Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Wed, 3 Oct 2018 09:44:46 +0100 Subject: [PATCH 3/5] Add Codecov coverage testing - Small change as Codecov uses the same coverage tool as Coveralls. --- .travis.yml | 4 +++- requirements-test.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a9be572..db6608ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,6 @@ before_script: script: coverage run --branch --source=ssm,bin -m unittest2 discover --buffer -after_success: coveralls +after_success: + - coveralls + - codecov diff --git a/requirements-test.txt b/requirements-test.txt index b2f109e1..c9eb8ea3 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -6,3 +6,4 @@ unittest2 coveralls mock +codecov From 6376e3105dfbc4282d24a4342774269d65f44558 Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Wed, 3 Oct 2018 13:09:49 +0100 Subject: [PATCH 4/5] Update badges - Remove Landscape as not used. - Add Codacy and Code Climate. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f194a621..30b7dcdf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # Secure Stomp Messenger [![Build Status](https://travis-ci.org/apel/ssm.svg?branch=dev)](https://travis-ci.org/apel/ssm) -[![Coverage Status](https://coveralls.io/repos/apel/ssm/badge.svg?branch=dev)](https://coveralls.io/r/apel/ssm?branch=dev) -[![Code Health](https://landscape.io/github/apel/ssm/dev/landscape.svg?style=flat)](https://landscape.io/github/apel/ssm/dev) +[![Coverage Status](https://coveralls.io/repos/github/apel/ssm/badge.svg?branch=dev)](https://coveralls.io/github/apel/ssm?branch=dev) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cc3e808664ee41638938aa5c660a88ae)](https://www.codacy.com/app/apel/ssm) +[![Maintainability](https://api.codeclimate.com/v1/badges/34aa04f3583afce2ceb2/maintainability)](https://codeclimate.com/github/apel/ssm/maintainability) Secure Stomp Messenger (SSM) is designed to simply send messages using the STOMP protocol. Messages are signed and may be encrypted From cc3905959ea439ea00636207e5a82d0b88107fe8 Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Wed, 28 Nov 2018 14:30:59 +0000 Subject: [PATCH 5/5] Update release number and changelog --- CHANGELOG | 3 +++ apel-ssm.spec | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 51d4e6f6..1bd5e6f9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Changelog for ssm ================= +* Wed Nov 28 2018 Adrian Coveney - 2.3.0-2 + - Updated build and test files only. + * Wed Aug 16 2018 Adrian Coveney - 2.3.0-1 - Added support for stomp.py versions from 3.1.6 onwards which allows for builds on Ubuntu Trusty and should enable IPv6 support. diff --git a/apel-ssm.spec b/apel-ssm.spec index faa59cad..7fc3e1c9 100644 --- a/apel-ssm.spec +++ b/apel-ssm.spec @@ -5,7 +5,7 @@ Name: apel-ssm Version: 2.3.0 -%define releasenumber 1 +%define releasenumber 2 Release: %{releasenumber}%{?dist} Summary: Secure stomp messenger @@ -100,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT %doc %_defaultdocdir/%{name} %changelog +* Wed Nov 28 2018 Adrian Coveney - 2.3.0-2 + - Updated build and test files only. + * Wed Aug 16 2018 Adrian Coveney - 2.3.0-1 - Added support for stomp.py versions from 3.1.6 onwards which allows for builds on Ubuntu Trusty and should enable IPv6 support.