From e282215c1ac32b56bba0836c01fa308b22b2aa77 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Thu, 20 Dec 2018 15:14:38 +0200 Subject: [PATCH 1/4] split travis files --- .gitignore | 1 + .travis.yml | 17 ++++++++++++----- .travis/mypy.docker | 7 +++++++ .travis/pep8.docker | 7 +++++++ .travis/py2.docker | 17 +++++++++++++++++ .travis/py3.docker | 16 ++++++++++++++++ 6 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 .travis/mypy.docker create mode 100644 .travis/pep8.docker create mode 100644 .travis/py2.docker create mode 100644 .travis/py3.docker diff --git a/.gitignore b/.gitignore index 056a8fd..7b5209a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ MANIFEST .venv*/ dist/ test/bla.restored.fits +test/bla.fits diff --git a/.travis.yml b/.travis.yml index 0418e12..2f36525 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,20 @@ language: python +matrix: + include: + - env: TARGET=py2 + - env: TARGET=py3 + - env: TARGET=pep8 + - env: TARGET=mypy + allow_failures: + - env: TARGET=pep8 + - env: TARGET=mypy sudo: required services: -- docker -python: -- '2.7' + - docker install: -- docker build . -t ska-sa/tigger-lsm + - true script: -- true +- docker build . -f .travis/${TARGET}.docker deploy: provider: pypi user: gijzelaerr diff --git a/.travis/mypy.docker b/.travis/mypy.docker new file mode 100644 index 0000000..e4bf66f --- /dev/null +++ b/.travis/mypy.docker @@ -0,0 +1,7 @@ +FROM kernsuite/base:4 +RUN docker-apt-install python3-pip +RUN pip3 install mypy +ADD . /code +WORKDIR /code +RUN mypy --ignore-missing-imports python + diff --git a/.travis/pep8.docker b/.travis/pep8.docker new file mode 100644 index 0000000..bb5489d --- /dev/null +++ b/.travis/pep8.docker @@ -0,0 +1,7 @@ +FROM kernsuite/base:4 +RUN docker-apt-install python3-pip +RUN pip3 install pycodestyle +ADD . /code +WORKDIR /code +RUN pycodestyle python --ignore=E501 + diff --git a/.travis/py2.docker b/.travis/py2.docker new file mode 100644 index 0000000..353f97a --- /dev/null +++ b/.travis/py2.docker @@ -0,0 +1,17 @@ +FROM kernsuite/base:4 +RUN docker-apt-install \ + python-setuptools \ + python-numpy \ + python-scipy \ + python-astropy \ + python-astro-kittens \ + python-astlib \ + python-pip \ +ADD . /code +RUN pip install /code +RUN python2 /usr/local/bin/tigger-convert /code/test/3C147-HI6.refmodel.lsm.html /tmp/output.txt +RUN python2 /usr/local/bin/tigger-make-brick /code/test/3C147-HI6.refmodel.lsm.html /code/test/bla.fits +RUN python2 /usr/local/bin/tigger-tag /code/test/3C147-HI6.refmodel.lsm.html gijs +RUN python2 /usr/local/bin/tigger-restore -f /code/test/bla.fits /code/test/3C147-HI6.refmodel.lsm.html +RUN echo "the next command should not print 1" +RUN wc -l /tmp/output.txt diff --git a/.travis/py3.docker b/.travis/py3.docker new file mode 100644 index 0000000..e70dac9 --- /dev/null +++ b/.travis/py3.docker @@ -0,0 +1,16 @@ +FROM kernsuite/base:4 +RUN docker-apt-install \ + python3-setuptools \ + python3-numpy \ + python3-scipy \ + python3-astropy \ + python3-astlib \ + python3-pip +ADD . /code +RUN pip3 install /code +RUN python3 /usr/local/bin/tigger-convert -f /code/test/3C147-HI6.refmodel.lsm.html /tmp/output.txt +RUN python3 /usr/local/bin/tigger-make-brick /code/test/3C147-HI6.refmodel.lsm.html /code/test/bla.fits +RUN python3 /usr/local/bin/tigger-tag /code/test/3C147-HI6.refmodel.lsm.html gijs +RUN python3 /usr/local/bin/tigger-restore -f /code/test/bla.fits /code/test/3C147-HI6.refmodel.lsm.html +RUN echo "the next command should not print 1" +RUN wc -l /tmp/output.txt From ce3b6356ee949dc84294fbeb5ffaf0d4084bea2c Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Thu, 20 Dec 2018 15:26:37 +0200 Subject: [PATCH 2/4] typo --- .travis/py2.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/py2.docker b/.travis/py2.docker index 353f97a..5381421 100644 --- a/.travis/py2.docker +++ b/.travis/py2.docker @@ -6,7 +6,7 @@ RUN docker-apt-install \ python-astropy \ python-astro-kittens \ python-astlib \ - python-pip \ + python-pip ADD . /code RUN pip install /code RUN python2 /usr/local/bin/tigger-convert /code/test/3C147-HI6.refmodel.lsm.html /tmp/output.txt From 3e51f8695930daa27bcca695595cf404e82fc380 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Thu, 20 Dec 2018 16:31:13 +0200 Subject: [PATCH 3/4] prepare for next release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 101f340..5ac04af 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from __future__ import print_function from setuptools import setup, find_packages -__version__ = "1.4.2" +__version__ = "1.5.0" requirements = ['astro_kittens', 'numpy', 'scipy', 'astlib', 'astropy', 'future'] From 3e62ac5a22ab16981915e2beb3c530b1ffce1e37 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Thu, 20 Dec 2018 16:35:50 +0200 Subject: [PATCH 4/4] fix module name --- .travis/mypy.docker | 2 +- .travis/pep8.docker | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/mypy.docker b/.travis/mypy.docker index e4bf66f..ead1d78 100644 --- a/.travis/mypy.docker +++ b/.travis/mypy.docker @@ -3,5 +3,5 @@ RUN docker-apt-install python3-pip RUN pip3 install mypy ADD . /code WORKDIR /code -RUN mypy --ignore-missing-imports python +RUN mypy --ignore-missing-imports Tigger diff --git a/.travis/pep8.docker b/.travis/pep8.docker index bb5489d..5418936 100644 --- a/.travis/pep8.docker +++ b/.travis/pep8.docker @@ -3,5 +3,5 @@ RUN docker-apt-install python3-pip RUN pip3 install pycodestyle ADD . /code WORKDIR /code -RUN pycodestyle python --ignore=E501 +RUN pycodestyle Tigger --ignore=E501