-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change unit test response file to dense #287
base: develop
Are you sure you want to change the base?
Conversation
…rix into a HDF5 format if the response doesn't come from a .rsp file.
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (35.48%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.
|
I need to create a fake .rsp to fix the test coverage. @augustus-thomas I think at some point you were working on this, did you get to create one? Or maybe it was for the PSR, I don't remember exactly. |
tmp_dir = tmp_path / "tmp" | ||
tmp_dir.mkdir() | ||
|
||
tmp_rsp = test_data.path / 'tmp_rsp.h5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe, should it be tmp_path.path / 'tmp_rsp.h5'
? Currently, the file will be saved in the test data directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch. Indeed it was the wrong path. I fixed it in my latest commit.
We have moved from a sparse to a dense response. It was not that sparse, and it ended up being slower than a dense matrix. The unit test now reflects what we actually use.
I created the dense response with:
In order to make things easier I moved the code that writes an HDF5 response file from a Histogram from _open_rsp to its own function, _write_h5. I added a unit test for this specific function.