Skip to content

Commit

Permalink
Merge pull request #167 from MBARIMike/main
Browse files Browse the repository at this point in the history
Look for both Figures.cmd and Figure.cmd files for Compilations
  • Loading branch information
MBARIMike authored Feb 24, 2022
2 parents a86ae3f + 7801af2 commit 9aa11a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
Expand All @@ -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
}
]
Expand Down
10 changes: 3 additions & 7 deletions smdb/scripts/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9aa11a4

Please sign in to comment.