Commit 762fe0ea authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'enhancement/improve_polygonizer' into 'master'

Speed up polygonizer, drop Python 2.7 and update requirements.

See merge request !29
parents 72c4c7c6 230affdc
Pipeline #22786 failed with stages
in 23 minutes and 46 seconds
*.tif filter=lfs diff=lfs merge=lfs -text
*.bsq filter=lfs diff=lfs merge=lfs -text
......@@ -63,3 +63,23 @@ target/
# PyCharm
.idea/
# ignored docs files
/docs/modules.rst
/docs/py_tools_ds.compatibility.python.rst
/docs/py_tools_ds.compatibility.rst
/docs/py_tools_ds.compression.rst
/docs/py_tools_ds.convenience.rst
/docs/py_tools_ds.db_tools.rst
/docs/py_tools_ds.dtypes.rst
/docs/py_tools_ds.environment.rst
/docs/py_tools_ds.geo.raster.rst
/docs/py_tools_ds.geo.rst
/docs/py_tools_ds.geo.vector.rst
/docs/py_tools_ds.io.raster.rst
/docs/py_tools_ds.io.rst
/docs/py_tools_ds.io.vector.rst
/docs/py_tools_ds.numeric.rst
/docs/py_tools_ds.processing.rst
/docs/py_tools_ds.rst
/docs/py_tools_ds.web.rst
......@@ -20,7 +20,6 @@ test_py_tools_ds:
stage: test
script:
- source /root/miniconda3/bin/activate ci_env
- pip install packaging # TODO remove when CI runner is rebuilt
- make nosetests
- make docs
artifacts:
......@@ -69,7 +68,7 @@ test_py_tools_ds_install:
# - conda config --set channel_priority strict # otherwise gdal or libgdal may be installed from defaults channel
# resolve some requirements with conda
- conda install --yes -q -c conda-forge numpy gdal 'pyproj>=2.1.0' shapely geopandas
- conda install --yes -q -c conda-forge numpy gdal 'pyproj>=2.5.0' shapely geopandas
# run installer
- python setup.py install
......
......@@ -101,7 +101,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
3. The pull request should work for Python 3.6, 3.7, 3.8. 3.9, and for PyPy. Check
https://travis-ci.org/danschef/py_tools_ds/pull_requests
and make sure that the tests pass for all supported Python versions.
......
......@@ -2,6 +2,19 @@
History
=======
0.17.0 (2021-05-07)
--------------------
* Added test and test data for geo.raster.conversion.raster2polygon().
* Replaced skimage downsampling by GDAL variant.
* Removed scikit-image dependency.
* Dropped Python 2.7 support due to end-of-life status.
* Dropped compatibility module since this was Python 2.7 specific.
* Dropped requirements six and packaging.
* Added some docs/.rst files to .gitignore.
* Updated minimal version of pyproj to 2.5.0.
0.16.9 (2021-05-07)
-------------------
......
......@@ -42,7 +42,6 @@ to resolve the following dependencies before the pip installer is run:
* geopandas
* numpy
* pyproj >=2.1.0
* scikit-image
* shapely
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
# -*- coding: utf-8 -*-
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
# (project grant code: 01 IS 14 010 A-C).
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__author__ = 'Daniel Scheffler'
# -*- coding: utf-8 -*-
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
# (project grant code: 01 IS 14 010 A-C).
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__author__ = 'Daniel Scheffler'
# -*- coding: utf-8 -*-
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
# (project grant code: 01 IS 14 010 A-C).
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__author__ = "Daniel Scheffler"
class TimeoutError(OSError):
"""Timeout expired."""
class FileNotFoundError(OSError):
"""File not found."""
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......@@ -27,7 +27,6 @@ import sqlite3
import os
from typing import Union # noqa F401 # flake8 issue
import csv
from six import PY3
def data_DB_updater(gms_obj_dict, path_db):
......@@ -112,7 +111,7 @@ def SQL_DB_to_csv(path_db):
cursor = connection.cursor()
cursor.execute("SELECT * FROM processed_data")
with open(os.path.join(os.path.dirname(path_db), 'data_DB.csv'), 'w' if PY3 else 'wb') as csvfile:
with open(os.path.join(os.path.dirname(path_db), 'data_DB.csv'), 'w') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerow([i[0] for i in cursor.description])
csvwriter.writerows(cursor)
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
......@@ -2,7 +2,7 @@
# py_tools_ds
#
# Copyright (C) 2019 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
# Copyright (C) 2016-2021 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
#
# This software was developed within the context of the GeoMultiSens project funded
# by the German Federal Ministry of Education and Research
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment