Skip to content

Refactor code to separate initial construction of ImageMeta from daily use #5

@titaniumbones

Description

@titaniumbones

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions