sup3r.utilities.pytest.helpers

sup3r.utilities.pytest.helpers#

Testing helpers.

Functions

BatchHandlerTesterFactory(BatchHandlerClass, ...)

Batch handler factory with sample counter and deterministic sampling for testing.

make_collect_chunks(td)

Make fake h5 chunked output files for collection tests.

make_fake_cs_ratio_files(td, low_res_times, ...)

Make a set of dummy clearsky ratio files that match the GAN fwp outputs

make_fake_dset(shape, features[, const])

Make dummy data for tests.

make_fake_h5_chunks(td)

Make fake h5 chunked output files for a 5x spatial 2x temporal multi-node forward pass output.

make_fake_nc_file(file_name, shape, features)

Make nc file with dummy data for tests.

make_fake_tif(shape, outfile)

Make dummy data for tests.

test_sampler_factory(SamplerClass)

Build test samplers which track indices.

Classes

BatchHandlerTesterCC(train_containers, *[, ...])

Batch handler with sampler with running index record.

BatchHandlerTesterDC(train_containers, *[, ...])

Data-centric batch handler with record for testing

DualSamplerTesterCC

alias of SamplerTester

DummyData(data_shape, features)

Dummy container with random data.

DummySampler(sample_shape, data_shape, ...)

Dummy container with random data.

SamplerTester(*args, **kwargs)

Keep a record of sample indices for testing.

SamplerTesterDC

alias of SamplerTester