Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit dd26cd2

Browse files
author
Matt Garthwaite
authored
Merge pull request #261 from GeoscienceAustralia/develop
Release 0.4.1
2 parents b67611f + bf8d39c commit dd26cd2

File tree

148 files changed

+5294
-3634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5294
-3634
lines changed

.coveragerc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# .coveragerc to control coverage.py
2+
[run]
3+
branch = True
4+
source = pyrate
5+
#omit =
6+
# omit everything in
7+
# pyrate/tasks/*
8+
# omit these files
9+
# pyrate/pyratelog.py
10+
# pyrate/scripts/main.py
11+
# pyrate/pyaps.py
12+
# pyrate/compat.py
13+
14+
[report]
15+
# Regexes for lines to exclude from consideration
16+
exclude_lines =
17+
# Have to re-enable the standard pragma
18+
pragma: no cover
19+
20+
# Don't complain about missing debug-only code:
21+
def __repr__
22+
def __str__
23+
if self\.debug
24+
25+
# Don't complain if tests don't hit defensive assertion code:
26+
raise AssertionError
27+
raise NotImplementedError
28+
raise ValueError
29+
raise RuntimeError
30+
raise IOError
31+
except OSError
32+
except ValueError
33+
except IndexError
34+
raise ImportError
35+
except ImportError
36+
raise ConfigException
37+
raise ReferencePhaseError
38+
raise RefPixelError
39+
raise RoipacException
40+
raise GeotiffException
41+
raise RasterException
42+
raise IfgException
43+
raise GammaException
44+
raise PreprocessError
45+
raise TimeSeriesError
46+
raise OrbitalError
47+
48+
# Don't complain if non-runnable code isn't run:
49+
if 0:
50+
if __name__ == .__main__.:
51+
52+
ignore_errors = True
53+
54+
[html]
55+
directory = coverage_html_report

.travis.yml

Lines changed: 72 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,91 @@
1-
branches:
2-
only:
3-
- develop
4-
- /^release-.*$/
5-
- /.*-travis$/
6-
- master
1+
language: python
72

8-
os: linux
9-
dist: bionic # Ubuntu 18.04
3+
dist: xenial
104

11-
language: python
12-
cache: pip
5+
env:
6+
global:
7+
- PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
8+
- PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
9+
- GDALINST=$HOME/gdalinstall
10+
- GDALBUILD=$HOME/gdalbuild
11+
- PROJINST=$HOME/gdalinstall
12+
- PROJBUILD=$HOME/projbuild
1313

14-
python:
15-
- "3.6"
16-
- "3.7"
14+
15+
# nci verson is GDALVERSION="3.0.2" and python3.7
16+
jobs:
17+
include:
18+
- python: "3.6"
19+
env: GDALVERSION="3.0.2" PROJVERSION="6.1.1"
20+
- python: "3.7"
21+
env: GDALVERSION="3.0.2" PROJVERSION="6.2.1"
22+
- python: "3.7"
23+
env: GDALVERSION="3.0.4" PROJVERSION="6.1.1"
24+
- python: "3.8"
25+
env: GDALVERSION="3.0.4" PROJVERSION="6.1.1"
26+
27+
addons:
28+
apt:
29+
packages:
30+
- libhdf5-serial-dev
31+
- libgdal-dev
32+
- libatlas-dev
33+
- libatlas-base-dev
34+
- gfortran
35+
- openmpi-bin
36+
- libopenmpi-dev
1737

1838

1939
before_install:
20-
- sudo apt-get update
21-
- sudo apt-get -y install gdal-bin
22-
- sudo apt-get -y install libgdal-dev
23-
- sudo apt-get -y install openmpi-bin
24-
- sudo apt-get -y install libopenmpi-dev
25-
- export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/include/gdal
26-
- export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/gdal
27-
- pip install -U pip
28-
- pip install codecov
40+
- python -m pip install -U pip
41+
- python -m pip install wheel
42+
- export PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
43+
- export LD_LIBRARY_PATH=$GDALINST/gdal-$GDALVERSION/lib:$LD_LIBRARY_PATH
44+
- . ./scripts/travis_proj_install.sh
45+
- travis_wait 20 . ./scripts/travis_gdal_install.sh
46+
- export GDAL_DATA=$GDALINST/gdal-$GDALVERSION/share/gdal
47+
- export PROJ_LIB=$GDALINST/gdal-$GDALVERSION/share/proj
48+
2949

3050
install:
31-
- pip install -r requirements-test.txt
32-
- pip install -r requirements-dev.txt
51+
- sed -i '/^GDAL/d' requirements.txt
52+
- pip install -r requirements.txt -r requirements-dev.txt -r requirements-test.txt
53+
- pip install GDAL==$(gdal-config --version)
3354
- python setup.py install
55+
- rm -rf Py_Rate.egg-info # remove the local egg
3456
- export PYRATEPATH=$(pwd)
3557
- export PYTHONPATH=$PYRATEPATH:$PYTHONPATH
3658
- chmod 444 tests/test_data/small_test/tif/geo_070709-070813_unw.tif # makes the file readonly, used in a test
3759

3860
# command to run tests, e.g. python setup.py test
3961
script:
40-
- pip install numpy==1.16.4
41-
- pytest --cov-report term-missing:skip-covered --cov=pyrate tests/
62+
# - python scripts/update_placeholder_paths.py
63+
- mpirun -n 3 pytest tests/test_mpi.py
64+
- pytest --cov-config=.coveragerc --cov-report term-missing:skip-covered --cov=pyrate tests/
65+
4266

4367
after_success:
4468
- codecov
4569

46-
jobs:
47-
include:
48-
- stage: deploy
49-
python: 3.6
50-
script:
51-
- pip install numpy==1.16.4
52-
- cd docs && make html
53-
deploy:
54-
provider: pages
55-
skip-cleanup: true
56-
keep-history: true
57-
verbose: true
58-
on:
59-
branch: master
60-
github-token: $GITHUB_TOKEN
61-
local-dir: docs/_build/html
62-
project_name: PyRate
63-
64-
name: InSAR Team
65-
66-
notifications:
67-
email:
68-
recipients:
69-
- $SHEECE_EMAIL
70-
on_success: never
71-
on_failure: always
70+
71+
deploy:
72+
script:
73+
- pip install numpy==1.16.4
74+
- cd docs && make html
75+
provider: pages
76+
skip-cleanup: true
77+
keep-history: true
78+
verbose: true
79+
on:
80+
branch: master
81+
github-token: $GITHUB_TOKEN
82+
local-dir: docs/_build/html
83+
project_name: PyRate
84+
85+
name: InSAR Team
86+
87+
88+
cache:
89+
directories:
90+
- $GDALINST
91+
- ~/.cache/pip

Dockerfile

Lines changed: 104 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,110 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:16.04
22

3-
ENV DEBIAN_FRONTEND noninteractive
4-
RUN apt-get update -y && apt-get -y install git gdal-bin=2.2.3* libgdal-dev libatlas-base-dev openmpi-bin libopenmpi-dev libnetcdf13
3+
ENV LANG C.UTF-8
4+
ENV LANG=en_AU.UTF-8
5+
ENV WORKON_HOME=$HOME/venvs
6+
ENV GDALINST=$HOME/gdalinstall
7+
ENV GDALBUILD=$HOME/gdalbuild
8+
ENV PROJINST=$HOME/gdalinstall
9+
ENV GDALVERSION="3.0.2"
10+
ENV PROJVERSION="6.1.1"
11+
ENV PROJOPT="--with-proj=$GDALINST/gdal-$GDALVERSION"
12+
ENV PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
13+
ENV LD_LIBRARY_PATH=$GDALINST/gdal-$GDALVERSION/lib:$LD_LIBRARY_PATH
14+
ENV PROJ_LIB=$GDALINST/gdal-$GDALVERSION/share/proj
15+
ENV GDAL_DATA=$GDALINST/gdal-$GDALVERSION/share/gdal
516

6-
ENV C_INCLUDE_PATH=/usr/include/gdal
7-
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
8-
ENV LC_ALL=C.UTF-8
9-
ENV LANG=C.UTF-8
1017

