Skip to content

Commit

Permalink
Merge pull request #21 from ska-sa/issue-20
Browse files Browse the repository at this point in the history
fixes #20
  • Loading branch information
o-smirnov authored Feb 9, 2021
2 parents e8843b3 + 27b4b05 commit bd9f430
Show file tree
Hide file tree
Showing 22 changed files with 4,303 additions and 169 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/test_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,35 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test command
- name: Test conversion to .txt models
run: |
tigger-convert $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html /tmp/output.txt -f
tigger-convert /tmp/output.txt -o /tmp/output.lsm.html -f
tigger-make-brick $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html $GITHUB_WORKSPACE/test/bla.fits
tigger-tag $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html gijs
tigger-restore -f $GITHUB_WORKSPACE/test/bla.fits $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html
tigger-convert $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html /tmp/output.txt -f \
--output-format "name ra_d dec_d i q u v i q u v spi rm emaj_s emin_s pa_d freq0"
tigger-convert $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html /tmp/output.recentred.txt -f --center 85.5deg,49.9deg --rename \
--output-format "name ra_d dec_d i q u v i q u v spi rm emaj_s emin_s pa_d freq0"
echo "Checking reference LSM"
diff $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.reference.txt /tmp/output.txt
echo "Checking recentred reference LSM"
diff $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.recentred.reference.txt /tmp/output.recentred.txt
- name: Test reverse conversion to .lsm.html models
run: |
tigger-convert /tmp/output.txt /tmp/output.lsm.html -f
- name: Test .gaul conversions
run: |
tigger-convert $GITHUB_WORKSPACE/test/deep4.gaul /tmp/deep4.lsm.html -f
tigger-convert $GITHUB_WORKSPACE/test/deep4.gaul /tmp/deep4.txt -f --output-format "name ra_d dec_d i q u v spi rm emaj_s emin_s pa_d freq0"
diff $GITHUB_WORKSPACE/test/deep4.reference.txt /tmp/deep4.txt
- name: Test .AIPSCC conversions
run: |
gunzip <$GITHUB_WORKSPACE/test/3C147-L-A-CLEAN.fits.gz >/tmp/3C147-L-A-CLEAN.fits
tigger-convert /tmp/3C147-L-A-CLEAN.fits /tmp/3C147-L-A-CLEAN.fits.lsm.html -f
tigger-convert /tmp/3C147-L-A-CLEAN.fits.lsm.html /tmp/3C147-L-A-CLEAN.txt -f --output-format "name ra_d dec_d i q u v"
zdiff $GITHUB_WORKSPACE/test/3C147-L-A-CLEAN.txt.gz /tmp/3C147-L-A-CLEAN.txt
- name: Testing tigger-restore and tigger-make-brick
run: |
cp $GITHUB_WORKSPACE/test/3C147tmp.fits /tmp
tigger-make-brick $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html /tmp/3C147tmp.fits
tigger-restore -f $GITHUB_WORKSPACE/test/3C147tmp.fits $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html /tmp/restored.fits
- name: Test tigger-tag
run: |
tigger-tag $GITHUB_WORKSPACE/test/3C147-HI6.refmodel.lsm.html 'r<0.5d' inner=1 -o /tmp/tmp.lsm.html -f
43 changes: 0 additions & 43 deletions .travis/py2.docker

This file was deleted.

