arlmet.DirectoryIndex.covering#

DirectoryIndex.covering(start, end)[source]#

Return the files that cover a window, in time order.

The files hold every valid time the window needs (missing()): one every step from the one at or before start to the one at or after end. Files whose error is set are not used.

Parameters:
  • start (Any) – The window, earlier time first.

  • end (Any) – The window, earlier time first.

Return type:

list[Path]

Raises:

ValueError – If a valid time the window needs is in no file (the message lists them), if two files hold one of them (the message names both), if start is after end, or if no file is usable.

Examples

>>> idx.covering("2021-01-14 06:00", "2021-01-14 08:00")
[PosixPath('hrrr/20210114_06-11_hrrr')]