Skip to content
Snippets Groups Projects
Commit 7fc7cc3e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'enhancement/install_acwater_from_pip' into 'master'

Use acwater from pip for now.

See merge request !79
parents e71eec6c f4051097
No related branches found
No related tags found
1 merge request!79Use acwater from pip for now.
Pipeline #58382 canceled
......@@ -35,6 +35,8 @@ test_enpt:
- pip uninstall acwater -y
- pip install acwater>=0.3.0
- pip install packaging # TODO remove as soon as docker runner is rebuilt
# run tests
- make pytest # test are called here
......
......@@ -2,6 +2,12 @@
History
=======
0.19.1 (2023-02-28)
-------------------
* !79: ACwater is installed from pip as long as it is not yet packaged within the EnPT conda-forge builds.
0.19.0 (2023-02-17)
-------------------
......
......@@ -57,6 +57,7 @@ to resolve the following dependencies before the pip installer is run:
* llvmlite
* lxml
* matplotlib
* packaging
* pandas
* pygrib
* pyhdf
......@@ -103,6 +104,12 @@ and polymer_ are required.
$ make ancillary
$ pip install -e .
3. Finally install ACwater:
.. code-block:: bash
$ pip install acwater>=0.3.0
.. note::
When using a conda_ environment on Linux or Mac OSX, the needed compilers to build polymer_
......
......@@ -36,6 +36,7 @@ import numpy as np
from multiprocessing import cpu_count
from logging import Logger
from packaging.version import parse as parse_version
from sicor.sicor_enmap import sicor_ac_enmap
from sicor.options import get_options as get_ac_options
......@@ -103,6 +104,15 @@ class AtmosphericCorrector(object):
"""Return True if ACWater/Polymer is operable, else raise a warning and return False."""
try:
import acwater as _acwater # noqa: F401
if parse_version(_acwater.__version__) < parse_version('0.3.0'):
if self.cfg.mode_ac in ['water', 'combined']:
logger.warning(f"The installed version of ACwater (v{_acwater.__version__}) is too old. "
f"At least version 0.3.0 is required. Instead of ACwater, SICOR is applied to water "
f"surfaces as a workaround.")
return False
except ImportError as e:
if self.cfg.mode_ac in ['water', 'combined']:
logger.warning(f"The atmospheric correction mode was set to '{self.cfg.mode_ac}' but "
......
acwater>=0.3.0
arosics>=1.0.0
cerberus
geoarray>=0.15.8
......@@ -9,6 +8,7 @@ mvgavg
natsort
numpy
numpy-indexed
packaging
pandas
pyproj>=3.4.0
py_tools_ds>=0.14.23
......
......@@ -41,7 +41,6 @@ with open("enpt/version.py", encoding='utf-8') as version_file:
exec(version_file.read(), version)
req = [
'acwater>=0.3.0',
'arosics>=1.0.0',
'cerberus',
'geoarray>=0.15.8',
......@@ -52,6 +51,7 @@ req = [
'natsort',
'numpy',
'numpy-indexed',
'packaging',
'pandas',
'pyproj>=3.4.0',
'py_tools_ds>=0.14.23',
......
......@@ -32,6 +32,7 @@ dependencies:
- mvgavg
- natsort
- numpy-indexed
- packaging
- scipy
- jsmin
- tqdm
......
......@@ -32,5 +32,8 @@ dependencies:
- xgboost
- pip:
# Polymer AC additional pip requirements
- acwater>=0.3.0
# EnMAP-Box
- enpt_enmapboxapp
......@@ -32,6 +32,9 @@ dependencies:
- xgboost
- pip:
# Polymer AC additional pip requirements
- acwater>=0.3.0
# EnMAP-Box
- enpt_enmapboxapp
......
......@@ -20,4 +20,5 @@ dependencies:
- xarray
- pip:
- acwater>=0.3.0
- ecmwf-api-client
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment