This addresses issue #52 by adding tests for data_processing_surface_notracer, and refactoring the inversion tests to run from reloaded merged data, rather than calling data_processing_surface_notracer.
Changes include:
Creating fixtures to avoid copying the same dictionary into many test functions
Three tests for merged data were added:
Get merged data using data_processing_surface_notracer and compare
the result to the results of this function from v0.1 of main on 9 Feb
2024
Create merged data and save, then reload and compare merged data
with reloaded merged data.
Create merged data and compare with pickled data frozen from main
v0.1 created on 9 Feb 2024
Existing tests for inversion now run from merged data, and a new test was added for the case where reload_merged_data is True, but the merged data can't be found.
Further tests to check that sites are dropped, but fp_all is created if some data is found, and that a SearchError is raised if all sites are dropped.
I also added an option to fixedbasisMCMC to specify the merged data file name, to simplify testing. This might be useful more generally (alternatively, I can remove it and change the test merged data file name).
Note: at some point, some of these tests are likely to fail because a package update might make it impossible to open the pickled merged data that is used for testing. If we move to using netCDF for storing merged data, this issue will go away.
This addresses issue #52 by adding tests for
data_processing_surface_notracer
, and refactoring the inversion tests to run from reloaded merged data, rather than callingdata_processing_surface_notracer
.Changes include:
Creating fixtures to avoid copying the same dictionary into many test functions
Three tests for merged data were added:
Get merged data using
data_processing_surface_notracer
and compare the result to the results of this function from v0.1 of main on 9 Feb 2024Create merged data and save, then reload and compare merged data with reloaded merged data.
Create merged data and compare with pickled data frozen from main v0.1 created on 9 Feb 2024
Existing tests for inversion now run from merged data, and a new test was added for the case where
reload_merged_data
isTrue
, but the merged data can't be found.Further tests to check that sites are dropped, but
fp_all
is created if some data is found, and that aSearchError
is raised if all sites are dropped.I also added an option to
fixedbasisMCMC
to specify the merged data file name, to simplify testing. This might be useful more generally (alternatively, I can remove it and change the test merged data file name).Note: at some point, some of these tests are likely to fail because a package update might make it impossible to open the pickled merged data that is used for testing. If we move to using netCDF for storing merged data, this issue will go away.