From 1e4c71c6d66fa550ca42d1a39188734e7940c2ce Mon Sep 17 00:00:00 2001 From: Daniel Scheffler Date: Mon, 28 Sep 2020 12:29:12 +0200 Subject: [PATCH] The 'pykrige', 'pyfftw' and 'basemap' requirements are no longer optional since they are easily installable from conda-forge now. Updated requirements and installation instructions. Updated version info. Signed-off-by: Daniel Scheffler --- .gitlab-ci.yml | 2 +- arosics/CoReg.py | 2 +- arosics/version.py | 4 +-- docs/installation.rst | 11 ++----- requirements.txt | 3 ++ setup.py | 32 ++++--------------- .../CI_docker/context/environment_arosics.yml | 2 +- 7 files changed, 16 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09922cf..3e58d67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ test_arosics_install: - source activate arosics_testinstall # resolve some requirements with conda - - conda install --yes -q -c conda-forge numpy gdal scikit-image matplotlib 'pyproj>2.2.0' shapely geopandas pandas + - conda install --yes -q -c conda-forge numpy gdal scikit-image matplotlib 'pyproj>2.2.0' shapely geopandas pandas pykrige pyfftw basemap # run installer - python setup.py install diff --git a/arosics/CoReg.py b/arosics/CoReg.py index f208f2c..9009190 100755 --- a/arosics/CoReg.py +++ b/arosics/CoReg.py @@ -527,7 +527,7 @@ def show_matchWin(self, figsize=(15, 15), interactive=True, after_correction=Non if not hv: raise ImportError( "This method requires the library 'holoviews'. It can be installed for Anaconda with " - "the shell command 'conda install -c ioam holoviews bokeh'.") + "the shell command 'conda install -c conda-forge holoviews bokeh'.") hv.notebook_extension('matplotlib') hv.Store.add_style_opts(hv.Image, ['vmin', 'vmax']) diff --git a/arosics/version.py b/arosics/version.py index 258f0f7..c8f571d 100644 --- a/arosics/version.py +++ b/arosics/version.py @@ -22,5 +22,5 @@ # with this program. If not, see . -__version__ = '0.9.23' -__versionalias__ = '2020-09-25_02' +__version__ = '0.9.24' +__versionalias__ = '2020-09-28_01' diff --git a/docs/installation.rst b/docs/installation.rst index 4b0f4e5..924dc45 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -20,17 +20,10 @@ Using conda_, the recommended approach is: .. code-block:: bash - $ conda install -c conda-forge numpy gdal scikit-image matplotlib 'pyproj>2.2.0' shapely geopandas pandas cmocean + $ conda install -c conda-forge numpy gdal scikit-image matplotlib 'pyproj>2.2.0' shapely geopandas pandas cmocean basemap pykrige pyfftw -3. Install optional libraries for AROSICS (only needed for some specific functions): - - .. code-block:: bash - - $ conda install -c conda-forge basemap pykrige pyfftw - - -4. Then install AROSICS using the pip installer: +3. Then install AROSICS using the pip installer: .. code-block:: bash diff --git a/requirements.txt b/requirements.txt index 49b3ef8..ed906a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,6 @@ plotly six folium>=0.6.0 geojson +pykrige +pyfftw +basemap diff --git a/setup.py b/setup.py index 9c78d3c..db6b5e8 100644 --- a/setup.py +++ b/setup.py @@ -25,8 +25,6 @@ """The setup script.""" from setuptools import setup, find_packages -import warnings -from pkgutil import find_loader with open('README.rst') as readme_file: @@ -39,12 +37,10 @@ with open("arosics/version.py") as version_file: exec(version_file.read(), version) -requirements = ['numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'pandas', - 'geoarray>=0.8.30', 'py_tools_ds>=0.14.28', 'plotly', 'cmocean', 'six', 'folium>=0.6.0', 'geojson' - # 'pykrige' # conda install --yes -c conda-forge pykrige - # 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \ - # 'basemap', # conda install --yes -c conda-forge basemap; \ - ] +requirements = [ + 'numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'pandas', 'plotly', 'cmocean', 'six', + 'folium>=0.6.0', 'geojson', 'pykrige', 'pyfftw', 'basemap', 'geoarray>=0.8.30', 'py_tools_ds>=0.14.28' +] setup_requirements = [ 'setuptools' @@ -73,31 +69,15 @@ 'Topic :: Scientific/Engineering', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Natural Language :: English', - "Programming Language :: Python :: 2", - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], test_suite='tests', tests_require=test_requirements, setup_requires=setup_requirements, ) - - -# check for pyfftw -if not find_loader('pyfftw'): - warnings.warn('You need to install pyfftw manually (see https://pypi.python.org/pypi/pyFFTW) for speeding up ' - 'the computation. It is not automatically installed.') - -# check for basemap -if not find_loader('mpl_toolkits.basemap'): - warnings.warn('You need to install basemap manually if you want to plot maps (see www./matplotlib.org/basemap). ' - 'It is not automatically installed.') - -# check for pykrige -if not find_loader('pykrige'): - warnings.warn('You need to install pykrige manually if you want to interpolate tie point grids produced by AROSICS ' - '(see https://github.com/bsmurphy/PyKrige). It is not automatically installed.') diff --git a/tests/CI_docker/context/environment_arosics.yml b/tests/CI_docker/context/environment_arosics.yml index 9fff221..78b5510 100644 --- a/tests/CI_docker/context/environment_arosics.yml +++ b/tests/CI_docker/context/environment_arosics.yml @@ -6,7 +6,6 @@ channels: &id1 dependencies: - python=3.*.* - pip - - pyqt - numpy - gdal - scikit-image @@ -20,6 +19,7 @@ dependencies: - holoviews - bokeh - pykrige + - pyfftw - cmocean - pip: