Skip to content

Commit

Permalink
GitHub issue #341 series analysis staging. As for the series_by_init_…
Browse files Browse the repository at this point in the history
…wrapper.py, use the STAGE DIR rather than the TMP DIR to store the filter files and

clean up the STAGING DIR with any files that begin with 'filter' and that belong to the current user prior to exiting the wrapper.
  • Loading branch information
bikegeek committed Dec 17, 2019
1 parent 4119437 commit b102eae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ush/series_by_lead_wrapper.py
Expand Up @@ -62,7 +62,7 @@ def __init__(self, config, logger):
self.series_lead_filtered_out_dir = \
self.config.getdir('SERIES_ANALYSIS_FILTERED_OUTPUT_DIR')
self.series_lead_out_dir = self.config.getdir('SERIES_ANALYSIS_OUTPUT_DIR')
self.tmp_dir = self.config.getdir('TMP_DIR')
self.tmp_dir = self.config.getdir('STAGING_DIR')
self.background_map = self.config.getbool('config', 'SERIES_ANALYSIS_BACKGROUND_MAP')
self.series_filter_opts = \
self.config.getstr('config', 'SERIES_ANALYSIS_FILTER_OPTS')
Expand Down Expand Up @@ -1355,8 +1355,10 @@ def apply_series_filters(self, tile_dir, init_times, series_output_dir,

# Clean up the tmp dir and create an empty one
# in anticipation of another run.
util.rmtree(tmp_dir)
util.mkdir_p(tmp_dir)
# util.rmtree(tmp_dir)
# util.mkdir_p(tmp_dir)
filter_regex = 'filter_.*'
util.remove_staged_files(tmp_dir, filter_regex, self.logger)

if __name__ == "__main__":
util.run_stand_alone("series_by_lead_wrapper", "SeriesByLead")

0 comments on commit b102eae

Please sign in to comment.