geoarray 0.17.0__tar.gz → 0.17.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {geoarray-0.17.0 → geoarray-0.17.1}/.gitlab-ci.yml +13 -10
  2. {geoarray-0.17.0 → geoarray-0.17.1}/HISTORY.rst +7 -0
  3. {geoarray-0.17.0 → geoarray-0.17.1}/Makefile +4 -4
  4. {geoarray-0.17.0/geoarray.egg-info → geoarray-0.17.1}/PKG-INFO +56 -7
  5. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/baseclasses.py +10 -6
  6. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/version.py +2 -2
  7. {geoarray-0.17.0 → geoarray-0.17.1/geoarray.egg-info}/PKG-INFO +56 -7
  8. {geoarray-0.17.0 → geoarray-0.17.1}/setup.py +1 -0
  9. {geoarray-0.17.0 → geoarray-0.17.1}/.coveragerc +0 -0
  10. {geoarray-0.17.0 → geoarray-0.17.1}/.editorconfig +0 -0
  11. {geoarray-0.17.0 → geoarray-0.17.1}/.gitattributes +0 -0
  12. {geoarray-0.17.0 → geoarray-0.17.1}/.github/ISSUE_TEMPLATE.md +0 -0
  13. {geoarray-0.17.0 → geoarray-0.17.1}/.gitignore +0 -0
  14. {geoarray-0.17.0 → geoarray-0.17.1}/AUTHORS.rst +0 -0
  15. {geoarray-0.17.0 → geoarray-0.17.1}/CONTRIBUTING.rst +0 -0
  16. {geoarray-0.17.0 → geoarray-0.17.1}/LICENSE +0 -0
  17. {geoarray-0.17.0 → geoarray-0.17.1}/MANIFEST.in +0 -0
  18. {geoarray-0.17.0 → geoarray-0.17.1}/README.rst +0 -0
  19. {geoarray-0.17.0 → geoarray-0.17.1}/docs/Makefile +0 -0
  20. {geoarray-0.17.0 → geoarray-0.17.1}/docs/_build/html/_static/file.png +0 -0
  21. {geoarray-0.17.0 → geoarray-0.17.1}/docs/_build/html/_static/minus.png +0 -0
  22. {geoarray-0.17.0 → geoarray-0.17.1}/docs/_build/html/_static/plus.png +0 -0
  23. {geoarray-0.17.0 → geoarray-0.17.1}/docs/authors.rst +0 -0
  24. {geoarray-0.17.0 → geoarray-0.17.1}/docs/conf.py +0 -0
  25. {geoarray-0.17.0 → geoarray-0.17.1}/docs/contributing.rst +0 -0
  26. {geoarray-0.17.0 → geoarray-0.17.1}/docs/history.rst +0 -0
  27. {geoarray-0.17.0 → geoarray-0.17.1}/docs/index.rst +0 -0
  28. {geoarray-0.17.0 → geoarray-0.17.1}/docs/installation.rst +0 -0
  29. {geoarray-0.17.0 → geoarray-0.17.1}/docs/make.bat +0 -0
  30. {geoarray-0.17.0 → geoarray-0.17.1}/docs/readme.rst +0 -0
  31. {geoarray-0.17.0 → geoarray-0.17.1}/docs/usage.rst +0 -0
  32. {geoarray-0.17.0 → geoarray-0.17.1}/examples/notebooks/features_and_usage.ipynb +0 -0
  33. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/__init__.py +0 -0
  34. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/masks.py +0 -0
  35. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/metadata.py +0 -0
  36. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray/subsetting.py +0 -0
  37. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray.egg-info/SOURCES.txt +0 -0
  38. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray.egg-info/dependency_links.txt +0 -0
  39. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray.egg-info/not-zip-safe +0 -0
  40. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray.egg-info/requires.txt +0 -0
  41. {geoarray-0.17.0 → geoarray-0.17.1}/geoarray.egg-info/top_level.txt +0 -0
  42. {geoarray-0.17.0 → geoarray-0.17.1}/setup.cfg +0 -0
  43. {geoarray-0.17.0 → geoarray-0.17.1}/tox.ini +0 -0
@@ -12,10 +12,10 @@ test_geoarray:
12
12
  stage: test
13
13
  coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
14
14
  script:
15
- - source /root/mambaforge/bin/activate ci_env
15
+ - source activate ci_env
16
16
 
17
17
  # update py_tools_ds
18
- - pip install -U py_tools_ds -q
18
+ - mamba update py_tools_ds
19
19
 
