-
Notifications
You must be signed in to change notification settings - Fork 94
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
[FIX] Cleanup ConfigSpace warnings #183
Conversation
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
+ Coverage 68.20% 68.22% +0.01%
==========================================
Files 18 18
Lines 1774 1775 +1
==========================================
+ Hits 1210 1211 +1
Misses 564 564
Continue to review full report at Codecov.
|
pp_connective = pyparsing.Word("||" + "&&") | ||
# A word matches each character as a set. So && is processed as & | ||
# https://pythonhosted.org/pyparsing/pyparsing.Word-class.html | ||
pp_connective = pyparsing.Word("|" + "&") |
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.
Shouldn't this be pyparsing.Literal
then?
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.
And the log
above, 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.
Thanks for the catch of log
. I have fixed that.
Leaving pp_connective = pyparsing.Word("|" + "&")
as it is was intentional, as this line assumes you will be checking for &
or |
not &|
.
I do not know much about pyparsing, but probably we can do some Combine
or And
to create this behaviour. In other words, if one just makes this literal this unit test fails.
Let me know how you want to proceed (that is re-writing the pyparsing statement or keeping the pyparsing.Word("|" + "&")
).
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.
That makes sense. Can you check whether there's a union of literals we could use here to rewrite this statement to check for either "??"
or "||"
?
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 thought it was gonna be more complicated, sorry about that. Let me know if this change is ok!
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.
The change looks good. There's no need to keep this simple, this should be used only very rarely anyways, so it can be slow...
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.
Looks good to me. Is this ready to be merged?
Yes, it is, thanks for taking a look. |
This PR aims to remove every warning from configspace (so we have a full green pytest run).
This is done by:
/home/chico/.local/lib/python3.8/site-packages/pyparsing.py:3190: FutureWarning: Possible set intersection at position 3