diff --git a/setup.cfg b/setup.cfg index 35c5fabe..fc548903 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = compass -version = 0.1.0 +version = attr: compass.__version__ description = A Package to Generate Coregistered Multi-temporal SAR SLC long_description = file: README.md long_description_content_type = text/markdown @@ -28,4 +28,3 @@ where = src [options.entry_points] console_scripts = s1_cslc.py = compass.s1_cslc:main - diff --git a/src/compass/__init__.py b/src/compass/__init__.py index e69de29b..060593e9 100644 --- a/src/compass/__init__.py +++ b/src/compass/__init__.py @@ -0,0 +1,2 @@ +# get version info +from compass.version import release_version as __version__ diff --git a/src/compass/s1_cslc.py b/src/compass/s1_cslc.py old mode 100644 new mode 100755 index bb5906cd..eeced16c --- a/src/compass/s1_cslc.py +++ b/src/compass/s1_cslc.py @@ -1,3 +1,7 @@ +#!/usr/bin/env python + +'''driver for CSLC workflow in radar/geo''' + from compass import s1_rdr2geo, s1_geo2rdr, s1_resample, s1_geocode_slc from compass.utils.geo_runconfig import GeoRunConfig from compass.utils.runconfig import RunConfig diff --git a/src/compass/s1_geo2rdr.py b/src/compass/s1_geo2rdr.py old mode 100644 new mode 100755 index 566b69a9..dd0e3190 --- a/src/compass/s1_geo2rdr.py +++ b/src/compass/s1_geo2rdr.py @@ -1,4 +1,7 @@ -"""Wrapper for geo2rdr""" +#!/usr/bin/env python + +'''wrapper for geo2rdr''' + from datetime import timedelta import os import time diff --git a/src/compass/s1_geocode_slc.py b/src/compass/s1_geocode_slc.py old mode 100644 new mode 100755 index 693a8118..2d8c0cc5 --- a/src/compass/s1_geocode_slc.py +++ b/src/compass/s1_geocode_slc.py @@ -1,3 +1,7 @@ +#!/usr/bin/env python + +'''wrapper for geocoded SLC''' + from datetime import timedelta import os import time diff --git a/src/compass/s1_rdr2geo.py b/src/compass/s1_rdr2geo.py old mode 100644 new mode 100755 index 66eb83a8..0367a9ad --- a/src/compass/s1_rdr2geo.py +++ b/src/compass/s1_rdr2geo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python '''wrapper for rdr2geo''' diff --git a/src/compass/s1_resample.py b/src/compass/s1_resample.py old mode 100644 new mode 100755 index a849a725..b31ad29e --- a/src/compass/s1_resample.py +++ b/src/compass/s1_resample.py @@ -1,4 +1,7 @@ -"""Wrapper for resample burst""" +#!/usr/bin/env python + +"""Wrapper for resample""" + from datetime import timedelta import os import time diff --git a/src/compass/utils/helpers.py b/src/compass/utils/helpers.py index d249539c..83192491 100644 --- a/src/compass/utils/helpers.py +++ b/src/compass/utils/helpers.py @@ -25,7 +25,7 @@ def check_file_path(file_path: str) -> None: Path to file to be checked """ error_channel = journal.error('helpers.check_file_path') - if not os.path.isfile(file_path): + if not os.path.exists(file_path): err_str = f'{file_path} not found' error_channel.log(err_str) raise FileNotFoundError(err_str) diff --git a/src/compass/version.py b/src/compass/version.py new file mode 100644 index 00000000..46580884 --- /dev/null +++ b/src/compass/version.py @@ -0,0 +1,16 @@ +# release history + +import collections + + +# release history +Tag = collections.namedtuple('Tag', 'version date') +release_history = ( + Tag('0.1.1', '2022-06-08'), + Tag('0.1.0', '2022-06-07'), +) + +# latest release version number and date +release_version = release_history[0].version +release_date = release_history[0].date +