Skip to content

Commit

Permalink
Merge pull request #9 from ska-sa/py3
Browse files Browse the repository at this point in the history
port to py3
  • Loading branch information
gijzelaerr authored Dec 20, 2018
2 parents f4f4c04 + 3e62ac5 commit 6a538be
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ MANIFEST
.venv*/
dist/
test/bla.restored.fits
test/bla.fits
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions .travis/mypy.docker
Original file line number Diff line number Diff line change
@@ -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 Tigger

7 changes: 7 additions & 0 deletions .travis/pep8.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM kernsuite/base:4
RUN docker-apt-install python3-pip
RUN pip3 install pycodestyle
ADD . /code
WORKDIR /code
RUN pycodestyle Tigger --ignore=E501

17 changes: 17 additions & 0 deletions .travis/py2.docker
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .travis/py3.docker
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit 6a538be

Please sign in to comment.