diff --git a/CHANGELOG.md b/CHANGELOG.md index 843dc7a..b453ba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v1.2.3](https://github.com/emit-sds/emit-utils/compare/v1.2.2...v1.2.3) + +> 17 February 2023 + +- Add software delivery version to UMM-G and NetCDF metadata [`e881f7a`](https://github.com/emit-sds/emit-utils/commit/e881f7af6e77e97408426d211e6dd4d6c80e8b15) +- Update version to 1.2.3 [`dfd9a2f`](https://github.com/emit-sds/emit-utils/commit/dfd9a2f7ae978840f09e483dc7f75268858e189a) + #### [v1.2.2](https://github.com/emit-sds/emit-utils/compare/v1.2.1...v1.2.2) > 25 January 2023 +- Merge develop into main for v1.2.2 [`#8`](https://github.com/emit-sds/emit-utils/pull/8) +- Update change log [`a81cce6`](https://github.com/emit-sds/emit-utils/commit/a81cce608ab526cf022f5f257496096341e849f0) - bugfix for east/west long metadata [`a6de126`](https://github.com/emit-sds/emit-utils/commit/a6de12627606c615fc462c60f30fb3a9779b9cb3) - Update to 1.2.2 [`08ac199`](https://github.com/emit-sds/emit-utils/commit/08ac1993ffd5762234836925094f6a390f41ed87) diff --git a/emit_utils/daac_converter.py b/emit_utils/daac_converter.py index 30a5fbe..0a20d53 100644 --- a/emit_utils/daac_converter.py +++ b/emit_utils/daac_converter.py @@ -214,7 +214,8 @@ def makeGlobalAttrBase(nc_ds: netCDF4.Dataset): -def makeGlobalAttr(nc_ds: netCDF4.Dataset, primary_envi_file: str, glt_envi_file: str = None): +def makeGlobalAttr(nc_ds: netCDF4.Dataset, primary_envi_file: str, software_delivery_version: str, + glt_envi_file: str = None): """ Set up global attributes that are universal. Required attributes that should be populated by individual PGEs are flagged with None values @@ -234,6 +235,7 @@ def makeGlobalAttr(nc_ds: netCDF4.Dataset, primary_envi_file: str, glt_envi_file nc_ds.time_coverage_start = primary_ds.metadata['emit acquisition start time'] nc_ds.time_coverage_end = primary_ds.metadata['emit acquisition stop time'] nc_ds.software_build_version = primary_ds.metadata['emit software build version'] + nc_ds.software_delivery_version = software_delivery_version nc_ds.product_version = "V0" + primary_ds.metadata['emit data product version'] run_command = "PGE Run Command: {" + primary_ds.metadata['emit pge run command'] + "}" input_files = "PGE Input Files: {" + ", ".join(primary_ds.metadata['emit pge input files']) + "}" @@ -279,10 +281,11 @@ def get_required_ummg(): def initialize_ummg(granule_name: str, creation_time: datetime, collection_name: str, collection_version: str, start_time: datetime, stop_time: datetime, pge_name: str, pge_version: str, - software_build_version: str = None, doi: str = None, orbit: int = None, orbit_segment: int = None, - scene: int = None, solar_zenith: float = None, solar_azimuth: float = None, - water_vapor: float = None, aod: float = None, mean_fractional_cover: float = None, - mean_spectral_abundance: float = None, cloud_fraction: str = None): + software_build_version: str = None, software_delivery_version: str = None, doi: str = None, + orbit: int = None, orbit_segment: int = None, scene: int = None, solar_zenith: float = None, + solar_azimuth: float = None, water_vapor: float = None, aod: float = None, + mean_fractional_cover: float = None, mean_spectral_abundance: float = None, + cloud_fraction: str = None): """ Initialize a UMMG metadata output file Args: granule_name: granule UR tag @@ -331,6 +334,8 @@ def initialize_ummg(granule_name: str, creation_time: datetime, collection_name: ummg['AdditionalAttributes'] = [] if software_build_version is not None: ummg['AdditionalAttributes'].append({'Name': 'SOFTWARE_BUILD_VERSION', 'Values': [str(software_build_version)]}) + if software_delivery_version is not None: + ummg['AdditionalAttributes'].append({'Name': 'SOFTWARE_DELIVERY_VERSION', 'Values': [str(software_delivery_version)]}) if doi is not None: ummg['AdditionalAttributes'].append({'Name': 'Identifier_product_doi_authority', 'Values': ["https://doi.org"]}) ummg['AdditionalAttributes'].append({'Name': 'Identifier_product_doi', 'Values': [str(doi)]}) diff --git a/setup.py b/setup.py index a4d8eb0..61567e0 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup(name='emit_utils', packages=find_packages(), include_package_data=True, - version='1.2.2', + version='1.2.3', install_requires=[ 'gdal>=2.0', 'spectral>=0.21',