From bf370a168bf13e113a10b260ca534aa0588231d2 Mon Sep 17 00:00:00 2001 From: Daniel Scheffler Date: Fri, 11 Dec 2020 10:42:06 +0100 Subject: [PATCH] Uncommented new tests from the last commit. Updated version info and HISTORY.rst. Signed-off-by: Daniel Scheffler --- HISTORY.rst | 8 ++++++++ spechomo/version.py | 4 ++-- tests/test_classifier.py | 8 ++++---- tests/test_classifier_creation.py | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 90d09ff..59d62cc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,14 @@ History ======= +0.9.1 (2020-12-11) +------------------ + +* Added URL checker and corresponding CI job. +* Removed travis related files. +* Replaced hard-coded links in documentation by cross-linking directives. + + 0.9.0 (2020-11-02) ------------------ diff --git a/spechomo/version.py b/spechomo/version.py index 678f2ed..8254966 100644 --- a/spechomo/version.py +++ b/spechomo/version.py @@ -24,5 +24,5 @@ # You should have received a copy of the GNU Lesser General Public License along # with this program. If not, see . -__version__ = '0.9.0' -__versionalias__ = '20201102.01' +__version__ = '0.9.1' +__versionalias__ = '20201211.01' diff --git a/tests/test_classifier.py b/tests/test_classifier.py index 70f8c4e..5cfb9d3 100644 --- a/tests/test_classifier.py +++ b/tests/test_classifier.py @@ -35,7 +35,7 @@ import os import json from unittest import TestCase -from tempfile import TemporaryDirectory +# from tempfile import TemporaryDirectory from spechomo.classifier import Cluster_Learner from spechomo import __path__ @@ -72,9 +72,9 @@ def test_to_jsonable_dict(self): outstr = json.dumps(jsonable_dict, sort_keys=True, indent=4) self.assertIsInstance(outstr, str) - def test_save_to_json(self): - with TemporaryDirectory() as tmpDir: - self.clf.save_to_json(os.path.join(tmpDir, 'clf.json')) + # def test_save_to_json(self): + # with TemporaryDirectory() as tmpDir: + # self.clf.save_to_json(os.path.join(tmpDir, 'clf.json')) # class Test_ClassifierCollection(TestCase): diff --git a/tests/test_classifier_creation.py b/tests/test_classifier_creation.py index 36ce1f3..c9988d3 100644 --- a/tests/test_classifier_creation.py +++ b/tests/test_classifier_creation.py @@ -93,8 +93,8 @@ def test_resample_spectra(self): src_im = GeoArray(self.SHC.ims_ref[0]) unif_random_spectra = self.SHC.cluster_image_and_get_uniform_spectra(src_im) - # tgt_rsr = RSR(satellite='Sentinel-2A', sensor='MSI') - tgt_rsr = RSR(satellite='Terra', sensor='MODIS', sort_by_cwl=True) + tgt_rsr = RSR(satellite='Sentinel-2A', sensor='MSI') + # tgt_rsr = RSR(satellite='Terra', sensor='MODIS', sort_by_cwl=True) unif_random_spectra_rsp = \ self.SHC.resample_spectra(unif_random_spectra, src_cwl=np.array(src_im.meta.band_meta['wavelength'], dtype=np.float).flatten(),