tardis-sn/carsus

Saving all reference files to a single HDF file

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
When rewriting CMFGEN and Chianti testing modules using Pytest Arraydiff, I realised that the plugin generated a file for every test case. This might and might not be a good thing- having one giant reference file might be easier to work with, but having multiple reference files also might be beneficial as one can quickly see how the reference data changes when new tests are added.

I tried to develop a prototype plugin which would combine all reference files into one HDF file during GSoC 2022 and was able to finish it now. I am creating this issue just in case we might want to consider this plugin. It can be installed from TestPyPi but I will upload it to PyPi as well when I release it.

The plugin saves dataframes and arrays in HDF files and can also group reference files and is similar to Pytest Arraydiff.

@pytest.mark.share_hdf
@pytest.mark.parametrize("nums", [150, 200])
def test_arr(nums):
    arr = np.array([4, 5, 6]) * nums
    return arr

Here is the link to the GitHub repository: https://github.com/atharva-2001/pytest_share_hdf

Deprecated by #405