20
20
  # run tests
21
21
  - make pytest
@@ -39,7 +39,7 @@ test_geoarray:
39
39
  test_styles:
40
40
  stage: test
41
41
  script:
42
- - source /root/mambaforge/bin/activate ci_env
42
+ - source activate ci_env
43
43
  - make lint
44
44
  artifacts:
45
45
  paths:
@@ -52,7 +52,7 @@ test_styles:
52
52
  test_urls:
53
53
  stage: test
54
54
  script:
55
- - source /root/mambaforge/bin/activate ci_env
55
+ - source activate ci_env
56
56
  - pip install -U urlchecker
57
57
  - make urlcheck
58
58
  when: always
@@ -61,12 +61,11 @@ test_urls:
61
61
  test_geoarray_install:
62
62
  stage: test
63
63
  script:
64
- - source /root/mambaforge/bin/activate
65
- - mamba update -n base -c conda-forge --all
64
+ - mamba update -n base mamba conda
66
65
 
67
66
  # create geoarray environment from environment_geoarray.yml
68
67
  - mamba env create --name geoarray_test -f tests/CI_docker/context/environment_geoarray.yml
69
- - conda activate geoarray_test
68
+ - source activate geoarray_test
70
69
 
71
70
  # install geoarray
72
71
  - pip install -e .
@@ -77,6 +76,9 @@ test_geoarray_install:
77
76
  # test importability
78
77
  - python -c "import geoarray; print(geoarray)"
79
78
  - python -c "from geoarray import GeoArray"
79
+
80
+ # check if dependencies are properly installed
81
+ - pip check || exit
80
82
  only:
81
83
  - main
82
84
 
@@ -120,9 +122,10 @@ deploy_pypi:
120
122
  dependencies:
121
123
  - test_geoarray
122
124
  script:
