|
16 | 16 |
|
17 | 17 | set -uo pipefail
|
18 | 18 |
|
19 |
| -[[ -z "$1" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "single-docs" || "$1" == "notebooks" ]] || \ |
| 19 | +if [[ -v 1 ]]; then |
| 20 | + CHECK=$1 |
| 21 | +else |
| 22 | + # script will fail if it uses an unset variable (i.e. $1 is not provided) |
| 23 | + CHECK="" |
| 24 | +fi |
| 25 | + |
| 26 | +[[ -z "$CHECK" || "$CHECK" == "code" || "$CHECK" == "doctests" || "$CHECK" == "docstrings" || "$CHECK" == "single-docs" || "$CHECK" == "notebooks" ]] || \ |
20 | 27 | { echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 9999; }
|
21 | 28 |
|
22 | 29 | BASE_DIR="$(dirname $0)/.."
|
23 | 30 | RET=0
|
24 |
| -CHECK=$1 |
25 | 31 |
|
26 | 32 | ### CODE ###
|
27 | 33 | if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then
|
|
59 | 65 | ### DOCSTRINGS ###
|
60 | 66 | if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
|
61 | 67 |
|
62 |
| - MSG='Validate docstrings (EX01, EX02, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG |
63 |
| - $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX02,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06 |
| 68 | + MSG='Validate docstrings (EX01, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG |
| 69 | + $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06 |
64 | 70 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
65 | 71 |
|
66 | 72 | MSG='Partially validate docstrings (EX03)' ; echo $MSG
|
67 | 73 | $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
|
68 |
| - pandas.Series.dt.day_name \ |
69 |
| - pandas.Series.str.len \ |
70 |
| - pandas.Series.cat.set_categories \ |
71 |
| - pandas.Series.plot.bar \ |
72 |
| - pandas.Series.plot.hist \ |
73 | 74 | pandas.Series.plot.line \
|
74 | 75 | pandas.Series.to_sql \
|
75 |
| - pandas.Series.to_latex \ |
76 |
| - pandas.errors.CategoricalConversionWarning \ |
77 |
| - pandas.errors.ChainedAssignmentError \ |
78 |
| - pandas.errors.ClosedFileError \ |
79 |
| - pandas.errors.DatabaseError \ |
80 |
| - pandas.errors.IndexingError \ |
81 |
| - pandas.errors.InvalidColumnName \ |
82 |
| - pandas.errors.NumExprClobberingError \ |
83 |
| - pandas.errors.PossibleDataLossError \ |
84 |
| - pandas.errors.PossiblePrecisionLoss \ |
85 |
| - pandas.errors.SettingWithCopyError \ |
86 | 76 | pandas.errors.SettingWithCopyWarning \
|
87 | 77 | pandas.errors.SpecificationError \
|
88 | 78 | pandas.errors.UndefinedVariableError \
|
89 |
| - pandas.errors.ValueLabelTypeMismatch \ |
90 |
| - pandas.Timestamp.ceil \ |
91 |
| - pandas.Timestamp.floor \ |
92 |
| - pandas.Timestamp.round \ |
93 |
| - pandas.read_pickle \ |
94 |
| - pandas.ExcelWriter \ |
95 | 79 | pandas.read_json \
|
96 |
| - pandas.io.json.build_table_schema \ |
97 |
| - pandas.DataFrame.to_latex \ |
98 | 80 | pandas.io.formats.style.Styler.to_latex \
|
99 | 81 | pandas.read_parquet \
|
100 | 82 | pandas.DataFrame.to_sql \
|
101 |
| - pandas.read_stata \ |
102 |
| - pandas.core.resample.Resampler.pipe \ |
103 |
| - pandas.core.resample.Resampler.fillna \ |
104 |
| - pandas.core.resample.Resampler.interpolate \ |
105 |
| - pandas.plotting.scatter_matrix \ |
106 |
| - pandas.pivot \ |
107 |
| - pandas.merge_asof \ |
108 |
| - pandas.wide_to_long \ |
109 |
| - pandas.Index.rename \ |
110 |
| - pandas.Index.droplevel \ |
111 |
| - pandas.Index.isin \ |
112 |
| - pandas.CategoricalIndex.set_categories \ |
113 |
| - pandas.MultiIndex.names \ |
114 |
| - pandas.MultiIndex.droplevel \ |
115 |
| - pandas.IndexSlice \ |
116 |
| - pandas.DatetimeIndex.month_name \ |
117 |
| - pandas.DatetimeIndex.day_name \ |
118 |
| - pandas.core.window.rolling.Rolling.corr \ |
119 |
| - pandas.Grouper \ |
120 |
| - pandas.core.groupby.SeriesGroupBy.apply \ |
121 |
| - pandas.core.groupby.DataFrameGroupBy.apply \ |
122 |
| - pandas.core.groupby.SeriesGroupBy.transform \ |
123 |
| - pandas.core.groupby.SeriesGroupBy.pipe \ |
124 |
| - pandas.core.groupby.DataFrameGroupBy.pipe \ |
125 |
| - pandas.core.groupby.DataFrameGroupBy.describe \ |
126 |
| - pandas.core.groupby.DataFrameGroupBy.idxmax \ |
127 |
| - pandas.core.groupby.DataFrameGroupBy.idxmin \ |
128 |
| - pandas.core.groupby.DataFrameGroupBy.value_counts \ |
129 |
| - pandas.core.groupby.SeriesGroupBy.describe \ |
130 |
| - pandas.core.groupby.DataFrameGroupBy.boxplot \ |
131 |
| - pandas.core.groupby.DataFrameGroupBy.hist \ |
132 | 83 | pandas.io.formats.style.Styler.map \
|
133 | 84 | pandas.io.formats.style.Styler.apply_index \
|
134 | 85 | pandas.io.formats.style.Styler.map_index \
|
135 | 86 | pandas.io.formats.style.Styler.format \
|
136 |
| - pandas.io.formats.style.Styler.format_index \ |
137 |
| - pandas.io.formats.style.Styler.relabel_index \ |
138 |
| - pandas.io.formats.style.Styler.hide \ |
139 |
| - pandas.io.formats.style.Styler.set_td_classes \ |
140 |
| - pandas.io.formats.style.Styler.set_tooltips \ |
141 |
| - pandas.io.formats.style.Styler.set_uuid \ |
142 |
| - pandas.io.formats.style.Styler.pipe \ |
143 |
| - pandas.io.formats.style.Styler.highlight_between \ |
144 | 87 | pandas.io.formats.style.Styler.highlight_quantile \
|
145 | 88 | pandas.io.formats.style.Styler.background_gradient \
|
146 |
| - pandas.io.formats.style.Styler.text_gradient \ |
147 |
| - pandas.DataFrame.values \ |
148 |
| - pandas.DataFrame.loc \ |
149 |
| - pandas.DataFrame.iloc \ |
150 |
| - pandas.DataFrame.groupby \ |
151 |
| - pandas.DataFrame.describe \ |
152 |
| - pandas.DataFrame.skew \ |
153 |
| - pandas.DataFrame.var \ |
154 |
| - pandas.DataFrame.idxmax \ |
155 |
| - pandas.DataFrame.idxmin \ |
156 |
| - pandas.DataFrame.last \ |
157 |
| - pandas.DataFrame.pivot \ |
158 |
| - pandas.DataFrame.sort_values \ |
159 |
| - pandas.DataFrame.tz_convert \ |
160 |
| - pandas.DataFrame.tz_localize \ |
161 |
| - pandas.DataFrame.plot.bar \ |
162 |
| - pandas.DataFrame.plot.hexbin \ |
163 |
| - pandas.DataFrame.plot.hist \ |
164 |
| - pandas.DataFrame.plot.line \ |
165 |
| - pandas.DataFrame.hist \ |
| 89 | + pandas.io.formats.style.Styler.text_gradient |
166 | 90 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
167 | 91 |
|
168 | 92 | fi
|
|
0 commit comments