[Git][debian-gis-team/python-geopandas][master] 5 commits: New upstream version 0.5.1

Bas Couwenberg gitlab at salsa.debian.org
Fri Jul 12 05:50:19 BST 2019



Bas Couwenberg pushed to branch master at Debian GIS Project / python-geopandas


Commits:
4cbcbc07 by Bas Couwenberg at 2019-07-12T04:22:36Z
New upstream version 0.5.1
- - - - -
4d81cba6 by Bas Couwenberg at 2019-07-12T04:23:01Z
Update upstream source from tag 'upstream/0.5.1'

Update to upstream version '0.5.1'
with Debian dir 07bbe0bef5c98298cb69e2945d98919a9020ebd6
- - - - -
0f795bbe by Bas Couwenberg at 2019-07-12T04:23:42Z
New upstream release.

- - - - -
35f6e3e8 by Bas Couwenberg at 2019-07-12T04:24:42Z
Update copyright years for Geopandas developers.

- - - - -
dda5f02c by Bas Couwenberg at 2019-07-12T04:25:34Z
Set distribution to unstable.

- - - - -


10 changed files:

- .travis.yml
- CHANGELOG.md
- appveyor.yml
- debian/changelog
- debian/copyright
- doc/source/conf.py
- geopandas/_version.py
- geopandas/plotting.py
- geopandas/tests/test_plotting.py
- geopandas/tests/test_types.py


Changes:

=====================================
.travis.yml
=====================================
@@ -26,7 +26,7 @@ install:
   - bash miniconda.sh -b -p $HOME/miniconda
   - export PATH="$HOME/miniconda/bin:$PATH"
   - conda config --set always_yes yes --set changeps1 no
-  - conda update conda
+  - conda install conda=4.6
   - conda info
 
   # Install dependencies


=====================================
CHANGELOG.md
=====================================
@@ -1,8 +1,13 @@
 Changes
 =======
 
+Version 0.5.1 (July 11, 2019)
+------------------------------
+
+- Compatibility with latest mapclassify version 2.1.0 (#1025).
+
 Version 0.5.0 (April 25, 2019)
----------------------------------
+------------------------------
 
 Improvements:
 


=====================================
appveyor.yml
=====================================
@@ -11,9 +11,11 @@ environment:
   matrix:
     - PYTHON_VERSION: "2.7"
       MINICONDA: C:\Miniconda-x64
+      ENV_FILE: "ci/travis/27-latest-defaults.yaml"
 
     - PYTHON_VERSION: "3.7"
       MINICONDA: C:\Miniconda37-x64
+      ENV_FILE: "ci/travis/37-latest-conda-forge.yaml"
 
 # all our python builds have to happen in tests_script...
 build: false
@@ -31,12 +33,11 @@ install:
   # set up environment
   - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
   - conda config --set always_yes yes --set show_channel_urls true --set changeps1 no
-  - conda update -q conda
-  - conda config --add channels conda-forge
+  - conda install conda=4.6
   - conda info -a
-  - "conda create --quiet --name test-environment python=%PYTHON_VERSION% pandas --file requirements.txt --file requirements.test.txt"
+  - conda env create --file="${ENV_FILE}"
 
 test_script:
-  - activate test-environment
+  - activate test
   - conda list
   - pytest geopandas -v


=====================================
debian/changelog
=====================================
@@ -1,8 +1,11 @@
-python-geopandas (0.5.0-2) UNRELEASED; urgency=medium
+python-geopandas (0.5.1-1) unstable; urgency=medium
 
+  * Team upload.
+  * New upstream release.
   * Bump Standards-Version to 4.4.0, no changes.
+  * Update copyright years for Geopandas developers.
 
- -- Bas Couwenberg <sebastic at debian.org>  Wed, 10 Jul 2019 19:06:35 +0200
+ -- Bas Couwenberg <sebastic at debian.org>  Fri, 12 Jul 2019 06:24:43 +0200
 
 python-geopandas (0.5.0-1) unstable; urgency=medium
 


=====================================
debian/copyright
=====================================
@@ -3,7 +3,7 @@ Upstream-Name: GeoPandas
 Source: https://github.com/geopandas/geopandas
 
 Files: *
-Copyright: 2013-2016, Geopandas developers
+Copyright: 2013-2019, Geopandas developers
 License: BSD-3-Clause
 
 Files: versioneer.py


=====================================
doc/source/conf.py
=====================================
@@ -79,7 +79,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'GeoPandas'
-copyright = u'2013–2018, GeoPandas developers'
+copyright = u'2013–2019, GeoPandas developers'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the


=====================================
geopandas/_version.py
=====================================
@@ -23,8 +23,8 @@ def get_keywords():
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (HEAD -> master, tag: v0.5.0)"
-    git_full = "6eb7a0fa9828cda6d6a97007e0908776fb569446"
+    git_refnames = " (tag: v0.5.1, 0.5.x)"
+    git_full = "4a4ede8bf7ec27586621f615cad69efd060551f0"
     keywords = {"refnames": git_refnames, "full": git_full}
     return keywords
 


=====================================
geopandas/plotting.py
=====================================
@@ -352,13 +352,13 @@ def plot_dataframe(df, column=None, cmap=None, color=None, ax=None, cax=None,
         Plot a legend. Ignored if no `column` is given, or if `color` is given.
     scheme : str (default None)
         Name of a choropleth classification scheme (requires mapclassify).
-        A mapclassify.Map_Classifier object will be used
+        A mapclassify.MapClassifier object will be used
         under the hood. Supported are all schemes provided by mapclassify (e.g.
-        'Box_Plot', 'Equal_Interval', 'Fisher_Jenks', 'Fisher_Jenks_Sampled',
-        'HeadTail_Breaks', 'Jenks_Caspall', 'Jenks_Caspall_Forced',
-        'Jenks_Caspall_Sampled', 'Max_P_Classifier', 'Maximum_Breaks',
-        'Natural_Breaks', 'Quantiles', 'Percentiles', 'Std_Mean',
-        'User_Defined'). Arguments can be passed in classification_kwds.
+        'BoxPlot', 'EqualInterval', 'FisherJenks', 'FisherJenksSampled',
+        'HeadTailBreaks', 'JenksCaspall', 'JenksCaspallForced',
+        'JenksCaspallSampled', 'MaxP', 'MaximumBreaks',
+        'NaturalBreaks', 'Quantiles', 'Percentiles', 'StdMean',
+        'UserDefined'). Arguments can be passed in classification_kwds.
     k : int (default 5)
         Number of classes (ignored if scheme is None)
     vmin : None or float (default None)
@@ -543,11 +543,11 @@ def _mapclassify_choro(values, scheme, **classification_kwds):
         Series to be plotted
     scheme : str
         One of mapclassify classification schemes
-        Options are Box_Plot, Equal_Interval, Fisher_Jenks,
-        Fisher_Jenks_Sampled, HeadTail_Breaks, Jenks_Caspall,
-        Jenks_Caspall_Forced, Jenks_Caspall_Sampled, Max_P_Classifier,
-        Maximum_Breaks, Natural_Breaks, Quantiles, Percentiles, Std_Mean,
-        User_Defined
+        Options are BoxPlot, EqualInterval, FisherJenks,
+        FisherJenksSampled, HeadTailBreaks, JenksCaspall,
+        JenksCaspallForced, JenksCaspallSampled, MaxP,
+        MaximumBreaks, NaturalBreaks, Quantiles, Percentiles, StdMean,
+        UserDefined
 
     **classification_kwds : dict
         Keyword arguments for classification scheme
@@ -574,19 +574,51 @@ def _mapclassify_choro(values, scheme, **classification_kwds):
                                               classifier)
 
     scheme = scheme.lower()