123
- - source /root/mambaforge/bin/activate ci_env
124
- - pip install -U twine
125
- - python setup.py sdist
125
+ - source activate ci_env
126
+ - pip install -U twine build
127
+ - python -m build --sdist
128
+ - twine check dist/*
126
129
  - twine upload dist/* # requires creds as environment variables
127
130
  only:
128
131
  - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
@@ -2,6 +2,13 @@
2
2
  History
3
3
  =======
4
4
 
5
+ 0.17.1 (03.11.2023)
6
+ -------------------
7
+
8
+ * !44: Updated CI to use Ubuntu-based runner. Revised environment_geoarray.yml.
9
+ * !45: Added parameter 'draw_gridlines' to GeoArray.show_map() to allow users to control it by their own.
10
+
11
+
5
12
  0.17.0 (15.06.2023)
6
13
  -------------------
7
14
 
@@ -108,14 +108,14 @@ servedocs: docs ## compile the docs watching for changes
108
108
  release: dist ## package and upload a release
109
109
  twine upload dist/*
110
110
 
111
- dist: clean ## builds source and wheel package
112
- python setup.py sdist
113
- python setup.py bdist_wheel
111
+ dist: clean ## builds source package (requires twine and build)
112
+ python -m build --sdist
113
+ twine check dist/*
114
114
  ls -l dist
115
115
 
116
116
  install: clean ## install the package to the active Python's site-packages
117
117
  pip install -r requirements.txt
118
- python setup.py install
118
+ pip install .
119
119
 
120
120
  gitlab_CI_docker: ## Build a docker image for CI use within gitlab
121
121
  cd ./tests/CI_docker/; bash ./build_testsuite_image.sh
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geoarray
3
- Version: 0.17.0
3
+ Version: 0.17.1
4
4
  Summary: Fast Python interface for geodata - either on disk or in memory.
5
5
  Home-page: https://git.gfz-potsdam.de/danschef/geoarray
6
6
  Author: Daniel Scheffler
7
7
  Author-email: danschef@gfz-potsdam.de
8
8
  License: Apache-2.0
9
9
  Keywords: geoarray,geoprocessing,gdal,numpy
10
- Platform: UNKNOWN
11
10
  Classifier: Development Status :: 4 - Beta
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: License :: OSI Approved :: Apache Software License
@@ -17,13 +16,65 @@ Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Requires-Python: >=3.8
20
- Provides-Extra: interactive_plotting
19
+ Description-Content-Type: text/x-rst
20
+ License-File: LICENSE
21
+ License-File: AUTHORS.rst
22
+ Requires-Dist: cartopy>=0.20
23
+ Requires-Dist: dill
24
+ Requires-Dist: gdal>=2.1.0
25
+ Requires-Dist: matplotlib
26
+ Requires-Dist: numpy
27
+ Requires-Dist: pandas
28
+ Requires-Dist: py_tools_ds>=0.19.0
29
+ Requires-Dist: scikit-image
30
+ Requires-Dist: shapely
31
+ Provides-Extra: interactive-plotting
32
+ Requires-Dist: folium; extra == "interactive-plotting"
33
+ Requires-Dist: geojson; extra == "interactive-plotting"
34
+ Requires-Dist: holoviews; extra == "interactive-plotting"
21
35
  Provides-Extra: doc
36
+ Requires-Dist: sphinx-argparse; extra == "doc"
37
+ Requires-Dist: sphinx_rtd_theme; extra == "doc"
22
38
  Provides-Extra: test
39
+ Requires-Dist: cartopy>=0.20; extra == "test"
40
+ Requires-Dist: dill; extra == "test"
41
+ Requires-Dist: gdal>=2.1.0; extra == "test"
42
+ Requires-Dist: matplotlib; extra == "test"
43
+ Requires-Dist: numpy; extra == "test"
44
+ Requires-Dist: pandas; extra == "test"
45
+ Requires-Dist: py_tools_ds>=0.19.0; extra == "test"
46
+ Requires-Dist: scikit-image; extra == "test"
47
+ Requires-Dist: shapely; extra == "test"
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
50
+ Requires-Dist: pytest-reporter-html1; extra == "test"
51
+ Requires-Dist: urlchecker; extra == "test"
52
+ Requires-Dist: parameterized; extra == "test"
23
53
  Provides-Extra: lint
54
+ Requires-Dist: flake8; extra == "lint"
55
+ Requires-Dist: pycodestyle; extra == "lint"
56
+ Requires-Dist: pydocstyle; extra == "lint"
24
57
  Provides-Extra: dev
25
- License-File: LICENSE
26
- License-File: AUTHORS.rst
58
+ Requires-Dist: setuptools-git; extra == "dev"
59
+ Requires-Dist: cartopy>=0.20; extra == "dev"
60
+ Requires-Dist: dill; extra == "dev"
61
+ Requires-Dist: gdal>=2.1.0; extra == "dev"
62
+ Requires-Dist: matplotlib; extra == "dev"
63
+ Requires-Dist: numpy; extra == "dev"
64
+ Requires-Dist: pandas; extra == "dev"
65
+ Requires-Dist: py_tools_ds>=0.19.0; extra == "dev"
66
+ Requires-Dist: scikit-image; extra == "dev"
67
+ Requires-Dist: shapely; extra == "dev"
68
+ Requires-Dist: pytest; extra == "dev"
69
+ Requires-Dist: pytest-cov; extra == "dev"
70
+ Requires-Dist: pytest-reporter-html1; extra == "dev"
71
+ Requires-Dist: urlchecker; extra == "dev"
72
+ Requires-Dist: parameterized; extra == "dev"
73
+ Requires-Dist: sphinx-argparse; extra == "dev"
74
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
75
+ Requires-Dist: flake8; extra == "dev"
76
+ Requires-Dist: pycodestyle; extra == "dev"
77
+ Requires-Dist: pydocstyle; extra == "dev"
27
78
 
28
79
  ========
29
80
  geoarray
@@ -143,5 +194,3 @@ This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypack
143
194
  .. _here: https://git.gfz-potsdam.de/danschef/geoarray/-/blob/main/examples/notebooks/features_and_usage.ipynb
144
195
  .. _pip: https://pip.pypa.io
145
196
  .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
146
-
147
-
@@ -29,6 +29,7 @@ import warnings
29
29
  from pkgutil import find_loader
30
30
  from collections import OrderedDict
31
31
  from copy import copy, deepcopy
32
+ from numbers import Number
32
33
  from typing import Union, Optional, Sequence, List, Tuple, Iterable, TYPE_CHECKING # noqa F401
33
34
 
34
35
  import numpy as np
@@ -666,7 +667,7 @@ class GeoArray(object):
666
667
  getitem_params = [given] if isinstance(given, slice) else given
667
668
  return self.from_path(self.filePath, getitem_params)
668
669
 
669
- def __setitem__(self, idx: Union[int, list, slice], array2set: np.ndarray):
670
+ def __setitem__(self, idx: Union[int, list, slice], array2set: Union[np.ndarray, Number]):
670
671
  """Overwrite the pixel values of GeoArray.arr with the given array.
671
672
 
672
673
  :param idx: the index position to overwrite
@@ -1417,6 +1418,7 @@ class GeoArray(object):
1417
1418
  pmin: float = 2,
1418
1419
  pmax: float = 98,
1419
1420
  cmap: Union[str, 'Colormap'] = None,
1421
+ draw_gridlines: bool = True,
1420
1422
  nodataVal: float = None,
1421
1423
  res_factor: float = None,
1422
1424
  return_map: bool = False
@@ -1436,6 +1438,7 @@ class GeoArray(object):
1436
1438
  :param pmin: percentage to be used for excluding the darkest pixels from stretching (default: 2)
1437
1439
  :param pmax: percentage to be used for excluding the brightest pixels from stretching (default: 98)
1438
1440
  :param cmap:
1441
+ :param draw_gridlines: whether to draw gridlines into the map (default: True)
1439
1442
  :param nodataVal:
1440
1443
  :param res_factor: <float> resolution factor for downsampling of the image to be plotted in order to save
1441
1444
  plotting time and memory (default=None -> downsampling is performed to 1000x1000)
@@ -1493,8 +1496,9 @@ class GeoArray(object):
1493
1496
  extent=list(gA2plot.box.boundsMap)
1494
1497
  )
1495
1498
 
1496
- # show grid lines
1497
- ax.gridlines(draw_labels=True, linewidth=2, color='gray', alpha=0.5, linestyle='--') # cartopy>=0.18.0 only
1499
+ # draw grid lines
1500
+ if draw_gridlines:
1501
+ ax.gridlines(draw_labels=True, linewidth=2, color='gray', alpha=0.5, linestyle='--') # cartopy>=0.18.0 only
1498
1502
 
1499
1503
  if return_map:
1500
1504
  return fig, ax
@@ -1811,7 +1815,7 @@ class GeoArray(object):
1811
1815
  return_GeoArray: bool = True,
1812
1816
  reset_bandnames: bool = False
1813
1817
  ) -> Union['GeoArray', Tuple[np.ndarray, tuple, str]]:
1814
- """Return a new GeoArray instance representing a subset of the initial one wit respect to given array position.
1818
+ """Return a new GeoArray instance representing a subset of the initial one with respect to given array position.
1815
1819
 
1816
1820
  :param xslice: a slice providing the X-position for the subset in the form slice(xstart, xend, xstep)
1817
1821
  :param yslice: a slice providing the Y-position for the subset in the form slice(ystart, yend, ystep)
@@ -1901,7 +1905,7 @@ class GeoArray(object):
1901
1905
 
1902
1906
  def reproject_to_new_grid(self,
1903
1907
  prototype: 'GeoArray' = None,
1904
- tgt_prj: str = None,
1908
+ tgt_prj: Union[str, int] = None,
1905
1909
  tgt_xygrid: Sequence = None,
1906
1910
  rspAlg: Union[str, int] = 'cubic',
1907
1911
  CPUs: int = None
@@ -1909,7 +1913,7 @@ class GeoArray(object):
1909
1913
  """Reproject all array-like attributes to a given target grid.
1910
1914
 
1911
1915
  :param prototype: an instance of GeoArray to be used as pixel grid reference
1912
- :param tgt_prj: WKT string of the projection
1916
+ :param tgt_prj: GDAL projection as WKT string or EPSG code ('epsg:1234' or <EPSG_int>)
1913
1917
  :param tgt_xygrid: target XY grid, e.g. [[xmin,xmax], [ymax, ymin]] for the UL corner
1914
1918
  :param rspAlg: GDAL compatible resampling algorithm code
1915
1919
  :param CPUs: number of CPUs to use (default: None -> use all available CPUs)
@@ -22,5 +22,5 @@
22
22
  # limitations under the License.
23
23
 
24
24
 
25
- __version__ = '0.17.0'
26
- __versionalias__ = '20230615.01'
25
+ __version__ = '0.17.1'
26
+ __versionalias__ = '20231103.01'
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geoarray
3
- Version: 0.17.0
3
+ Version: 0.17.1
4
4
  Summary: Fast Python interface for geodata - either on disk or in memory.
5
5
  Home-page: https://git.gfz-potsdam.de/danschef/geoarray
6
6
  Author: Daniel Scheffler
7
7
  Author-email: danschef@gfz-potsdam.de
8
8
  License: Apache-2.0
9
9
  Keywords: geoarray,geoprocessing,gdal,numpy
10
- Platform: UNKNOWN
11
10
  Classifier: Development Status :: 4 - Beta
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: License :: OSI Approved :: Apache Software License
@@ -17,13 +16,65 @@ Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Requires-Python: >=3.8
20
- Provides-Extra: interactive_plotting
19
+ Description-Content-Type: text/x-rst
20
+ License-File: LICENSE
21
+ License-File: AUTHORS.rst
22
+ Requires-Dist: cartopy>=0.20
23
+ Requires-Dist: dill
24
+ Requires-Dist: gdal>=2.1.0
25
+ Requires-Dist: matplotlib
26
+ Requires-Dist: numpy
27
+ Requires-Dist: pandas
28
+ Requires-Dist: py_tools_ds>=0.19.0
29
+ Requires-Dist: scikit-image
30
+ Requires-Dist: shapely
31
+ Provides-Extra: interactive-plotting
32
+ Requires-Dist: folium; extra == "interactive-plotting"
33
+ Requires-Dist: geojson; extra == "interactive-plotting"
34
+ Requires-Dist: holoviews; extra == "interactive-plotting"
21
35
  Provides-Extra: doc
36
+ Requires-Dist: sphinx-argparse; extra == "doc"
37
+ Requires-Dist: sphinx_rtd_theme; extra == "doc"
22
38
  Provides-Extra: test
39
+ Requires-Dist: cartopy>=0.20; extra == "test"
40
+ Requires-Dist: dill; extra == "test"
41
+ Requires-Dist: gdal>=2.1.0; extra == "test"
42
+ Requires-Dist: matplotlib; extra == "test"
43
+ Requires-Dist: numpy; extra == "test"
44
+ Requires-Dist: pandas; extra == "test"
45
+ Requires-Dist: py_tools_ds>=0.19.0; extra == "test"
46
+ Requires-Dist: scikit-image; extra == "test"
47
+ Requires-Dist: shapely; extra == "test"
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
50
+ Requires-Dist: pytest-reporter-html1; extra == "test"
51
+ Requires-Dist: urlchecker; extra == "test"
52
+ Requires-Dist: parameterized; extra == "test"
23
53
  Provides-Extra: lint
54
+ Requires-Dist: flake8; extra == "lint"
55
+ Requires-Dist: pycodestyle; extra == "lint"
56
+ Requires-Dist: pydocstyle; extra == "lint"
24
57
  Provides-Extra: dev
25
- License-File: LICENSE
26
- License-File: AUTHORS.rst
58
+ Requires-Dist: setuptools-git; extra == "dev"
59
+ Requires-Dist: cartopy>=0.20; extra == "dev"
60
+ Requires-Dist: dill; extra == "dev"
61
+ Requires-Dist: gdal>=2.1.0; extra == "dev"
62
+ Requires-Dist: matplotlib; extra == "dev"
63
+ Requires-Dist: numpy; extra == "dev"
64
+ Requires-Dist: pandas; extra == "dev"
65
+ Requires-Dist: py_tools_ds>=0.19.0; extra == "dev"
66
+ Requires-Dist: scikit-image; extra == "dev"
67
+ Requires-Dist: shapely; extra == "dev"
68
+ Requires-Dist: pytest; extra == "dev"
69
+ Requires-Dist: pytest-cov; extra == "dev"
70
+ Requires-Dist: pytest-reporter-html1; extra == "dev"
71
+ Requires-Dist: urlchecker; extra == "dev"
72
+ Requires-Dist: parameterized; extra == "dev"
73
+ Requires-Dist: sphinx-argparse; extra == "dev"
74
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
75
+ Requires-Dist: flake8; extra == "dev"
76
+ Requires-Dist: pycodestyle; extra == "dev"
77
+ Requires-Dist: pydocstyle; extra == "dev"
27
78
 
28
79
  ========
29
80
  geoarray
@@ -143,5 +194,3 @@ This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypack
143
194
  .. _here: https://git.gfz-potsdam.de/danschef/geoarray/-/blob/main/examples/notebooks/features_and_usage.ipynb
144
195
  .. _pip: https://pip.pypa.io
145
196
  .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
146
-
147
-
@@ -70,6 +70,7 @@ setup(
70
70
  version=version['__version__'],
71
71
  description="Fast Python interface for geodata - either on disk or in memory.",
72
72
  long_description=readme,
73
+ long_description_content_type='text/x-rst',
73
74
  author="Daniel Scheffler",
74
75
  author_email='danschef@gfz-potsdam.de',
75
76
  url='https://git.gfz-potsdam.de/danschef/geoarray',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes