Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
36ccd9e
update ignored
MuellerSeb Mar 25, 2020
39f7097
CI, Build and DOC updates (#142)
MuellerSeb Mar 27, 2020
5c63a64
blacken the code base
MuellerSeb Mar 27, 2020
93e4e9a
concatenate strings after blackening
MuellerSeb Mar 27, 2020
2c54ca5
formatting: rerun black v19.10b0
MuellerSeb Mar 27, 2020
f4cbfa2
blacken tests
MuellerSeb Mar 27, 2020
d09eccc
examples: keep format in kriging_1D.py
MuellerSeb Mar 27, 2020
51f7bbb
add coveralls and gstools to test reqs
MuellerSeb Mar 27, 2020
0014462
travis: add black-check stage; update coverage stage
MuellerSeb Mar 27, 2020
ea576c2
compat: set iid=False in GridSearchCV by default; iid will be depreca…
MuellerSeb Mar 27, 2020
4e4af11
tests: tackle warnings in testing
MuellerSeb Mar 27, 2020
c9ccb05
Merge pull request #144 from GeoStat-Framework/black
MuellerSeb Mar 27, 2020
40877bc
req: sklearn>=0.19
MuellerSeb Mar 28, 2020
736e417
travis: no shallow cloning
MuellerSeb Mar 28, 2020
1ca45d3
Changelog: add info about v1.5
MuellerSeb Mar 28, 2020
e3600c1
docs: gstools example reqs
MuellerSeb Mar 28, 2020
544b1d4
update tests: fix gstools import; remove os import
MuellerSeb Mar 28, 2020
bac9d65
Add zenodo meta file.
MuellerSeb Apr 3, 2020
5f69765
Readme: update badges
MuellerSeb Apr 3, 2020
18b5797
Readme: reorder badges
MuellerSeb Apr 3, 2020
c588d71
Tests: since test was written pre sklearn-v0.22, use the old gamma co…
MuellerSeb Apr 3, 2020
9f1eae1
Docs: add Zenodo link th RTD
MuellerSeb Apr 4, 2020
4a974fd
Changelog: add release date
MuellerSeb Apr 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CI, Build and DOC updates (#142)
* tests on top-level; run against installed version

* make matplotlib optional

* add req files

* add cov file

* update travis

* update dependencies

* add scipy to build_wheel deps

* MacOS ssl fix attempt

* test: skip erroneous drift test (on win)

* update setup to use scm; demand cython

* setup: readme type rst

* update doc reqs

* rename doc->docs

* restructure doc

* adopt geostat doc style pt 1

* setup update docs path

* drop py2 support; __doc__ update

* add logo

* resize log (rst images not rendered correctly on GH)

* ignore auto-generated version file

* eliminate some doc errors

* tackle logo issue

* build doc against installed again

* travis: install wheel for cibuildwheel on linux

* travis: update packages

* travis: update wheel

* remove py2 rfs

* auditwheel bug needs to be fixed by manylinux

* bigger logo

* cok: use scipy blas and lapack directly

* remove lapack module; use scipy instead

* dont use raw in Readme

* tests: skip edk test only on windows

* DOC: update use of recommonmark [skip-ci]
  • Loading branch information
MuellerSeb authored Mar 27, 2020
commit 39f70971d5e8459e9cd21acd98e349e65906b64a
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[run]
source = pykrige
omit = *docs*, *examples*, *tests*

[report]
exclude_lines =
pragma: no cover
if __name__ == '__main__':
def __repr__
def __str__
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ tags

# own stuff
info/
pykrige/_version.py

# Cython generated C code
*.c
Expand Down
142 changes: 96 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,99 @@
language: python
sudo: required
services:
- xvfb
matrix:
include:
- python: "3.6"
env: DEPS="numpy scipy cython nose matplotlib scikit-learn gstools"
- python: "3.5"
env: DEPS="numpy scipy=0.18 cython nose matplotlib scikit-learn=0.18.1"
- python: "2.7"
env: DEPS="numpy=1.10.4 scipy=0.17 cython nose matplotlib scikit-learn=0.17.1"

# setup adapted from https://github.com/soft-matter/trackpy/blob/master/.travis.yml
python: 3.8

# setuptools-scm needs all tags in order to obtain a proper version
# git:
# depth: false

env:
global:
- TWINE_USERNAME=geostatframework
- CIBW_BEFORE_BUILD="pip install numpy==1.17.3 scipy==1.3.2 cython==0.29.14 setuptools"
- CIBW_TEST_REQUIRES="pytest scikit-learn"
- CIBW_TEST_COMMAND="pytest -v {project}/tests"

before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda update --yes conda
- conda info -a
- conda config --add channels conda-forge

install:
- conda create -q -n krige-env -y $DEPS pip pytest-cov pytest python=${TRAVIS_PYTHON_VERSION}
- source activate krige-env
- which pip
- pip install coveralls
- pip install -e .

before_script:
- "export DISPLAY=:99.0"

# command to run tests
- |
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
choco install python --version 3.8.0
export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
ln -s /c/Python38/python.exe /c/Python38/python3.exe
fi

script:
- source activate krige-env
- pytest -sv ./pykrige/ --cov=pykrige
- |
# run examples
# scikit-learn needed by the regression kriging example
# conda install -y scikit-learn gstools
set -x
for f in examples/*.py; do
python $f 2>&1 | tee -a ~/log.txt
done
if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi

#after_success:
# coveralls
- python3 -m pip install cibuildwheel==1.3.0
- python3 -m cibuildwheel --output-dir dist

after_success:
- |
if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then
python3 -m pip install twine
python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
if [[ $TRAVIS_TAG ]]; then python3 -m twine upload --verbose --skip-existing dist/*; fi
fi

notifications:
email:
recipients:
- [email protected]

jobs:
include:
- name: "sdist and coverage"
services: docker
script:
- python3 -m pip install -U setuptools pytest-cov coveralls scikit-learn
- python3 -m pip install -U numpy==1.17.3 cython==0.29.14
- python3 -m pip install -r requirements.txt
- python3 setup.py sdist -d dist
- python3 setup.py build_ext --inplace
- python3 -m pytest --cov pykrige --cov-report term-missing -v tests/
- python3 -m coveralls

- name: "Linux py35"
services: docker
env: CIBW_BUILD="cp35-*"
- name: "Linux py36"
services: docker
env: CIBW_BUILD="cp36-*"
- name: "Linux py37"
services: docker
env: CIBW_BUILD="cp37-*"
- name: "Linux py38"
services: docker
env: CIBW_BUILD="cp38-*"

- name: "MacOS py35"
os: osx
language: shell
env: CIBW_BUILD="cp35-*"
- name: "MacOS py36"
os: osx
language: shell
env: CIBW_BUILD="cp36-*"
- name: "MacOS py37"
os: osx
language: shell
env: CIBW_BUILD="cp37-*"
- name: "MacOS py38"
os: osx
language: shell
env: CIBW_BUILD="cp38-*"

- name: "Win py35"
os: windows
language: shell
env: CIBW_BUILD="cp35-*"
- name: "Win py36"
os: windows
language: shell
env: CIBW_BUILD="cp36-*"
- name: "Win py37"
os: windows
language: shell
env: CIBW_BUILD="cp37-*"
- name: "Win py38"
os: windows
language: shell
env: CIBW_BUILD="cp38-*"
81 changes: 49 additions & 32 deletions doc/release_notes.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,65 @@
# Release notes
Changelog
=========

### Version 1.4.1

Version 1.4.1
-------------
*January 13, 2019*

#### New features
* Added method to obtain variogram model points. PR[#94](https://github.com/bsmurphy/PyKrige/pull/94) by [Daniel Mejía Raigosa](https://github.com/Daniel-M)
**New features**

#### Bug fixes
* Fixed OrdinaryKriging readme example. PR[#107](https://github.com/bsmurphy/PyKrige/pull/107) by [Harry Matchette-Downes](https://github.com/harrymd)
* Fixed kriging matrix not being calculated correctly for geographic coordinates. PR[99](https://github.com/bsmurphy/PyKrige/pull/99) by [Mike Rilee](https://github.com/michaelleerilee)
* Added method to obtain variogram model points. PR[#94](https://github.com/GeoStat-Framework/PyKrige/pull/94) by [Daniel Mejía Raigosa](https://github.com/Daniel-M)

**Bug fixes**

* Fixed OrdinaryKriging readme example. PR[#107](https://github.com/GeoStat-Framework/PyKrige/pull/107) by [Harry Matchette-Downes](https://github.com/harrymd)
* Fixed kriging matrix not being calculated correctly for geographic coordinates. PR[99](https://github.com/GeoStat-Framework/PyKrige/pull/99) by [Mike Rilee](https://github.com/michaelleerilee)

### Version 1.4.0
*April 24, 2018*

#### New features
Version 1.4.0
-------------
*April 24, 2018*

* Regression kriging algotithm. PR [#27](https://github.com/bsmurphy/PyKrige/pull/27) by [Sudipta Basaks](https://github.com/basaks).
* Support for spherical coordinates. PR [#23](https://github.com/bsmurphy/PyKrige/pull/23) by [Malte Ziebarth](https://github.com/mjziebarth)
* Kriging parameter tuning with scikit-learn. PR [#24](https://github.com/bsmurphy/PyKrige/pull/24) by [Sudipta Basaks](https://github.com/basaks).
* Variogram model parameters can be specified using a list or a dict. Allows for directly feeding in the partial sill rather than the full sill. PR [#47](https://github.com/bsmurphy/PyKrige/pull/47) by [Benjamin Murphy](https://github.com/bsmurphy).
**New features**

#### Enhancements
* Regression kriging algotithm. PR [#27](https://github.com/GeoStat-Framework/PyKrige/pull/27) by [Sudipta Basaks](https://github.com/basaks).
* Support for spherical coordinates. PR [#23](https://github.com/GeoStat-Framework/PyKrige/pull/23) by [Malte Ziebarth](https://github.com/mjziebarth)
* Kriging parameter tuning with scikit-learn. PR [#24](https://github.com/GeoStat-Framework/PyKrige/pull/24) by [Sudipta Basaks](https://github.com/basaks).
* Variogram model parameters can be specified using a list or a dict. Allows for directly feeding in the partial sill rather than the full sill. PR [#47](https://github.com/GeoStat-Framework/PyKrige/pull/47) by [Benjamin Murphy](https://github.com/GeoStat-Framework).

* Improved memory usage in variogram calculations. PR [#42](https://github.com/bsmurphy/PyKrige/pull/42) by [Sudipta Basaks](https://github.com/basaks).
* Added benchmark scripts. PR [#36](https://github.com/bsmurphy/PyKrige/pull/36) by [Roman Yurchak](https://github.com/rth)
* Added an extensive example using the meusegrids dataset. PR [#28](https://github.com/bsmurphy/PyKrige/pull/28) by [kvanlombeek](https://github.com/kvanlombeek).
**Enhancements**

#### Bug fixes
* Improved memory usage in variogram calculations. PR [#42](https://github.com/GeoStat-Framework/PyKrige/pull/42) by [Sudipta Basaks](https://github.com/basaks).
* Added benchmark scripts. PR [#36](https://github.com/GeoStat-Framework/PyKrige/pull/36) by [Roman Yurchak](https://github.com/rth)
* Added an extensive example using the meusegrids dataset. PR [#28](https://github.com/GeoStat-Framework/PyKrige/pull/28) by [kvanlombeek](https://github.com/kvanlombeek).

* Statistics calculations in 3D kriging. PR [#45](https://github.com/bsmurphy/PyKrige/pull/45) by [Will Chang](https://github.com/whdc).
* Automatic variogram estimation robustified. PR [#47](https://github.com/bsmurphy/PyKrige/pull/47) by [Benjamin Murphy](https://github.com/bsmurphy).
**Bug fixes**

* Statistics calculations in 3D kriging. PR [#45](https://github.com/GeoStat-Framework/PyKrige/pull/45) by [Will Chang](https://github.com/whdc).
* Automatic variogram estimation robustified. PR [#47](https://github.com/GeoStat-Framework/PyKrige/pull/47) by [Benjamin Murphy](https://github.com/GeoStat-Framework).


### Version 1.3.1
Version 1.3.1
-------------
*December 10, 2016*

* More robust setup for building Cython extensions


### Version 1.3.0
Version 1.3.0
-------------
*October 23, 2015*

* Added support for Python 3.
* Updated the setup script to handle problems with trying to build the Cython extensions. If the appropriate compiler hasn't been installed on Windows, then the extensions won't work (see [this discussion of using Cython extensions on Windows] for how to deal with this problem). The setup script now attempts to build the Cython extensions and automatically falls back to pure Python if the build fails. **NOTE that the Cython extensions currently are not set up to work in Python 3** (see [discussion in issue #10]), so they are not built when installing with Python 3. This will be changed in the future.

[closed issue #2]: https://github.com/bsmurphy/PyKrige/issues/2
[this discussion of using Cython extensions on Windows]: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
[discussion in issue #10]: https://github.com/bsmurphy/PyKrige/issues/10
* [closed issue #2]: https://github.com/GeoStat-Framework/PyKrige/issues/2
* [this discussion of using Cython extensions on Windows]: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
* [discussion in issue #10]: https://github.com/GeoStat-Framework/PyKrige/issues/10


### Version 1.2.0
Version 1.2.0
-------------
*August 1, 2015*

* Updated the execution portion of each class to streamline processing and reduce redundancy in the code.
Expand All @@ -60,7 +70,8 @@
* Added support for three-dimensional universal kriging. The previous three-dimensional kriging class has been renamed OrdinaryKriging3D within module ok3d, and the new class is called UniversalKriging3D within module uk3d. See `UniversalKriging3D.__doc__` for usage information. A regional linear drift ('regional_linear') is the only code-internal drift that is currently supported, but the 'specified' and 'functional' generic drift capabilities are also implemented here (see above). The regional linear drift is applied in all three spatial dimensions.


### Version 1.1.0
Version 1.1.0
-------------
*May 25, 2015*

* Added support for two different approaches to solving the entire kriging problem. One approach solves for the specified grid or set of points in a single vectorized operation; this method is default. The other approach loops through the specified points and solves the kriging system at each point. In both of these techniques, the kriging matrix is set up and inverted only once. In the vectorized approach, the rest of the kriging system (i.e., the RHS matrix) is set up as a single large array, and the whole system is solved with a single call to `numpy.dot()`. This approach is faster, but it can consume a lot of RAM for large datasets and/or large grids. In the looping approach, the rest of the kriging system (the RHS matrix) is set up at each point, and the kriging system at that point is solved with a call to `numpy.dot()`. This approach is slower, but it does not take as much memory. The approach can be specified by using the `backend` kwarg in the `execute()` method: `'vectorized'` (default) for the vectorized approach, `'loop'` for the looping approach. Thanks to Roman Yurchak for these changes and optimizations.
Expand All @@ -69,13 +80,16 @@
* Added support for 3D kriging. This is now available as class `Krige3D` in `pykrige.k3d`. The usage is essentially the same as with the two-dimensional kriging classes, except for a few extra arguments that must be passed during instantiation and when calling `Krige3D.execute()`. See `Krige3D.__doc__` for more information.


### Version 1.0.3
Version 1.0.3
-------------
*February 15, 2015*

* Fixed a problem with the tests that are performed to see if the kriging system is to be solved at a data point. (Tests are completed in order to determine whether to force the kriging solution to converge to the true data value.)
* Changed setup script.

### Version 1.0

Version 1.0
-----------
*January 25, 2015*

* Changed license to New BSD.
Expand All @@ -87,14 +101,17 @@
* Fixed slight problem with `read_asc_grid()` function in `kriging_tools`. Also made some code improvements to both the `write_asc_grid()` and `read_asc_grid()` functions in `kriging_tools`.


### Version 0.2.0
Version 0.2.0
-------------
*November 23, 2014*

* Consolidated backbone functions into a single module in order to reduce redundancy in the code. `OrdinaryKriging` and `UniversalKriging` classes now import and call the `core` module for the standard functions.
* Fixed a few glaring mistakes in the code.
* Added more documentation.

### Version 0.1.2

Version 0.1.2
-------------
*October 27, 2014*

* First complete release.
File renamed without changes.
21 changes: 5 additions & 16 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
include LICENSE.txt
include README.md
include CHANGELOG.md
include setup.cfg
include MANIFEST.in
include setup.py
recursive-include pykrige *.py
recursive-include pykrige *.pyx
recursive-include pykrige *.pxd
include pykrige/tests/test_data/test_data.txt
include pykrige/tests/test_data/test1_answer.asc
include pykrige/tests/test_data/test1_settings.txt
include pykrige/tests/test_data/test2_answer.asc
include pykrige/tests/test_data/test2_settings.txt
include pykrige/tests/test_data/test3_answer.asc
include pykrige/tests/test_data/test3_dem.asc
include pykrige/tests/test_data/test3_settings.txt
include pykrige/tests/test_data/test3d_answer.txt
include pykrige/tests/test_data/test3d_data.txt
include setup.cfg
recursive-include pykrige *.py *.pyx *.pxd
recursive-include tests *.py *.txt *.asc
include LICENSE
34 changes: 18 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
PyKrige
=======

Kriging Toolkit for Python

.. image:: https://img.shields.io/pypi/v/pykrige.svg
:target: https://pypi.python.org/pypi/pykrige

.. image:: https://anaconda.org/conda-forge/pykrige/badges/version.svg
:target: https://github.com/conda-forge/pykrige-feedstock

.. image:: https://badge.fury.io/py/PyKrige.svg
:target: https://badge.fury.io/py/PyKrige
.. image:: https://img.shields.io/conda/vn/conda-forge/pykrige.svg
:target: https://anaconda.org/conda-forge/pykrige
.. image:: https://readthedocs.org/projects/pykrige/badge/?version=latest
:target: http://pykrige.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
:target: http://pykrige.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://travis-ci.com/GeoStat-Framework/PyKrige.svg?branch=master
:target: https://travis-ci.com/GeoStat-Framework/PyKrige

.. image:: https://travis-ci.org/bsmurphy/PyKrige.svg?branch=master
:target: https://travis-ci.org/bsmurphy/PyKrige

.. image:: https://ci.appveyor.com/api/projects/status/github/bsmurphy/PyKrige?branch=master&svg=true
:target: https://ci.appveyor.com/project/bsmurphy/pykrige
.. figure:: https://github.com/GeoStat-Framework/GeoStat-Framework.github.io/raw/master/docs/source/pics/PyKrige_250.png
:align: center
:alt: PyKrige
:figclass: align-center


Kriging Toolkit for Python.

Purpose
^^^^^^^

The code supports 2D and 3D ordinary and universal kriging. Standard variogram models
(linear, power, spherical, gaussian, exponential) are built in, but custom variogram models can also be used.
Expand All @@ -36,14 +38,14 @@ See the documentation at `http://pykrige.readthedocs.io/ <http://pykrige.readthe
Installation
^^^^^^^^^^^^

PyKrige requires Python 2.7 or 3.5+ as well as numpy, scipy and matplotlib. It can be installed from PyPi with,
PyKrige requires Python 3.5+ as well as numpy, scipy. It can be installed from PyPi with,

.. code:: bash

pip install pykrige

scikit-learn is an optional dependency needed for parameter tuning and regression kriging.

matplotlib is an optional dependency needed for plotting.

If you use conda, PyKrige can be installed from the `conda-forge` channel with,

Expand Down
Loading