From e722ce53e41aade0f7dc6a27ca17e8b911721262 Mon Sep 17 00:00:00 2001 From: Serge Rey Date: Sat, 21 Dec 2019 11:55:11 -0800 Subject: [PATCH 1/3] REL: update changelog for release. --- CHANGELOG.md | 39 +++++++++++ docsrc/conf.py | 9 ++- tools/gitcount.ipynb | 151 +++++++++++++++++++++++++++---------------- 3 files changed, 139 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c06947a..721a6507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,42 @@ +# Version 2.2.0 (2019-12-21) + +This releases brings new functionality for [formatting of legend classes](https://github.com/sjsrey/geopandas/blob/legendkwds/examples/choro_legends.ipynb). + +We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28. + +## Issues Closed + - 2.2 (#54) + - 2.2 (#53) + - conda-forge UnsatisfiableError on windows and python 3.7 (#52) + - [MAINT] updating supported Python versions in setup.py (#49) + - BUG: RecursiveError in HeadTailBreaks (#46) + - BUG: HeadTailBreaks raise RecursionError (#45) + - BUG: UserDefined accepts only list if max not in bins (#47) + - BUG: avoid deprecation warning in HeadTailBreaks (#44) + - remove docs badge (#42) + - Remove doc badge (#43) + - Docs: moving to project pages on github and off rtd (#41) + - BUG: Fix for downstream breakage in geopandas (#40) + +## Pull Requests + - 2.2 (#54) + - 2.2 (#53) + - [MAINT] updating supported Python versions in setup.py (#49) + - BUG: RecursiveError in HeadTailBreaks (#46) + - BUG: UserDefined accepts only list if max not in bins (#47) + - BUG: avoid deprecation warning in HeadTailBreaks (#44) + - Remove doc badge (#43) + - Docs: moving to project pages on github and off rtd (#41) + - BUG: Fix for downstream breakage in geopandas (#40) + +The following individuals contributed to this release: + + - Serge Rey + - James Gaboardi + - Wei Kang + - Martin Fleischmann + + # Version 2.1.0 (2019-06-26) We closed a total of 36 issues (enhancements and bug fixes) through 16 pull requests, since our last release on 2018-10-28. diff --git a/docsrc/conf.py b/docsrc/conf.py index 1b61d572..1683b7b8 100644 --- a/docsrc/conf.py +++ b/docsrc/conf.py @@ -246,14 +246,17 @@ # Generate the API documentation when building autosummary_generate = True -numpydoc_show_class_members = True -class_members_toctree = True -numpydoc_show_inherited_class_members = True +numpydoc_show_class_members = False numpydoc_use_plots = True # display the source code for Plot directive plot_include_source = True +# automatically document class members +autodoc_default_options = { + 'members': True +} + def setup(app): app.add_stylesheet("pysal-styles.css") diff --git a/tools/gitcount.ipynb b/tools/gitcount.ipynb index 5dc97d5b..d06a91e7 100644 --- a/tools/gitcount.ipynb +++ b/tools/gitcount.ipynb @@ -26,8 +26,8 @@ "outputs": [], "source": [ "package_name = 'mapclassify'\n", - "release_date = '2018-10-28'\n", - "start_date = '2018-08-10'" + "release_date = '2019-12-21'\n", + "start_date = '2019-06-28'" ] }, { @@ -81,7 +81,7 @@ { "data": { "text/plain": [ - "'/Users/weikang/Google Drive (weikang@ucr.edu)/python_repos/pysal-refactor/mapclassify/tools'" + "'/home/jovyan/tools'" ] }, "execution_count": 4, @@ -101,7 +101,7 @@ { "data": { "text/plain": [ - "datetime.datetime(2018, 8, 10, 0, 0)" + "datetime.datetime(2019, 6, 28, 0, 0)" ] }, "execution_count": 5, @@ -155,7 +155,7 @@ { "data": { "text/plain": [ - "15" + "30" ] }, "execution_count": 8, @@ -254,7 +254,7 @@ { "data": { "text/plain": [ - "dict_keys(['Wei Kang', 'Serge Rey'])" + "dict_keys(['Serge Rey', 'James Gaboardi', 'Wei Kang', 'Martin Fleischmann'])" ] }, "execution_count": 14, @@ -434,11 +434,15 @@ { "data": { "text/plain": [ - "['rel: 2.0.1 (#20)',\n", - " 'fix doctests (interactive examples in inline docstrings) (#19)',\n", - " 'complete readthedocs configuration & add Slocum 2009 reference (#17)',\n", - " 'prepping for a doc based release (#15)',\n", - " 'prepare for release 2.0.0 (#13)']" + "['2.2 (#54)',\n", + " '2.2 (#53)',\n", + " '[MAINT] updating supported Python versions in setup.py (#49)',\n", + " 'BUG: RecursiveError in HeadTailBreaks (#46)',\n", + " 'BUG: UserDefined accepts only list if max not in bins (#47)',\n", + " 'BUG: avoid deprecation warning in HeadTailBreaks (#44)',\n", + " 'Remove doc badge (#43)',\n", + " 'Docs: moving to project pages on github and off rtd (#41)',\n", + " 'BUG: Fix for downstream breakage in geopandas (#40)']" ] }, "execution_count": 20, @@ -476,7 +480,7 @@ { "data": { "text/plain": [ - "'We closed a total of 12 issues (enhancements and bug fixes) through 5 pull requests, since our last release on 2018-08-10.'" + "'We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28.'" ] }, "execution_count": 23, @@ -506,7 +510,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "We closed a total of 12 issues (enhancements and bug fixes) through 5 pull requests, since our last release on 2018-08-10.\n", + "We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28.\n", "\n", "## Issues Closed\n", "\n" @@ -539,23 +543,32 @@ "name": "stdout", "output_type": "stream", "text": [ - "We closed a total of 12 issues (enhancements and bug fixes) through 5 pull requests, since our last release on 2018-08-10.\n", + "We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28.\n", "\n", "## Issues Closed\n", - " - gadf and K_classifiers not in __ini__.py (#18)\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - new release on pypi (#10)\n", - " - prepare for release 2.0.0 (#13)\n", + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - conda-forge UnsatisfiableError on windows and python 3.7 (#52)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: HeadTailBreaks raise RecursionError (#45)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - remove docs badge (#42)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n", "\n", "## Pull Requests\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - prepare for release 2.0.0 (#13)\n" + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n" ] } ], @@ -581,8 +594,10 @@ "name": "stdout", "output_type": "stream", "text": [ + " - Serge Rey\n", + " - James Gaboardi\n", " - Wei Kang\n", - " - Serge Rey\n" + " - Martin Fleischmann\n" ] } ], @@ -608,28 +623,39 @@ "name": "stdout", "output_type": "stream", "text": [ - "We closed a total of 12 issues (enhancements and bug fixes) through 5 pull requests, since our last release on 2018-08-10.\n", + "We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28.\n", "\n", "## Issues Closed\n", - " - gadf and K_classifiers not in __ini__.py (#18)\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - new release on pypi (#10)\n", - " - prepare for release 2.0.0 (#13)\n", + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - conda-forge UnsatisfiableError on windows and python 3.7 (#52)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: HeadTailBreaks raise RecursionError (#45)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - remove docs badge (#42)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n", "\n", "## Pull Requests\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - prepare for release 2.0.0 (#13)\n", + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n", "\n", "The following individuals contributed to this release:\n", "\n", + " - Serge Rey\n", + " - James Gaboardi\n", " - Wei Kang\n", - " - Serge Rey\n" + " - Martin Fleischmann\n" ] } ], @@ -657,30 +683,41 @@ "text": [ "# Changes\n", "\n", - "Version 2.0.1 (2018-10-28)\n", + "Version 2.2.0 (2019-12-21)\n", "\n", - "We closed a total of 12 issues (enhancements and bug fixes) through 5 pull requests, since our last release on 2018-08-10.\n", + "We closed a total of 21 issues (enhancements and bug fixes) through 9 pull requests, since our last release on 2019-06-28.\n", "\n", "## Issues Closed\n", - " - gadf and K_classifiers not in __ini__.py (#18)\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - new release on pypi (#10)\n", - " - prepare for release 2.0.0 (#13)\n", + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - conda-forge UnsatisfiableError on windows and python 3.7 (#52)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: HeadTailBreaks raise RecursionError (#45)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - remove docs badge (#42)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n", "\n", "## Pull Requests\n", - " - rel: 2.0.1 (#20)\n", - " - fix doctests (interactive examples in inline docstrings) (#19)\n", - " - complete readthedocs configuration & add Slocum 2009 reference (#17)\n", - " - prepping for a doc based release (#15)\n", - " - prepare for release 2.0.0 (#13)\n", + " - 2.2 (#54)\n", + " - 2.2 (#53)\n", + " - [MAINT] updating supported Python versions in setup.py (#49)\n", + " - BUG: RecursiveError in HeadTailBreaks (#46)\n", + " - BUG: UserDefined accepts only list if max not in bins (#47)\n", + " - BUG: avoid deprecation warning in HeadTailBreaks (#44)\n", + " - Remove doc badge (#43)\n", + " - Docs: moving to project pages on github and off rtd (#41)\n", + " - BUG: Fix for downstream breakage in geopandas (#40)\n", "\n", "The following individuals contributed to this release:\n", "\n", + " - Serge Rey\n", + " - James Gaboardi\n", " - Wei Kang\n", - " - Serge Rey\n" + " - Martin Fleischmann\n" ] } ], @@ -737,7 +774,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.3" } }, "nbformat": 4, From e95b3bf6d5b76149290a124d7dc4e372baeb9693 Mon Sep 17 00:00:00 2001 From: Serge Rey Date: Sat, 21 Dec 2019 12:25:23 -0800 Subject: [PATCH 2/3] DEV: tooling --- Dockerfile | 26 ++++++++++++++++++++++++++ Makefile | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ac900380 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Ubuntu Bionic 18.04 at Jan 26'19 +FROM jupyter/minimal-notebook:87210526f381 + +MAINTAINER Serge Rey + +# https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/Dockerfile +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 + +USER root + +#--- Utilities ---# + +RUN apt-get update \ + && apt-get install -y --no-install-recommends software-properties-common +RUN apt-get install -y libgeos-dev + +ADD install_deps_py.sh $HOME/install_deps_py.sh + +USER root +RUN chmod +x $HOME/install_deps_py.sh +RUN sed -i -e 's/\r$//' $HOME/install_deps_py.sh +RUN ["/bin/bash", "-c", "$HOME/install_deps_py.sh"] +RUN rm /home/jovyan/install_deps_py.sh + +# Switch back to user to avoid accidental container runs as root +USER $NB_UID diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..05b38869 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +GEOPANDAS = /home/serge/Dropbox/g/geopandas +# Linux specific Docker file for mapclassify +IMAGE='sjsrey/mapclassify:2.2' + +container: + docker build -t $(IMAGE) . + +# run a shell for our env +cli: + docker run -it -p 8888:8888 -v ${PWD}:/home/jovyan $(IMAGE) /bin/bash + +dev: + echo ${GEOPANDAS} + docker run -it -p 8888:8888 -e "PYSALDATA=/home/jovyan/.local/pysal_data" -v ${PWD}:/home/jovyan -v ${GEOPANDAS}:/home/jovyan/geopandas $(IMAGE) sh -c "/home/jovyan/develop.sh && /bin/bash" + +term: + echo ${GEOPANDAS} + docker run -it -e "PYSALDATA=/home/jovyan/.local/pysal_data" -v ${PWD}:/home/jovyan -v ${GEOPANDAS}:/home/jovyan/geopandas $(IMAGE) sh -c "/home/jovyan/develop.sh && /bin/bash" From d77dfa6a49a1090abfb409b1ba196380b7de63f6 Mon Sep 17 00:00:00 2001 From: Serge Rey Date: Sat, 21 Dec 2019 12:26:35 -0800 Subject: [PATCH 3/3] DEV: docker helpers --- install_deps_py.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 install_deps_py.sh diff --git a/install_deps_py.sh b/install_deps_py.sh new file mode 100644 index 00000000..6982702c --- /dev/null +++ b/install_deps_py.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +echo "Updating conda....." +/opt/conda/bin/conda update --yes + +echo "Installing conda mapclassify stack....." + +conda config --set always_yes yes --set changeps1 no --set show_channel_urls true +conda config --add channels conda-forge --force +conda config --set channel_priority strict +conda install --quiet --yes \ + 'scikit-learn' \ + 'seaborn' \ + 'libpysal=4.2.0' \ + 'rtree' + +#conda install --channel conda-forge geopandas + +echo "Installing doc dependencies...." +pip install -U sphinx sphinx_gallery sphinxcontrib-bibtex sphinx_bootstrap_theme sphinxcontrib-napoleon + +echo "Installing testing dependencies...." + +conda install -c conda-forge -c defaults --quiet --yes \ + 'nose' \ + 'nose-progressive' \ + 'nose-exclude' \ + 'coverage' \ + 'coveralls' \ + 'pytest' \ + 'pytest-cov' \ + 'pytest-mpl' + +conda install -c conda-forge --quiet --yes descartes