-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
CI: Linting with azure instead of travis #22854
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
Changes from 1 commit
46620f2
dc8c528
adeb0ca
dcfb203
b765df8
3c77fc9
3d8af7d
ed1064d
8cb7b0f
dee5a08
54f9e98
20cb360
50d2757
19a213c
0cf5da9
4d10702
a356f03
50cb867
091193c
4a2ddba
e7c276a
8f73c08
87b5048
dc2e3a6
5ab03ab
ca9e12a
c591a17
c671da5
a6eed3e
3b853f9
850202d
a896532
bed55be
e555ce0
101f7f3
fce22e6
167f6dc
d44f189
906da22
9fb3999
c72c0e5
de1f52f
e4aa371
f33b6e6
63cfd5b
eb558df
371f06e
ca6e910
d262a04
fc4574c
168ec55
2f1b270
798698d
a3f601c
5ea21c6
46d281c
faf49e9
fa4f16c
c05f6b7
9162aeb
5640907
0286099
629a209
588d153
bc9c3b3
324b1e2
5bf1709
7cf2d68
2f8441e
30ba23e
85172b3
450f84a
7b4b1ea
5d69e8b
3ce1aa0
ee01df4
e353e8a
92a3921
9e34037
5a82f59
6cbb31b
2617696
75ad473
7af04e1
cc4331c
c5df401
4eac8bb
00032d1
e9ab754
e47b4e1
d0d4ae1
a225d44
d6d5c66
f7a6048
9aa18d0
283233d
991304d
3a71185
19c396f
a69e667
59d55d8
df50c58
455e77c
7f48ac2
078a987
d7883a1
c2be491
910825a
35c7d99
d321a42
4328b04
4c57f48
497f032
c88911a
75b89eb
011950e
01942b9
0a14165
705eb9d
498cebb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…tion, which runs the task, but doesn't change the outcome of the build
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,43 +35,32 @@ jobs: | |
architecture: 'x64' | ||
- script: python -m pip install flake8 | ||
displayName: 'Installing flake8' | ||
continueOnError: 'false' | ||
# We're ignoring the following codes across the board | ||
#E402, # module level import not at top of file | ||
#E731, # do not assign a lambda expression, use a def | ||
#E741, # do not use variables named 'l', 'O', or 'I' | ||
#W503, # line break before binary operator | ||
#C406, # Unnecessary (list/tuple) literal - rewrite as a dict literal. | ||
#C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal. | ||
#C409, # Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal). | ||
#C410 # Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal). | ||
|
||
# pandas/_libs/src is C code, so no need to search there. | ||
- script: flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C406,C408,C409,E402,E731,E741,W503 | ||
- script: flake8 pandas --exclude pandas/_libs/src | ||
displayName: 'Linting *.py code' | ||
continueOnError: 'true' | ||
- script: flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 | ||
displayName: 'Linting *.pyx code' | ||
continueOnError: true | ||
- script: flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403 | ||
displayName: 'Linting *.pxd and *.pxi.in' | ||
continueOnError: 'true' | ||
- script: flake8 setup.py --ignore=E402,E731,E741,W503 | ||
condition: true | ||
- script: flake8 setup.py | ||
displayName: 'Linting setup.py' | ||
continueOnError: 'true' | ||
- script: flake8 scripts --filename=*.py --ignore=C408,E402,E731,E741,W503 | ||
condition: true | ||
- script: flake8 scripts | ||
displayName: 'Linting scripts' | ||
continueOnError: 'true' | ||
- script: flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/*.py --ignore=F811,C406,C408,C409,C410 | ||
condition: true | ||
- script: flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/*.py | ||
displayName: 'Linting asv benchmarks' | ||
continueOnError: 'true' | ||
- script: flake8 doc/make.py doc/source/conf.py --ignore=E402,E731,E741,W503 | ||
condition: true | ||
- script: flake8 doc/make.py doc/source/conf.py | ||
displayName: 'Linting doc scripts' | ||
continueOnError: 'true' | ||
condition: true | ||
- script: flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 | ||
displayName: 'Linting *.pyx code' | ||
condition: true | ||
- script: flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403 | ||
displayName: 'Linting *.pxd and *.pxi.in' | ||
condition: true | ||
|
||
- script: python -m pip install cpplint | ||
displayName: 'Installing cpplint' | ||
continueOnError: 'false' | ||
condition: true | ||
# readability/casting: Warnings about C casting instead of C++ casting | ||
# runtime/int: Warnings about using C number types instead of C++ ones | ||
# build/include_subdir: Warnings about prefacing included header files with directory | ||
|
@@ -89,6 +78,7 @@ jobs: | |
pandas/_libs/src/parser pandas/_libs/ujson | ||
pandas/_libs/tslibs/src/datetime | ||
displayName: 'Linting *.c and *.h' | ||
condition: true | ||
|
||
- job: 'Checks' | ||
continueOnError: 'true' # XXX this doesn't seem to be working, specifying in each step | ||
|
@@ -102,27 +92,27 @@ jobs: | |
# Check for imports from pandas.core.common instead of `import pandas.core.common as com` | ||
- script: grep -R --include="*.py*" -E "from pandas.core.common import " pandas ; [ $? != 0 ] | ||
displayName: 'Check for non-standard imports' | ||
continueOnError: 'true' | ||
condition: true | ||
- script: grep -r -E --include '*.py' 'pytest\.warns' pandas/tests/ ; [ $? != 0 ] | ||
displayName: 'Check for pytest warns' | ||
continueOnError: 'true' | ||
condition: true | ||
# Check for the following code in testing: `np.testing` and `np.array_equal` | ||
- script: grep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/ ; [ $? != 0 ] | ||
displayName: 'Check for invalid testing' | ||
continueOnError: 'true' | ||
condition: true | ||
# Check for the following code in the extension array base tests: `tm.assert_frame_equal` and `tm.assert_series_equal` | ||
- script: grep -r -E --include '*.py' --exclude base.py 'tm.assert_(series|frame)_equal' pandas/tests/extension/base ; [ $? != 0 ] | ||
displayName: 'Check for invalid EA testing' | ||
continueOnError: 'true' | ||
condition: true | ||
- script: grep -R --include="*.py" --include="*.pyx" -E "(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)" pandas ; [ $? != 0 ] | ||
displayName: 'Check for deprecated messages without sphinx directive' | ||
continueOnError: 'true' | ||
condition: true | ||
- script: grep -R --include="*.py" -E "class\s\S*[^)]:" pandas scripts ; [ $? != 0 ] | ||
displayName: 'Check for old-style classes' | ||
continueOnError: 'true' | ||
condition: true | ||
- script: grep -R --include="*.rst" -E "[a-zA-Z0-9]\`\`?[a-zA-Z0-9]" doc/source/ ; [ $? != 0 ] | ||
displayName: 'Check for backticks incorrectly rendering because of missing spaces' | ||
continueOnError: 'true' | ||
condition: true | ||
# TODO SPHINX_DIRECTIVES should be defined as a variable, as it was in lint.sh. Not | ||
# sure yet how to define variables with the output of a sctipt, will take care of it later | ||
# SPHINX_DIRECTIVES=$(echo \ | ||
|
@@ -136,3 +126,4 @@ jobs: | |
./doc/source | ||
; [ $? != 0 ] | ||
displayName: 'Check for incorrect sphinx directives' | ||
condition: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you add running benchmarks when the original issue was just to migrate Also, as your changes did not actually modify any Python benchmark code, it was not possible to review how it would look in the Azure logs. This log here from another PR (#23752) is unfortunately impossible to read: https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=4580 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, it's somewhat debatable as to whether we even want to just run benchmarks when there's only a diff in |
Uh oh!
There was an error while loading. Please reload this page.
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.
Hmm...IMO, I think running doctests should be a separate build entirely from linting. They are two semantically different things, and the separation would allow us to provide more semantically clear display names such as "Doctests" and "Linting" instead of the slightly vaguer mashup of "Checks_and_doc".
Uh oh!
There was an error while loading. Please reload this page.
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 see there was a concern about not having to use an extra build for this due to resource constraints (the conversation is a very long in this PR...)? However, I'm not sure I fully understand...
Also, based on the conversation, are the
master
docs no longer being published on https://pandas-docs.github.io/pandas-docs-travis? In which case, we need to update theGITHUB_ISSUE
template that we have here.