Converted assert of phys_min and phys_max into warnings#266
Merged
skjerns merged 5 commits intoholgern:masterfrom Jan 22, 2025
Merged
Converted assert of phys_min and phys_max into warnings#266skjerns merged 5 commits intoholgern:masterfrom
skjerns merged 5 commits intoholgern:masterfrom
Conversation
Converted assert's into warnings. Reason: in some cases, storing an edf file fails because of roundoff errors: e.g. `phys_min -3565.82 vs. signal_min 3565.8200000000000006` will fail in write_edf (but shouldn't)
Collaborator
|
nice! It seems like it was originally intended to be a warning, so good fix. However, could you also adapt the test suite? It seems to expect an assertion error here when we no longer give this. Maybe check for the actualy values that are now being read? that would be great! |
Contributor
Author
|
Didn't see that before. Will check. |
Contributor
Author
|
Good tips @skjerns. I attempted to implement the tests as well and found some new edge cases which should still throw an error. Workflow is now as follows:
Also reflected in tests. To enable building the python package, I had to remove to references to distools (which is deprecated; see #267) This also fixes #267 in the sense that you can still build the pypi package using python 3.12. |
Collaborator
|
thanks! looks good to me :) |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converted assert's into warnings.
Reason:
in many cases, storing an edf file fails because of roundoff errors: e.g.
phys_min -3565.82 vs. signal_min 3565.8200000000000006will fail in write_edf (but shouldn't)