-
Notifications
You must be signed in to change notification settings - Fork 68
Rename pos_label_str to pos_label everywhere.
#706
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
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.
|
tests/test_classification.py
Outdated
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can do that for consistency. Thanks guys!
tests/test_classification.py
Outdated
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).