eradiate.testing#

eradiate.testing.plugin#

Helper tools for plugin tests.

sample_eval_pdf_bsdf(plugin, wi[, ...])

Sample a BSDF and get corresponding eval() and pdf() values.

eradiate.testing.fixtures#

Eradiate-specific pytest fixtures, imported automatically upon starting a pytest session (see conftest.py).

dataset_regression(request, tmp_path, ...)

Compare a simulation result against a stored reference dataset.

Implementation details

DatasetRegressionFixture(request, tmp_path, ...)

Implementation of the dataset_regression fixture: compare a simulation result against a stored reference dataset.

eradiate.testing.regression#

Statistical criteria used to compare a simulation result against a reference, and the charts that make a verdict readable.

This module is deliberately free of any I/O and of any dependency on Pytest: reference data management (locating references, regenerating them, archiving artefacts) is handled by the dataset_regression fixture, see eradiate.testing.fixtures.

RegressionTest(threshold, *[, variable, dim])

Common interface for tests based on the comparison of a result dataset against a reference dataset.

RegressionTestFailure

Raised when a regression test does not pass, i.e. when the comparison against the reference fails.

RegressionTestOutcome(passed, metric_name, ...)

Verdict of a single RegressionTest.evaluate() call, together with everything a caller needs to report it.

RMSETest(threshold, *[, variable, dim])

Root-mean-square error test.

ZTest(threshold, *[, variable, dim])

Z-test with Šidák correction factor.

sidak_family_p_value(p_min, n)

Aggregate n paired p-values into a single family-wise p-value using the Šidák correction, i.e. the probability of observing a minimum p-value at least as extreme as p_min among n independent comparisons.

eradiate.testing.report#

Test report logging.

This module provides an abstraction layer that routes logging messages to reporting infrastructure if available, and falls back to standard logging otherwise.

The current reporting backend is Robot Framework. These components make it possible to change it in the future.

figure_to_html(fig)

Render a figure in HTML format

ReportLogger([use_robot])

Send messages and HTML fragments to the active test report.

eradiate.testing.test_cases#

rami4atm.Case(id, make_experiments[, tests, ...])

Definition of a RAMI4ATM benchmarking case.

rami4atm.CASES

RAMI4ATM benchmarking cases covered by the Eradiate regression test suite, indexed by case identifier.

rami4atm.create_boa(case_id, spp)

Create the Experiment objects simulating the bottom-of-atmosphere counterpart of a RAMI4ATM benchmarking case.

rami4atm.create_toa(case_id, spp[, padding])

Create an Experiment simulating a top-of-atmosphere RAMI4ATM benchmarking case.

rami4atm.postprocess_boa(results)

Assemble the bottom-of-atmosphere reflectance factors from the results of the experiments created by create_boa().

rami4atm.srf_id(case_id)

Identifier of the spectral response function used by a RAMI4ATM case.

eradiate.testing.types#

check_scene_element(instance[, mi_cls, ctx, ...])

Perform kernel dictionary checks on a scene element.