Closed DimitriPapadopoulos closed 12 months ago
Ouch. Somehow I lost the gender branch. Will retry.
Let me know when you are done then I'll review.
Also: Could you sqash the commits after finishing?
The new code should be backwards compatible enough. Not sure if I test the backwards compatibility stuff enough.
Can you have a look?
lgtm
for testing it would be good to also check that the old functions still return the same values.
Easiest would be to assert an assertion with getSex()==getGender()
for all the replaced instances in the test suite.
About "Due to the edf specifications, only binary assignment is possible": I am not a specialist, but I understand most specialists usually describe biological sex as binary, based on what gametes one produces, while fully endorsing gender diversity. See for example https://doi.org/10.1002/bies.202200173. What could be more subjective is the use of biological sex as a variable of interest in situations where it is not relevant.
We do have a similar test in pyedflib/tests/test_edfreader.py
:
np.testing.assert_equal(f.getSex(), 'Male')
np.testing.assert_equal(f.getGender(), 'Male') # deprecated
I have just added tests to pyedflib/tests/test_edfwriter.py
in test_sex_setting_correctly()
.
perfect, I think it's ready to merge now :)
Fixes #207 .