Skip to content

Commit

Permalink
0.1.06
Browse files Browse the repository at this point in the history
  • Loading branch information
semiautomaticgit committed Oct 22, 2023
1 parent debcaac commit 683f3a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/remotior_sensus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
from remotior_sensus.core.session import Session
from remotior_sensus.core import configurations

__version__ = '0.1.05'
__version__ = '0.1.06'

configurations.version = __version__
2 changes: 1 addition & 1 deletion src/remotior_sensus/tools/band_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
or date iteration with structure
forbandsinbandset[YYYY-MM-DD, YYYY-MM-DD, YYYY-MM-DD, ...]filter
forbandsinbandset[YYYY-MM-DD, YYYY-MM-DD, YYYY-MM-DD, ...]name_filter
with name_filter optional filter of name of first band in the BandSet
"""
Expand Down
4 changes: 3 additions & 1 deletion src/remotior_sensus/util/files_directories.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def relative_to_absolute_path(path, root=None):
if root is None:
a_path = path
else:
a_path = os.path.join(root, path).replace('\\', '/').replace('//', '/')
a_path = os.path.join(
root, path.replace('\\', '/').replace('//', '/').lstrip('/')
).replace('\\', '/').replace('//', '/')
a = Path(a_path)
original_path = Path(path)
if a.is_dir() or a.is_file():
Expand Down
12 changes: 12 additions & 0 deletions tests/test_bandset_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,18 @@ def test_bandset_catalog(self):
catalog.current_bandset = 10
# current BandSet
self.assertEqual(catalog.current_bandset, catalog.get_bandset_count())
# BandSet absolute paths
self.assertEqual(
catalog.get(3).get_absolute_paths()[0],
catalog.get(3).get_absolute_path(band_number=1)
)
# BandSet relative paths
self.assertEqual(
catalog.get(3).get_paths(), catalog.get_bandset(3, 'path')
)
self.assertEqual(
catalog.get_bandset(3).get_paths(), catalog.get_bandset(3, 'path')
)
# create second catalog
catalog_2 = rs.bandset_catalog()
self.assertEqual(str(catalog_2.bandsets_table['date'][0]), 'NaT')
Expand Down

0 comments on commit 683f3a7

Please sign in to comment.