Skip to content

Commit

Permalink
included DeprecationWarning for 0.1.8 Version
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaelicke committed Jul 24, 2018
1 parent 76f07d4 commit 3a1b68a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
21 changes: 21 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ Info: scikit-gstat needs Python >= 3.5!
:target: https://codecov.io/gh/mmaelicke/scikit-gstat
:alt: Codecov


Deprecation Warning
-------------------
This version of of scikit-gstat is deprecated. However,
the current state of this module is, without this warning,
conserved in the branch version-0.1.8 on GitHub, but will no
longer be maintained.

On the dev branch, the Variogram class is completely rewritten
and will also change the used slightly. It will soon be merged
into the master branch, as soon as it is stable. Sorry for any
inconvenience.

You can distable this Warning by setting the ignore_deprecation
attribute to True:

>>> V =Variogram(c, v, ignore_deprecation=True)


Description
-----------
At current state, this module offers a scipy-styled `Variogram` class for performing geostatistical analysis.
This class can be used to derive variograms. Key benefits are a number of semivariance estimators and theoretical
variogram functions. The module is planned to be hold in the manner of scikit modules and be based upon `numpy` and
Expand Down
21 changes: 20 additions & 1 deletion skgstat/Variogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Variogram(object):
def __init__(self, coordinates=None, values=None, dm_func=nd_dist, bm_func=binify_even_width,
estimator=matheron, model=spherical, dm=None, bm=None, normalize=True, fit_method='lm',
pec_punish=1.0, is_directional=False, azimuth=0, tolerance=45.0, use_nugget=False, maxlag=None,
N=None, verbose=False, harmonize=False):
N=None, verbose=False, harmonize=False,
ignore_deprecation=False):
"""
:param coordinates: numpy array or list with the coordinates of the sample as tuples
Expand All @@ -58,6 +59,24 @@ def __init__(self, coordinates=None, values=None, dm_func=nd_dist, bm_func=binif
:param verbose:
:param harmonize: bool, if True, the experimental variogram will be harmonized.
"""
if not ignore_deprecation:
raise DeprecationWarning("""
Deprecation Warning
-------------------
This version of of scikit-gstat is deprecated. However,
the current state of this module is, without this warning,
conserved in the branch version-0.1.8 on GitHub, but will no
longer be maintained.
On the dev branch, the Variogram class is completely rewritten
and will also change the used slightly. It will soon be merged
into the master branch, as soon as it is stable. Sorry for any
inconvenience.
You can distable this Warning by setting the ignore_deprecation
attribute to True:
>>> V =Variogram(c, v, ignore_deprecation=True)
""")

# Set coordinates and values
self._X = list(coordinates)
Expand Down

0 comments on commit 3a1b68a

Please sign in to comment.