Skip to content

Store test datasets in this repo #226

@TomNicholas

Description

@TomNicholas

Our current approach to testing involves a bunch of fixtures which each download a tutorial dataset from xarray (and cache it because it uses pooch), saves them to a temporary directory, then open that dataset from disk. This is not ideal for a few reasons:

  1. The datasets aren't minimal, so they contain more complexity than is really needed to test a single bug / feature. This can make debugging more complicated.
  2. We're using the network when we don't need to be.
  3. vz.open_virtual_dataset calls xr.open_dataset, but because of our test setup xr.open_dataset can potentially be called more than once in the same test invocation, even if the code we are testing only calls it once. This again can make debugging more confusing than it needs to be.

We do need to test our ability to read files from disk, but it might be better just to make some really tiny netCDF files and save them in this repo.

EDIT: Xarray actually does this and no-one seems to complain because the files are only ~1kB in size, which is smaller than the text files containing the actual code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions