LSSTDESC / qp

Quantile Parametrization for probability distribution functions module
MIT License
10 stars 3 forks source link

Support reading and writing a dictionary of Ensembles to hdf5 files #218

Closed drewoldag closed 7 months ago

drewoldag commented 7 months ago

WIP - Initial commit to support writing out a dictionary collection of ensembles.

Problem & Solution Description (including issue #)

We don't have an easy way to export a collection of small ensembles. This work implements tooling to support that. Here the user will pass in a dictionary of qp.Ensembles that are then tabularized with the build_tables() method that converts the Ensemble into a dictionary of np.arrays.

We take the tabularized Ensembles and build a new dictionary of the form { : } and pass that to tables_io.writeDictsToHdf5(...).

We still need to implement a reading function to go along with this tooling.

Code Quality

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (248b3ee) to head (463624f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #218 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 37 37 Lines 2625 2646 +21 ========================================= + Hits 2625 2646 +21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

drewoldag commented 7 months ago

Tables_io now has coverage of changes at 100%, I've uncommented the unit test that was added here that exercises the write/read methods.