You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
The reason will be displayed to describe this comment to others. Learn more.
@fedorov, beats me. Did you run flake8 as flake8 .? Moreover, I can see that it is indeed failing on Linux and Windows, but not on macOS, which seems strange to me as wel. Let met checkout the latest master and take a look at it.
The reason will be displayed to describe this comment to others. Learn more.
@fedorov I reviewed the flake8 errors, and fixed it by adding 504 to the ignore list. It now passes the build. W504 is the line break, which we require to adhere to the max line length (in GLCM). Still, I updated the lines in your labs script to keep it more on a single line, using formatters and such)
As to the W605 warnings you were getting, they were entirely valid. The trick in python is that if you want to define a string which has escape characters, such as a pattern string for regex or a docstring with escapes for math, you need to specify the string as a raw-string (by prepending an r). Otherwise python tries to resolve the escapes (intended for e.g. adding a newline character in a single line string).
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I did not investigate this since I could not reproduce the flake errors on my machine. As I mentioned earlier, there were no errors reported when I ran flake8 locally from the pyradiomics directory with the pyradiomics flake8 settings.
41000f5
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.
@JoostJM do you know why the errors on CI are not detected with flake8 run locally (from the root of the pyradiomics repo)?
41000f5
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.
@fedorov, beats me. Did you run flake8 as
flake8 .
? Moreover, I can see that it is indeed failing on Linux and Windows, but not on macOS, which seems strange to me as wel. Let met checkout the latest master and take a look at it.41000f5
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.
Yes - no issues on my mac with the current master!
@jcfr, since this involves scikit-ci - including you FYI.
41000f5
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.
Further details - I tested locally with python 3.5.3.
41000f5
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.
Since the dependencies are not installed with
-U
, I suspect there are cached and an older version of flake8 is used. See https://github.com/Radiomics/pyradiomics/blob/master/scikit-ci.yml#L36-L37Two options to mitigate:
-U
to install dependencies41000f5
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.
@fedorov I reviewed the flake8 errors, and fixed it by adding 504 to the ignore list. It now passes the build. W504 is the line break, which we require to adhere to the max line length (in GLCM). Still, I updated the lines in your labs script to keep it more on a single line, using formatters and such)
As to the W605 warnings you were getting, they were entirely valid. The trick in python is that if you want to define a string which has escape characters, such as a pattern string for regex or a docstring with escapes for math, you need to specify the string as a raw-string (by prepending an
r
). Otherwise python tries to resolve the escapes (intended for e.g. adding a newline character in a single line string).41000f5
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! I did not investigate this since I could not reproduce the flake errors on my machine. As I mentioned earlier, there were no errors reported when I ran
flake8
locally from the pyradiomics directory with the pyradiomics flake8 settings.