diff --git a/HISTORY.rst b/HISTORY.rst index 7acfe5613732691d2e868a6df99ed83ba0878836..5fa9c2175f688fff4e14e3075627f029b3a199ad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,10 +17,12 @@ History * Fixed some type hinting issues. * GMS_object.get_subset_obj() now returns None in case the subset contains no data at all. * Added missing MemoryReserver.logger.close() call. -* Fixed an issue causing the L2B/L2C output to containĀ  wrong spectral bands in case the spectral homogenization is +* Fixed an issue causing the L2B/L2C output to contain wrong spectral bands in case the spectral homogenization is executed and sort_by_cwl is set to True (due to a wrong wavelength order if no_pan=False). * SpatialIndexMediator.getFullSceneDataForDataset() now retries the query 10 times in case of a struct.error (relates to issue #103). +* Fixed issue #105 ('FileNotFoundError: Options file not found ...' when running run_gms.py -h after installing + gms_preprocessing from pip or conda-forge.) 0.18.11 (2020-11-03) diff --git a/MANIFEST.in b/MANIFEST.in index ad3b8c4ceb653346132c0b95a10414ded46ac7cc..0d2c9399fbffebc7531933b7abd05f3ea7638235 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,7 @@ include CONTRIBUTING.rst include HISTORY.rst include LICENSE include README.rst +include options/options_default.json exclude travis_pypi_setup.py recursive-exclude .github * diff --git a/gms_preprocessing/misc/locks.py b/gms_preprocessing/misc/locks.py index ed4297765ffa90639d0a300331a45e28a4b01599..42bfecfa0ae0203cb396e6ef059872c218ad9f24 100644 --- a/gms_preprocessing/misc/locks.py +++ b/gms_preprocessing/misc/locks.py @@ -320,7 +320,10 @@ class MemoryReserver(object): def __exit__(self, exc_type, exc_val, exc_tb): self.release() - self.logger.close() + + if not self.disabled: + self.logger.close() + return True if exc_type is None else False diff --git a/setup.py b/setup.py index d911cd4aca945b9af5876b76a1869126b55156fe..9965acb7de39399c940acdba02344dc025477f15 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,8 @@ setup( license="GPL-3.0-or-later", long_description=readme, name='gms_preprocessing', - package_data={"gms_preprocessing": ["database/**/**/*"]}, + package_data={"gms_preprocessing": ["database/**/**/*", + "options/options_default.json"]}, package_dir={'gms_preprocessing': 'gms_preprocessing'}, packages=find_packages(exclude=['.github', 'benchmarks', 'docs', 'examples', 'tests*']), scripts=["bin/run_gms.py", "bin/run_gms.sh"],