Rename pos_label_str to pos_label everywhere. - #706
Conversation
- The main code, the tests, and the documentation.
Codecov Report
@@ Coverage Diff @@
## main #706 +/- ##
=======================================
Coverage 96.89% 96.89%
=======================================
Files 63 63
Lines 9199 9199
=======================================
Hits 8913 8913
Misses 286 286
Continue to review full report at Codecov.
|
|
|
||
| if label_list == ['B', 'C']: | ||
| pos_label_str, other_label_str = 'B', 'C' | ||
| pos_label, other_label_str = 'B', 'C' |
There was a problem hiding this comment.
I know that this PR is supposed to change only pos_label_str to pos_label but in a couple of other places, I did see neg_label_str being changed to neg_label. Similarly, should other_label_str be changed too?
There was a problem hiding this comment.
I checked out the branch and grepped all the _label_str and found the following occurrences of other_label_str. Rest looks good to me.
./tests/test_classification.py:252: pos_label, other_label_str = 'B', 'C'
./tests/test_classification.py:254: pos_label, other_label_str = 2, 1
./tests/test_classification.py:256: pos_label, other_label_str = 'FRAG', 'NONE'
./tests/test_classification.py:263: index_label_dict = {0: other_label_str, 1: pos_label}
./tests/test_classification.py:265: sorted_label_list = sorted([pos_label, other_label_str])
There was a problem hiding this comment.
Sure, we can do that for consistency. Thanks guys!
|
|
||
| if label_list == ['B', 'C']: | ||
| pos_label_str, other_label_str = 'B', 'C' | ||
| pos_label, other_label_str = 'B', 'C' |
There was a problem hiding this comment.
I checked out the branch and grepped all the _label_str and found the following occurrences of other_label_str. Rest looks good to me.
./tests/test_classification.py:252: pos_label, other_label_str = 'B', 'C'
./tests/test_classification.py:254: pos_label, other_label_str = 2, 1
./tests/test_classification.py:256: pos_label, other_label_str = 'FRAG', 'NONE'
./tests/test_classification.py:263: index_label_dict = {0: other_label_str, 1: pos_label}
./tests/test_classification.py:265: sorted_label_list = sorted([pos_label, other_label_str])
... for consistency.
This PR closes #569.
We are only doing part of the issue here (the renaming) but not moving the
pos_labelfield into theInputsection from theTuningsection where it currently lives. This is mainly to minimize the amount of changes that someone would need to go through when converting their old code/config files (renaming can be automated).