36 changes: 16 additions & 20 deletions .travis/py3.docker
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ RUN docker-apt-install libblitz0-dev python3-dev libblas-dev liblapack-dev libqd
#####################################################################
RUN mkdir /src
WORKDIR /src
RUN wget https://github.com/casacore/casacore/archive/v3.1.1.tar.gz
RUN tar xvf v3.1.1.tar.gz
RUN mkdir casacore-3.1.1/build
WORKDIR /src/casacore-3.1.1/build
RUN wget https://github.com/casacore/casacore/archive/v3.3.0.tar.gz
RUN tar xvf v3.3.0.tar.gz
RUN mkdir casacore-3.3.0/build
WORKDIR /src/casacore-3.3.0/build
RUN echo hello
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPRECATED=ON -DBUILD_PYTHON3=ON -DBUILD_PYTHON=OFF ../
RUN make -j 4
RUN make install
RUN ldconfig
#RUN pip install -U --user --force-reinstall --install-option="--prefix=/usr" pip setuptools wheel
WORKDIR /src
RUN wget https://github.com/casacore/python-casacore/archive/v3.1.1.tar.gz
RUN tar xvf v3.1.1.tar.gz.1
WORKDIR /src/python-casacore-3.1.1
RUN wget https://github.com/casacore/python-casacore/archive/v3.3.0.tar.gz
RUN tar xvf v3.3.0.tar.gz.1
WORKDIR /src/python-casacore-3.3.0
RUN pip3 install .
WORKDIR /
RUN python3 -c "from pyrap.tables import table as tbl"
Expand Down Expand Up @@ -61,14 +61,11 @@ RUN makems WSRT_makems.cfg
#####################################################################
WORKDIR /src
RUN docker-apt-install git
RUN git clone https://github.com/casacore/casarest.git
#RUN wget https://github.com/casacore/casarest/archive/1.5.0.tar.gz
#RUN tar xvf 1.5.0.tar.gz
#WORKDIR /src/casarest-1.5.0
WORKDIR /src/casarest
RUN wget https://github.com/casacore/casarest/archive/v1.7.0.tar.gz
RUN tar xvf v1.7.0.tar.gz
WORKDIR /src/casarest-1.7.0
RUN mkdir -p build
#WORKDIR /src/casarest-1.5.0/build
WORKDIR /src/casarest/build
WORKDIR /src/casarest-1.7.0/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../
RUN make -j 4
RUN make install
Expand All @@ -81,18 +78,17 @@ WORKDIR /code
ADD . /code/tigger-lsm
RUN pip3 install ./tigger-lsm
WORKDIR /src
RUN git clone -b v1.7.0 https://github.com/ska-sa/meqtrees-cattery.git
RUN git clone -b v1.7.1 https://github.com/ska-sa/meqtrees-cattery.git
RUN git clone -b v1.5.0 https://github.com/ska-sa/purr.git
RUN git clone -b v1.6.0 https://github.com/ska-sa/owlcat.git
RUN git clone -b v1.4.3 https://github.com/ska-sa/kittens.git
RUN git clone -b v1.6.0 https://github.com/ska-sa/tigger-lsm.git
RUN git clone -b v1.7.0 https://github.com/ska-sa/pyxis.git
RUN git clone -b v1.7.1 https://github.com/ska-sa/pyxis.git

RUN pip3 install ./meqtrees-cattery ./purr ./owlcat ./kittens
RUN pip3 install -e ./pyxis

WORKDIR /src
RUN git clone -b v1.7.0 https://github.com/ska-sa/meqtrees-timba.git
RUN git clone -b v1.8.0 https://github.com/ska-sa/meqtrees-timba.git
RUN mkdir /src/meqtrees-timba/build
WORKDIR /src/meqtrees-timba/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON_3=ON ..
Expand All @@ -106,9 +102,9 @@ RUN flag-ms.py --help
RUN meqtree-pipeliner.py --help
RUN pyxis --help

# run test when built
# run end to end test when built
RUN pip3 install nose
WORKDIR /src/pyxis/Pyxis/recipies/meqtrees-batch-test
WORKDIR /src/pyxis/Pyxis/recipes/meqtrees-batch-test
RUN python3 -m "nose"

ENTRYPOINT ["meqtree-pipeliner.py"]
Expand Down
1 change: 0 additions & 1 deletion Jenkinsfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ cd $PROJECTS_DIR/meqtrees-tigger-lsm
IMAGENAME="mttiglsmpr"

# build and test
docker build -f .travis/py2.docker -t "${IMAGENAME}27:$BUILD_NUMBER" --no-cache=true .
docker build -f .travis/py3.docker -t "${IMAGENAME}36:$BUILD_NUMBER" --no-cache=true .
Loading

0 comments on commit bd9f430

Please sign in to comment.