Skip to content

Commit

Permalink
Uncommented new tests from the last commit. Updated version info and …
Browse files Browse the repository at this point in the history
…HISTORY.rst.

Signed-off-by: Daniel Scheffler <[email protected]>
  • Loading branch information
danschef committed Dec 11, 2020
1 parent 6e4a230 commit bf370a1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------

Expand Down
4 changes: 2 additions & 2 deletions spechomo/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

__version__ = '0.9.0'
__versionalias__ = '20201102.01'
__version__ = '0.9.1'
__versionalias__ = '20201211.01'
8 changes: 4 additions & 4 deletions tests/test_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_classifier_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit bf370a1

Please sign in to comment.