hubmapconsortium / portal-containers

Docker containers to pre-process data for visualization in the portal
MIT License
0 stars 1 forks source link

Error if no matches for glob #87

Closed mccalluc closed 2 years ago

mccalluc commented 2 years ago

Look for code like for input_file in input_dir.glob(f"*{POLYGON_FILE_SUFFUX}"):, and throw an error if there is no match for the glob... though there may be some exceptions where it really is optional.

Matt:

Ah, this looks relevant:

[ruffalo@login000 /hive/hubmap-test/data/consortium/University of Florida TMC/550c5a19866fb79faf17ecb75ea6987f/sprm_outputs]$ ls | grep polygon
reg001_expr.ome.tiff-cell_polygons_spatial.csv.csv

(note the .csv.csv extension) Ted Zhang how did this happen, and how do we ensure it doesn't happen again?

... but we could have caught this earlier when there were no matches for the input glob. Will file.

Originally posted by @mccalluc in https://github.com/hubmapconsortium/portal-ui/issues/2476#issuecomment-1057042274