Skip to content

Commit

Permalink
Merge pull request #59 from wpreimes/develop
Browse files Browse the repository at this point in the history
Allow subsets from non-binary masks
  • Loading branch information
tracyscanlon authored Sep 12, 2019
2 parents 13337ce + e16fc4b commit cef019c
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ docs/_rst/*
docs/_build/*
cover/*
MANIFEST

# ignore local scripts
local_scripts/*
25 changes: 23 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
dist: xenial
language: python
sudo: false
notifications:
email: false
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "2.7"
- "3.5"
- "3.6"
- "3.7"
env:
- PINNED=true # use fixed dependencies
- PINNED=false # use latest dependencies
matrix:
exclude:
- python: "3.7"
env: PINNED=true
install:
# You may want to periodically update this, although the conda update
# conda line below will keep everything up-to-date. We do this
# conditionally because it saves us some downloading if the version is
# the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
pinned_yml=environment_pinned_py2.yml;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
pinned_yml=environment_pinned_py3.yml;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
Expand All @@ -26,10 +36,21 @@ install:
- conda info -a

- conda create -n pygeogrids python=${TRAVIS_PYTHON_VERSION}

- if $PINNED; then
conda env update -f $pinned_yml -n pygeogrids;
else
conda env update -f environment.yml -n pygeogrids;
fi

- source activate pygeogrids
- conda env update -f environment.yml
- python setup.py install

- conda list
- pip list
- which pip
- which python

script:
- python setup.py test
after_success:
Expand Down
26 changes: 10 additions & 16 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ channels:
- conda-forge
- defaults
dependencies:
- gdal=2.1.0
- geos=3.5.0
- geotiff=1.4.1
- hdf4=4.2.12=1
- hdf5=1.8.17=2
- jbig=2.1
- kealib=1.4.6
- libnetcdf=4.4.1
- libgdal=2.1.0
- mkl=11.3.3=0
- netcdf4=1.2.4
- numpy=1.11.0
- proj4=4.9.2
- pyproj=1.9
- pytest=2.9.1
- pykdtree==1.1.1
- gdal=2.4.1
- geos
- proj4
- numpy
- pandas
- netcdf4
- hdf5
- pyproj
- pykdtree
- pytest
113 changes: 113 additions & 0 deletions environment_pinned_py2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: pygeogrids
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1
- atomicwrites=1.3.0
- attrs=19.1.0
- backports=1.0
- boost-cpp=1.70.0
- bzip2=1.0.8
- ca-certificates=2019.6.16
- cairo=1.16.0
- certifi=2019.6.16
- cfitsio=3.470
- cftime=1.0.3.4
- configparser=3.7.3
- contextlib2=0.5.5
- curl=7.65.3
- expat=2.2.5
- fontconfig=2.13.1
- freetype=2.10.0
- freexl=1.0.5
- funcsigs=1.0.2
- gdal=2.4.1
- geos=3.7.2
- geotiff=1.4.3
- gettext=0.19.8.1
- giflib=5.1.7
- glib=2.58.3
- hdf4=4.2.13
- hdf5=1.10.5
- icu=58.2
- importlib_metadata=0.18
- jpeg=9c
- json-c=0.13.1
- kealib=1.4.10
- krb5=1.16.3
- libblas=3.8.0
- libcblas=3.8.0
- libcurl=7.65.3
- libdap4=3.20.2
- libedit=3.1.20170329
- libffi=3.2.1
- libgcc-ng=9.1.0
- libgdal=2.4.1
- libgfortran-ng=7.3.0
- libiconv=1.15
- libkml=1.3.0
- liblapack=3.8.0
- libnetcdf=4.6.2
- libopenblas=0.3.6
- libpng=1.6.37
- libpq=11.4
- libspatialite=4.3.0a
- libssh2=1.8.2
- libstdcxx-ng=9.1.0
- libtiff=4.0.10
- libuuid=2.32.1
- libxcb=1.13
- libxml2=2.9.9
- lz4-c=1.8.3
- more-itertools=5.0.0
- ncurses=6.1
- netcdf4=1.5.1.2
- numpy=1.16.4
- openjpeg=2.3.1
- openssl=1.1.1c
- packaging=19.0
- pandas=0.24.2
- pathlib2=2.3.4
- pcre=8.41
- pip=19.2.1
- pixman=0.38.0
- pluggy=0.12.0
- poppler=0.67.0
- poppler-data=0.4.9
- postgresql=11.4
- proj4=5.2.0
- pthread-stubs=0.4
- py=1.8.0
- pykdtree=1.3.1
- pyparsing=2.4.2
- pyproj=1.9.6
- pytest=4.6.4
- python=2.7.15
- python-dateutil=2.8.0
- pytz=2019.2
- readline=8.0
- scandir=1.10.0
- setuptools=41.0.1
- six=1.12.0
- sqlite=3.29.0
- tk=8.6.9
- tzcode=2019a
- wcwidth=0.1.7
- wheel=0.33.4
- xerces-c=3.2.2
- xorg-kbproto=1.0.7
- xorg-libice=1.0.10
- xorg-libsm=1.2.3
- xorg-libx11=1.6.8
- xorg-libxau=1.0.9
- xorg-libxdmcp=1.1.3
- xorg-libxext=1.3.4
- xorg-libxrender=0.9.10
- xorg-renderproto=0.11.1
- xorg-xextproto=7.3.0
- xorg-xproto=7.0.31
- xz=5.2.4
- zipp=0.5.2
- zlib=1.2.11
- zstd=1.4.0
108 changes: 108 additions & 0 deletions environment_pinned_py3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: pygeogrids
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1
- atomicwrites=1.3.0
- attrs=19.1.0
- boost-cpp=1.70.0
- bzip2=1.0.8
- ca-certificates=2019.6.16
- cairo=1.16.0
- certifi=2019.6.16
- cfitsio=3.470
- cftime=1.0.3.4
- curl=7.65.3
- expat=2.2.5
- fontconfig=2.13.1
- freetype=2.10.0
- freexl=1.0.5
- gdal=2.4.1
- geos=3.7.2
- geotiff=1.4.3
- gettext=0.19.8.1
- giflib=5.1.7
- glib=2.58.3
- hdf4=4.2.13
- hdf5=1.10.5
- icu=58.2
- importlib_metadata=0.18
- jpeg=9c
- json-c=0.13.1
- kealib=1.4.10
- krb5=1.16.3
- libblas=3.8.0
- libcblas=3.8.0
- libcurl=7.65.3
- libdap4=3.20.2
- libedit=3.1.20170329
- libffi=3.2.1
- libgcc-ng=9.1.0
- libgdal=2.4.1
- libgfortran-ng=7.3.0
- libiconv=1.15
- libkml=1.3.0
- liblapack=3.8.0
- libnetcdf=4.6.2
- libopenblas=0.3.6
- libpng=1.6.37
- libpq=11.4
- libspatialite=4.3.0a
- libssh2=1.8.2
- libstdcxx-ng=9.1.0
- libtiff=4.0.10
- libuuid=2.32.1
- libxcb=1.13
- libxml2=2.9.9
- lz4-c=1.8.3
- more-itertools=7.2.0
- ncurses=6.1
- netcdf4=1.5.1.2
- numpy=1.17.0
- openjpeg=2.3.1
- openssl=1.1.1c
- packaging=19.0
- pandas=0.25.0
- pcre=8.41
- pip=19.2.1
- pixman=0.38.0
- pluggy=0.12.0
- poppler=0.67.0
- poppler-data=0.4.9
- postgresql=11.4
- proj4=5.2.0
- pthread-stubs=0.4
- py=1.8.0
- pykdtree=1.3.1
- pyparsing=2.4.2
- pyproj=1.9.6
- pytest=5.0.1
- python=3.6.7
- python-dateutil=2.8.0
- pytz=2019.2
- readline=8.0
- setuptools=41.0.1
- six=1.12.0
- sqlite=3.29.0
- tk=8.6.9
- tzcode=2019a
- wcwidth=0.1.7
- wheel=0.33.4
- xerces-c=3.2.2
- xorg-kbproto=1.0.7
- xorg-libice=1.0.10
- xorg-libsm=1.2.3
- xorg-libx11=1.6.8
- xorg-libxau=1.0.9
- xorg-libxdmcp=1.1.3
- xorg-libxext=1.3.4
- xorg-libxrender=0.9.10
- xorg-renderproto=0.11.1
- xorg-xextproto=7.3.0
- xorg-xproto=7.0.31
- xz=5.2.4
- zipp=0.5.2
- zlib=1.2.11
- zstd=1.4.0

2 changes: 1 addition & 1 deletion pygeogrids/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class BasicGrid(object):
subset : numpy.array, optional
if the active part of the array is only a subset of
all the points then the subset array which is a index
into lon and lat can be given here
into lon and lat can be given here.
setup_kdTree : boolean, optional
if set (default) then the kdTree for nearest neighbour
search will be built on initialization
Expand Down
Loading

0 comments on commit cef019c

Please sign in to comment.