Commit 415485fd authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'master' into feature/implement_operators

# Conflicts:
#	geoarray/baseclasses.py
parents 8829a837 bf03bd02
Pipeline #19577 failed with stage
in 1 minute and 34 seconds
......@@ -2,12 +2,6 @@ before_script:
- git lfs pull
# Advise GitLab that these environment vars should be loaded from the Variables config.
variables:
PYPI_USER: SECURE
PYPI_PASSWORD: SECURE
stages:
- test
- deploy
......@@ -17,12 +11,13 @@ stages:
test_geoarray:
stage: test
script:
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- export LD_LIBRARY_PATH=/root/anaconda3/lib:$LD_LIBRARY_PATH # /root <- directory needed later
# update in-house dependencies
- pip install py_tools_ds>=0.9.0
- source /root/miniconda3/bin/activate ci_env
# update py_tools_ds
- pip install -U py_tools_ds -q
- pip install parameterized -q # TODO remove as soon as CI runner is rebuilt
# run tests
- make nosetests
- make docs
......@@ -38,10 +33,7 @@ test_geoarray:
test_styles:
stage: test
script:
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- pip install "pycodestyle>=2.0.0,!=2.4.0" # TODO remove as soon as docker runner is recreated
- source /root/miniconda3/bin/activate ci_env
- make lint
artifacts:
paths:
......@@ -51,17 +43,37 @@ test_styles:
when: always
test_urls:
stage: test
script:
- source /root/miniconda3/bin/activate ci_env
- pip install -U urlchecker
- make urlcheck
when: always
test_geoarray_install:
stage: test
script:
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- conda create -y -q --name geoarray python=3
- source activate geoarray
# resolve some requirements with conda
- conda install --yes -q -c conda-forge numpy scikit-image matplotlib geopandas gdal rasterio pyproj basemap shapely
# update conda and python
- conda update -n base -c conda-forge conda
# - conda update -c conda-forge python
# create test environment
- conda create -y -q -c conda-forge --name geoarray_testinstall python=3
- conda activate geoarray_testinstall
# avoid package incompatibilities due to usage of wrong channels
# - 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 scikit-image matplotlib geopandas gdal pyproj cartopy shapely
# run installer
- python setup.py install
# test if its importable
- cd ..
- pwd
......@@ -83,12 +95,16 @@ pages: # this job must be called 'pages' to advise GitLab to upload content to
- mkdir -p public/doc
- mkdir -p public/coverage
- mkdir -p public/nosetests_reports
# Copy over the docs
- cp -r docs/_build/html/* public/doc/
# Copy over the coverage reports
- cp -r htmlcov/* public/coverage/
# Copy over the nosetests reports
- cp nosetests.* public/nosetests_reports/
# Check if everything is working great
- ls -al public
- ls -al public/doc
......@@ -106,22 +122,12 @@ deploy_pypi:
stage: deploy
dependencies:
- test_geoarray
script: # Configure the PyPI credentials, then push the package, and cleanup the creds.
- source /root/miniconda3/bin/activate
- printf "[distutils]\nindex-servers =\n pypi\n\n" >> ~/.pypirc
- printf "[pypi]\n""repository:"" https://upload.pypi.org/legacy/\n" >> ~/.pypirc
- printf "username= ${PYPI_USER}\n" >> ~/.pypirc
- printf "password= ${PYPI_PASSWORD}\n" >> ~/.pypirc
- python setup.py check sdist upload -r pypi # This will fail if your creds are bad.
- echo "" > ~/.pypirc && rm ~/.pypirc # If the above fails, this won't run.
script:
- source /root/miniconda3/bin/activate ci_env
- pip install -U twine
- python setup.py sdist
- twine upload dist/* # requires creds as environment variables
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- dev
cleanup_pypirc:
stage: cleanup
when: always # this is important; run even if preceding stages failed.
script:
- rm -vf ~/.pypirc # we don't want to leave these around, but GitLab may clean up anyway.
# Config file for automatic testing at travis-ci.org
# This file will be regenerated if you run travis_pypi_setup.py
language: python
python: 3.5
env:
- TOXENV=py35
- TOXENV=py34
- TOXENV=py33
- TOXENV=py27
- TOXENV=py26
- TOXENV=pypy
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox
# command to run tests, e.g. python setup.py test
script: tox -e ${TOXENV}
......@@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~
Report bugs at https://gitext.gfz-potsdam.de/danschef/geoarray/issues.
Report bugs at https://git.gfz-potsdam.de/danschef/geoarray/issues.
If you are reporting a bug, please include:
......@@ -45,7 +45,7 @@ articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at https://gitext.gfz-potsdam.de/danschef/geoarray/issues.
The best way to send feedback is to file an issue at https://git.gfz-potsdam.de/danschef/geoarray/issues.
If you are proposing a feature:
......@@ -62,7 +62,7 @@ Ready to contribute? Here's how to set up `geoarray` for local development.
1. Fork the `geoarray` repo on GitHub.
2. Clone your fork locally::
$ git clone https://gitext.gfz-potsdam.de/danschef/geoarray.git
$ git clone https://git.gfz-potsdam.de/danschef/geoarray.git
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
......
......@@ -2,12 +2,893 @@
History
=======
0.1.0 (2017-03-31)
0.10.9 (2021-02-19)
-------------------
* Revised tests.
* Added parameterized as test requirement.
* Replaced deprecated numpy data types with builtin types.
* Fixed dead link in the docs.
0.10.8 (2021-01-28)
-------------------
* Fixed an issue in GeoArray.show() that caused an invisible plot for some input images.
0.10.7 (2021-01-27)
-------------------
* Fixed a numpy overflow error within GeoArray.show() due to float16 data type.
0.10.6 (2021-01-25)
-------------------
* Added URL checker CI job and fixed all dead URLs.
* Fixed wrong package name in environment_geoarray.yml.
* Moved folium and geojson to optional dependencies. Revised 'extras_require' parameter in setup.py.
* Removed .travis.yml.
0.10.5 (2020-12-08)
-------------------
* Fixed issue #30 (GeoArray.read_pointdata() returns values for coordinates geographically outside of the image.).
* Implemented tests for GeoArray.read_pointdata().
0.10.4 (2020-11-02)
-------------------
* Replaced deprecated osgeo imports.
0.10.3 (2020-10-28)
-------------------
* Fixed issue #29 (Exception: Cannot label gridlines on a _EPSGProjection plot.
Only PlateCarree and Mercator plots are currently supported.)
0.10.2 (2020-10-27)
-------------------
* Removed cartopy pinning and added a warning about the missing grid labels in GeoArray.show() with cartopy<0.18.0.
0.10.2 (2020-10-27)
-------------------
* Added pyepsg to requirements as it is now an optional requirement of cartopy and it is used in geoarray.
0.10.1 (2020-10-27)
-------------------
* Updated the minimal version of cartopy.
0.10.0 (2020-10-19)
-------------------
* Added 'flag' parameter to GeoArray.calc_nodata_mask() + tests.
* Fixed type hints and some issues in test_geoarray.py.
* The geoarray package is now on conda-forge! Updated the installation instructions accordingly.
* Revised environment_geoarray.yml
* Replaced deprecated 'source activate' by 'conda activate'.
0.9.3 (2020-10-12)
------------------
* Package creation.
* Use SPDX license identifier and set all files to GLP3+ to be consistent with license headers in the source files.
* Excluded tests from being installed via 'pip install'.
0.9.2 (2020-10-08)
------------------
* Bugfix for not setting nodata values transparent in GeoArray.show().
* Moved cartopy import from module level to class level.
* Filled HISTORY.rst.
0.9.1 (2020-10-06)
------------------
* Bumped version.
0.9.0 (2020-10-06)
------------------
* Fixed missing comma.
* Merge branch 'enhancement/replace_basemap_with_cartopy' into 'master'
* Added cartopy setup o test_geoarray to make CI work.
* Revised GeoArray.show_map() and replaced basemap by cartopy. Dropped mpld3 requirement. Fixed issue #28.
* Added GeoArray._get_cmap_vmin_vmax() and moved code from .show(), .show_map() and .show_map_utm() there.
0.8.37 (2020-10-02)
-------------------
* Fixed broken pip installation of basemap within setup.py.
0.8.36 (2020-09-30)
-------------------
* Revised previous commit.
* Replaced requirement 'basemap' by ssh link in setup.py to fix exception during 'pip install'.
0.8.35 (2020-09-29)
-------------------
* Basemap is now no longer optional as it is easily installable via conda-forge. Holoviews is now officially optional.
0.8.34 (2020-09-28)
-------------------
* Removed dask frm dependencies as it was only an indirect dependency.
0.8.33 (2020-09-18)
-------------------
* Removed restriction that GeoArray.projection cannot be set if the associated file on disk has another projection.
0.8.32 (2020-08-22)
-------------------
* Updated deprecated HTTP links.
* Avoid to update conda base environment with the defaults channel.
* Added environment update before installing geoarray env.
* Fixed syntax in build_testsuite_image.sh. geoarray_ci.docker now inherits from ci_base_centos:0.1.
* Removed channel 'ioam' for holoviews.
* Updated CI setup files and .gitlab.ci.yml.
0.8.31 (2020-08-21)
-------------------
* Moved matplotlib imports to class method level to avoid static TLS import issues.
* Added Python 3.8 and 3.9 to setup.py classifiers.
0.8.30 (2020-08-21)
-------------------
* Fixed .gitlab-ci.yml
* Updated installation instructions.
* Updated minimal version of geoarray.
* Added tolerance in GeoArray.footprint_poly to avoid wrong return values due to float uncertainties.
* Updated minimal version of py_tools_ds.
0.8.29 (2020-08-17)
-------------------
* Adapted code to latest changes in py_tools_ds.
* Bugfix for not setting nodata values transparent in GeoArray.show().
* Fixed a deprecation warning related to matplotlib colormaps.
* Updated minimal version of py_tools_ds.
0.8.28 (2020-03-19)
-------------------
* Merge branch 'enhancement/speed_up_nodatamask' into 'master'
* The algorithm to compute the nodata mask is now much faster, especially for datasets with many spectral bands.
0.8.27 (2020-01-08)
-------------------
* The geopandas dependency is not needed anymore.
* Updated conda environment.
* Updated minimal version of py_tools_ds.
0.8.26 (2020-01-08)
-------------------
* Disabled Python update in test_geoarray_install.
* Added conda and Python update to test_geoarray_install.
* Removed pyresample from dependencies (not needed anymore).
* Revised dependencies and test_geoarray_install job.
* Fixed broken badge.
* Added downloads badge.
0.8.25 (2019-10-10)
-------------------
* Merge branch 'bugfix/fix_bandname_types' into 'master'
* Fixed mixed types of band names.
0.8.24 (2019-10-10)
-------------------
* Merge branch 'bugfix/fix_band_names' into 'master'
* Fixed band names not properly read (fixed issue #26).
0.8.23 (2019-10-04)
-------------------
* Fixed typing issue.
0.8.22 (2019-08-14)
-------------------
* Replaced deprecated PyPi upload commands by twine.
0.8.21 (2019-07-22)
-------------------
* Merge branch 'enhancement/add_license_texts' into 'master'
* Added license texts.
* Merge branch 'enhancement/allow_lists_in_get_subset' into 'master'
0.8.20 (2019-07-09)
-------------------
* Lists are now allowed in zslice parameter for GeoArray.get_subset().
* Merge branch 'bugfix/fix_ensure_np_shape_consistency_3D_2D' into 'master'
0.8.19 (2019-05-22)
-------------------
* Bugfix.
0.8.18 (2019-05-14)
-------------------
* Bugfix.
* Added ignore_rotation to GeoArray.show().
0.8.17 (2019-05-10)
-------------------
* Merge branch 'bugfix/fix_issue24_and_25' into 'master'
* Fixed issue #24 (TypeError: function takes exactly 1 argument (0 given)).
* Fixed issue #25 (RuntimeError: b'major axis or radius = 0 or not given').
0.8.16 (2019-04-29)
-------------------
* Merge branch 'bugfix/fix_stretching' into 'master'
* Fixed gray value stretching issue in case of rotated ENVI images without inherent nodata value.
0.8.15 (2019-04-29)
-------------------
* Merge branch 'bugfix/fix_rotation_issue23' into 'master'
* Fix.
* Fix for issue #23 (GeoArray.show_map does not respect ENVI rotation in map info if image has less than
1.000.000 pixels per band).
0.8.14 (2019-03-29)
-------------------
* Merge branch 'enhancement/improve_nodata_value_handling' into 'master'
* Fixed linting.
* Nodata values are now properly written to ENVI header files.
0.8.13 (2019-03-29)
-------------------
* Updated requirements.
* Fixed issue #22 (GeoArray[slice, slice, np.integer] returns the full array instead of a single band).
0.8.12 (2019-03-29)
-------------------
* Merge branch 'bugfix/fix_np_integer_indexing' into 'master'
0.8.11 (2019-03-29)
-------------------
* Fixed issue #22 (GeoArray[slice, slice, np.integer] returns the full array instead of a single band).
* Fixed FutureWarning regarding the use of a non-tuple sequence for multidimensional indexing.
0.8.10 (2018-12-15)
-------------------
* Fixed corrupted makefile.
* Fixed AssertionError in case GeoArray is instanced with a file from disk without map information and projection
is set afterwards.
0.8.9 (2018-12-13)
------------------
* Added 'is_map_geo' attribute to GeoArray.
0.8.8 (2018-12-05)
------------------
* Replaced 'importlib.util.find_spec' with 'pkgutil.find_loader' to ensure Python 2.7 compatibility.
* Added some type hints.
0.8.7 (2018-09-17)
------------------
* Bugfix for wrong shape of return value when GeoArray instance is indexed with an instance of np.integer.
* Improved colormap handling within GeoArray.show().
0.8.6 (2018-09-13)
------------------
* Refactored function name and updated docstring.
* Fixed behaviour of GeoArray.__getitem__() unequal to numpy behaviour (caused issue #18).
* Added tests.
0.8.5 (2018-09-11)
------------------
* GeoArray.show() now returns the matplotlib object in non-interactive mode.
0.8.4 (2018-09-11)
------------------
* Fixed deploy_pypi CI job.
* Fixed GeoArray.show_histogram() (issue #17).
0.8.3 (2018-09-11)
------------------
* Added parameter 'ax' to GeoArray.show().
0.8.2 (2018-08-31)
------------------
* Changed behaviour of calc_mask_nodata() recognizing pixels as nodata that contain the nodata value in any band.
* Now they need to contain it in ALL bands.
0.8.1 (2018-08-27)
------------------
* Fixed TypeError within metadata module.
* Try to fix ncurses issue.
* Force libgdal to use conda-forge.
* Docker image now inherits from gms_base_centos:0.2.
* CI setup now updates ci_env environment installed via docker_pyenvs instead of creating an independent environment.
* Fix test_geoarray_install.
* Fix test_geoarray_install.
* Fix test_geoarray_install.
* Fix.
* Fix.
* Fix for CI issue.
* CI Python environment is now separate from base env. Added defaults channels below conda-forge in environment.yml
* Updated README.
* Updated README.
* Updated cell output.
* Updated cell output.
* Updated cell output.
* Updated cell output.
* Removed interactive map from notebook.
* Cleaned up.
* Changed link.
* Revised example notebook.
* Added some readme files.
* Added some readme files.
* Added example notebook.
0.8.0 (2018-08-10)
------------------
* Added tests for test_get_subset_2D.
* Bugfixes. Added tests for get_subset.
* Fix for broken GeoArray.get_subset() in case GeoArray.is_inmem == True.
* Fixed linting.
* GeoArray.get_subset() now properly returns GeoArray instance subsets with all metadata and attributes inherited
from the full GeoArray.
* Added .copy() t make sure metadata.band_meta is really copied.
* Fixed GeoArray.save() for other formats than ENVI.
* Fixed code style issue.
* Fixed metadata setter. Removed deprecated code.
* GDAL_Metadata instances are now subscriptable.
* Bugfix for not updating GeoArray.metadata.bands within GeoArray.get_subset().
* Fixed issue that bandnames are not written to ENVI header by GeoArray.save().
* Bugfixes.
* Enhanced setters, added test data, added tests.
* Band names and description are now correctly saved in ENVI format.
* First implementation of metadata class in GeoArray.
* Added a first prototype of a metadata class.
* Added GDAL cache flushing.
* Added GDAL cache flushing.
* GDAL metadata values are now forced to be strings.
* Updated docker runner build script.
0.7.16 (2018-05-07)
-------------------
* Fixed linting.
* Fixed issue #19 (GeoArray.tiles() fails in case of 2D array).
0.7.15 (2018-04-09)
-------------------
* Fix.
0.7.14 (2018-04-09)
-------------------
* Added version.py.
* Fixed unequal return value of __getitem__ depending on is_inmem.
0.7.13 (2018-03-15)
-------------------
* Fixed wrong copying of bandnames from GeoArray instance within GeoArray.__init__().
0.7.12 (2018-02-22)
-------------------
* Merged branch 'bugfix/issue15' into 'master'.
* Fixed issue #15 (ValueError: 'axis' entry is out of bounds).
0.7.11 (2018-01-17)
-------------------
* Merge branch 'bugfix/fix_GeoArray_save'
* Fixed GeoArray.save()
0.7.10 (2018-01-17)
-------------------
* Fixed GeoArray.save()
0.7.9 (2017-12-11)
------------------
* Fixed GeoArray.get_subset().
0.7.8 (2017-11-30)
------------------
* Improved GeoArray.get_subset().