11-
RUN apt install -y python3 python3-dev python3-pip
18+
RUN apt-get update \
19+
&& apt-get install -y build-essential checkinstall libreadline-gplv2-dev \
20+
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \
21+
libbz2-dev openssl curl libffi-dev
22+
23+
RUN mkdir -p $HOME/opt
24+
25+
RUN cd $HOME/opt \
26+
&& curl -O https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz \
27+
&& tar -xzf Python-3.7.7.tgz \
28+
&& cd Python-3.7.7 \
29+
&& ./configure --enable-shared --enable-optimizations --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib" \
30+
&& make altinstall
31+
32+
RUN apt-get install -y build-essential python3-pip \
33+
apt-utils git libgdal-dev libatlas-base-dev openmpi-bin \
34+
libopenmpi-dev gfortran wget libhdf5-serial-dev sqlite3 vim
35+
36+
# update pip
37+
RUN python3.7 -m pip install pip --upgrade
38+
RUN python3.7 -m pip install wheel
1239
RUN pip3 install --upgrade setuptools
1340

41+
42+
RUN mkdir -p $GDALBUILD $GDALINST $PROJBUILD $PROJINST
43+
44+
ENV GDALOPTS=" --with-geos \
45+
--with-expat \
46+
--without-libtool \
47+
--with-libz=internal \
48+
--with-libtiff=internal \
49+
--with-geotiff=internal \
50+
--without-gif \
51+
--without-pg \
52+
--without-grass \
53+
--without-libgrass \
54+
--without-cfitsio \
55+
--without-pcraster \
56+
--with-netcdf \
57+
--with-png=internal \
58+
--with-jpeg=internal \
59+
--without-gif \
60+
--without-ogdi \
61+
--without-fme \
62+
--without-hdf4 \
63+
--with-hdf5 \
64+
--without-jasper \
65+
--without-ecw \
66+
--without-kakadu \
67+
--without-mrsid \
68+
--without-jp2mrsid \
69+
--without-mysql \
70+
--without-ingres \
71+
--without-xerces \
72+
--without-odbc \
73+
--with-curl \
74+
--without-sqlite3 \
75+
--without-idb \
76+
--without-sde \
77+
--without-perl \
78+
--without-python"
79+
80+
RUN cd $PROJBUILD && wget -q https://download.osgeo.org/proj/proj-$PROJVERSION.tar.gz \
81+
&& tar -xzf proj-$PROJVERSION.tar.gz \
82+
&& cd proj-$PROJVERSION \
83+
&& ./configure --prefix=$PROJINST/gdal-$GDALVERSION \
84+
&& make -s -j 2 \
85+
&& make install
86+
87+
RUN cd $GDALBUILD \
88+
&& wget -q http://download.osgeo.org/gdal/$GDALVERSION/gdal-$GDALVERSION.tar.gz \
89+
&& tar -xzf gdal-$GDALVERSION.tar.gz
90+
91+
RUN cd $GDALBUILD/gdal-$GDALVERSION \
92+
&& ./configure --prefix=$GDALINST/gdal-$GDALVERSION $GDALOPTS $PROJOPT
93+
94+
RUN cd $GDALBUILD/gdal-$GDALVERSION && make
95+
96+
RUN cd $GDALBUILD/gdal-$GDALVERSION && make install
97+
98+
RUN pip install virtualenv virtualenvwrapper
99+
ENV VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.7
100+
14101
ADD . / PyRate/
15-
RUN cd PyRate && sed -i 's/GDAL//g' requirements.txt
16-
RUN cd PyRate && pip3 install -r requirements.txt
17-
RUN pip3 install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
18-
RUN cd PyRate && pip3 install -r requirements-dev.txt
19-
RUN cd PyRate && python3 setup.py install
102+
SHELL ["/bin/bash", "-c"]
103+
RUN source /usr/local/bin/virtualenvwrapper.sh \
104+
&& mkvirtualenv -p python3.7 pyrate \
105+
&& cd PyRate \
106+
&& sed -i '/^GDAL/d' requirements.txt \
107+
&& workon pyrate \
108+
&& pip install -r requirements.txt -r requirements-dev.txt -r requirements-test.txt \
109+
&& pip install GDAL==$(gdal-config --version) \
110+
&& python setup.py install

0 commit comments

Comments
 (0)