|
11 | 11 | # Usage: |
12 | 12 | # $ ./ci/code_checks.sh # run all checks |
13 | 13 | # $ ./ci/code_checks.sh lint # run linting only |
14 | | -# $ ./ci/code_checks.sh patterns # check for patterns that should not exist |
15 | 14 | # $ ./ci/code_checks.sh code # checks on imported code |
16 | 15 | # $ ./ci/code_checks.sh doctests # run doctests |
17 | 16 | # $ ./ci/code_checks.sh docstrings # validate docstring errors |
18 | 17 | # $ ./ci/code_checks.sh typing # run static type analysis |
19 | 18 |
|
20 | | -[[ -z "$1" || "$1" == "lint" || "$1" == "patterns" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "typing" ]] || \ |
21 | | - { echo "Unknown command $1. Usage: $0 [lint|patterns|code|doctests|docstrings|typing]"; exit 9999; } |
| 19 | +[[ -z "$1" || "$1" == "lint" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "typing" ]] || \ |
| 20 | + { echo "Unknown command $1. Usage: $0 [lint|code|doctests|docstrings|typing]"; exit 9999; } |
22 | 21 |
|
23 | 22 | BASE_DIR="$(dirname $0)/.." |
24 | 23 | RET=0 |
@@ -58,28 +57,6 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then |
58 | 57 |
|
59 | 58 | fi |
60 | 59 |
|
61 | | -### PATTERNS ### |
62 | | -if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then |
63 | | - |
64 | | - # Check for the following code in the extension array base tests: `tm.assert_frame_equal` and `tm.assert_series_equal` |
65 | | - MSG='Check for invalid EA testing' ; echo $MSG |
66 | | - invgrep -r -E --include '*.py' --exclude base.py 'tm.assert_(series|frame)_equal' pandas/tests/extension/base |
67 | | - RET=$(($RET + $?)) ; echo $MSG "DONE" |
68 | | - |
69 | | - MSG='Check for deprecated messages without sphinx directive' ; echo $MSG |
70 | | - invgrep -R --include="*.py" --include="*.pyx" -E "(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)" pandas |
71 | | - RET=$(($RET + $?)) ; echo $MSG "DONE" |
72 | | - |
73 | | - MSG='Check for backticks incorrectly rendering because of missing spaces' ; echo $MSG |
74 | | - invgrep -R --include="*.rst" -E "[a-zA-Z0-9]\`\`?[a-zA-Z0-9]" doc/source/ |
75 | | - RET=$(($RET + $?)) ; echo $MSG "DONE" |
76 | | - |
77 | | - MSG='Check for unnecessary random seeds in asv benchmarks' ; echo $MSG |
78 | | - invgrep -R --exclude pandas_vb_common.py -E 'np.random.seed' asv_bench/benchmarks/ |
79 | | - RET=$(($RET + $?)) ; echo $MSG "DONE" |
80 | | - |
81 | | -fi |
82 | | - |
83 | 60 | ### CODE ### |
84 | 61 | if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then |
85 | 62 |
|
|
0 commit comments