Skip to content

Commit

Permalink
Fix for HDF4 dmrpp generation with activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaellh0079 committed Nov 20, 2024
1 parent d344522 commit 9da830c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions dmrpp_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, **kwargs):
)
super().__init__(**kwargs)
self.path = self.path.rstrip('/') + "/"
os.chdir(self.path)
# Enable logging the default is True
enable_logging = (os.getenv('ENABLE_CW_LOGGING', 'true').lower() == 'true')
self.dmrpp_version = f"DMRPP {__version__}"
Expand Down Expand Up @@ -245,12 +246,8 @@ def get_dmrpp_command(self, dmrpp_meta, input_path, output_filename, local=False
dmrpp_options = DMRppOptions(self.path)
options = dmrpp_options.get_dmrpp_option(dmrpp_meta=dmrpp_meta)
local_option = f"-u file://{output_filename}" if '-u' in options else ''

if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
os.chdir(self.path)

base_dmrpp_cmd = self.dmrpp_type(output_filename)
LOGGER_TO_CW.info(f'BASE_CMD: {base_dmrpp_cmd}')
self.logger_to_cw.info(f'BASE_CMD: {base_dmrpp_cmd}')

if 'h4' not in base_dmrpp_cmd:
dmrpp_cmd = f"{base_dmrpp_cmd} {options} {input_path} -o {output_filename}.dmrpp" \
Expand Down
2 changes: 1 addition & 1 deletion dmrpp_generator/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v5.1.2"
__version__ = "v6.0.0"

0 comments on commit 9da830c

Please sign in to comment.