At present, there's one big function getLakeImages which is responsible for building the list of images and for downloading all of them at once. This is unwieldy and also slows down testing dramatically. And the list really only needs to be constructed once! So:
- there should be a new
constructImageList function that really only needs to be run in exceptional circumstances (maybe if images/ImageMeta.json can't be found).
- we need a new async
getImage function that, on success, returns a new metadata entry for ImageMeta, and on failure, returns some kind of error.
- then the
getLakeImages and getAllLakes probably need to be rewritten too.