-    if scheme not in schemes:
-        raise ValueError("Invalid scheme. Scheme must be in the"
-                         " set: %r" % schemes.keys())
+
+    # mapclassify < 2.1 cleaned up the scheme names (removing underscores)
+    # trying both to keep compatibility with older versions and provide
+    # compatibility with newer versions of mapclassify
+    oldnew = {
+        'Box_Plot': 'BoxPlot',
+        'Equal_Interval': 'EqualInterval',
+        'Fisher_Jenks': 'FisherJenks',
+        'Fisher_Jenks_Sampled': 'FisherJenksSampled',
+        'HeadTail_Breaks': 'HeadTailBreaks',
+        'Jenks_Caspall': 'JenksCaspall',
+        'Jenks_Caspall_Forced': 'JenksCaspallForced',
+        'Jenks_Caspall_Sampled': 'JenksCaspallSampled',
+        'Max_P_Plassifier': 'MaxP',
+        'Maximum_Breaks': 'MaximumBreaks',
+        'Natural_Breaks': 'NaturalBreaks',
+        'Std_Mean': 'StdMean',
+        'User_Defined': 'UserDefined'
+    }
+    scheme_names_mapping = {}
+    scheme_names_mapping.update(
+        {old.lower(): new.lower() for old, new in oldnew.items()})
+    scheme_names_mapping.update(
+        {new.lower(): old.lower() for old, new in oldnew.items()})
+
+    try:
+        scheme_class = schemes[scheme]
+    except KeyError:
+        scheme = scheme_names_mapping.get(scheme, scheme)
+        try:
+            scheme_class = schemes[scheme]
+        except KeyError:
+            raise ValueError("Invalid scheme. Scheme must be in the"
+                            " set: %r" % schemes.keys())
+
     if classification_kwds['k'] is not None:
         try:
             from inspect import getfullargspec as getspec
         except ImportError:
             from inspect import getargspec as getspec
-        spec = getspec(schemes[scheme].__init__)
+        spec = getspec(scheme_class.__init__)
         if 'k' not in spec.args:
             del classification_kwds['k']
     try:
-        binning = schemes[scheme](values, **classification_kwds)
+        binning = scheme_class(values, **classification_kwds)
     except TypeError:
         raise TypeError("Invalid keyword argument for %r " % scheme)
     return binning


=====================================
geopandas/tests/test_plotting.py
=====================================
@@ -425,6 +425,11 @@ class TestMapclassifyPlotting:
         expected = [u'-10.00 - -3.41', u'-3.41 - 3.30', u'3.30 - 10.00']
         assert labels == expected
 
+    @pytest.mark.parametrize('scheme', ['FISHER_JENKS', 'FISHERJENKS'])
+    def test_scheme_name_compat(self, scheme):
+        ax = self.df.plot(column='NEGATIVES', scheme=scheme, k=3, legend=True)
+        assert len(ax.get_legend().get_texts()) == 3
+
     def test_classification_kwds(self):
         ax = self.df.plot(column='pop_est', scheme='percentiles', k=3,
                           classification_kwds={'pct': [50, 100]}, cmap='OrRd',


=====================================
geopandas/tests/test_types.py
=====================================
@@ -43,12 +43,6 @@ class TestSeries:
     def test_take(self):
         assert type(self.pts.take(list(range(0, self.N, 2)))) is GeoSeries
 
-    def test_select(self):
-        with warnings.catch_warnings(record=True) as _:
-            # depending on pandas version this raises FutureWarning ->
-            # suppress it
-            assert type(self.pts.select(lambda x: x % 2 == 0)) is GeoSeries
-
     def test_groupby(self):
         for f, s in self.pts.groupby(lambda x: x % 2):
             assert type(s) is GeoSeries



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geopandas/compare/95efe3b36dc4d05f64804bc11f38185494576c27...dda5f02ce0942b93b05e6a1c5837047600c19f2c

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geopandas/compare/95efe3b36dc4d05f64804bc11f38185494576c27...dda5f02ce0942b93b05e6a1c5837047600c19f2c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190712/30e2edd2/attachment-0001.html>


More information about the Pkg-grass-devel mailing list