From 7801af277935b5bf23c042e52b8efd0b6564f963 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Thu, 24 Feb 2022 23:04:38 +0000 Subject: [PATCH] Look for both Figures.cmd and Figure.cmd files for Compilations --- .vscode/launch.json | 4 ++-- smdb/scripts/load.py | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7ff3d953..c0c5d8a9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -48,7 +48,7 @@ //"args": [ "-v", "1", "--skipuntil_regex", "--regex", "MappingAUVOps2018/20180504m3/ZTopo.grd$" ], //"args": ["--fnv", "-v", "1", "--limit", "2", "--skipuntil", "MappingAUVOps2011/20110718m1"], //"args": [ "-v", "2", "--bootstrap", "--skipuntil_regex", "--regex", "MappingAUVOps2006/20060828/ZTopo.grd$", "--limit", "1", "--clobber", "--noinput" ], - "args": ["--fnv", "-v", "2", "--limit", "2", "--skipuntil", "2019/20190820m1"] + //"args": ["--fnv", "-v", "2", "--limit", "2", "--skipuntil", "2019/20190820m1"] //"args": ["--fnv", "-v", "2", "--limit", "2", "--skipuntil", "2021/20210906d1/lidar"] //"args": ["--fnv", "-v", "1"], //"args": [ "--compilation", "-v", "1", "--skipuntil", "swathdata/surveys/UH/kok0714", "--log_file", "compilation.txt" ], @@ -58,7 +58,7 @@ //"args": ["--compilation", "-v", "1", "--skipuntil", "2019/MorroBay/Figures", "--limit", "20"], //"args": ["--compilation", "-v", "1", "--filter", "2019/AxialSeamount/Figures_v2019Oct31", "--log_file", "compilation.txt"], //"args": ["--compilation", "-v", "1", "--skipuntil", "MappingAUVOps2007/Axial2007old/Figures/", "--log_file", "compilation.txt"], - //"args": ["--compilation", "-v", "1"], + "args": ["--compilation", "-v", "1"], "justMyCode": false } ] diff --git a/smdb/scripts/load.py b/smdb/scripts/load.py index cc0a6dd7..2efd52a7 100755 --- a/smdb/scripts/load.py +++ b/smdb/scripts/load.py @@ -1148,15 +1148,11 @@ def load_from_grds(self): class Compiler(BaseLoader): - """Find directories with datalistp.mb-1 files but not a ZTopo.grd file - indicating a compilation directory where the data and figures in it - derive from Missions that have been loaded by BootStrapper.""" - def comp_dirs(self) -> Iterator[str]: """Generate potential Compilation directory names, meaning - there is no ZTopo.grd, but there is a Figures.cmd file. + there is no ZTopo.grd, but there is a Figure[s]*.cmd file. """ - pattern = r"\/Figures.cmd$" + pattern = r"\/Figure[s]*.cmd$" locate_cmd = f"locate -d {self.LOCATE_DB} -r '{pattern}'" start_processing = True if self.args.skipuntil: @@ -1288,7 +1284,7 @@ def link_compilation_to_missions(self): self.logger.warning(str(e)) def _thumbnail_filename(self, grd_filename: str) -> str: - for ext in ("jpg", "png", "tif"): + for ext in ("jpg", "jpeg", "png", "tif"): base_name = grd_filename.replace(".grd", "") thumbnail_filenames = glob(f"{base_name}*.{ext}") if thumbnail_filenames == 1: