File tree 4 files changed +22
-2
lines changed
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 80
80
id : build
81
81
uses : ./.github/actions/build_pandas
82
82
83
+ - name : Check for no warnings when building single-page docs
84
+ run : ci/code_checks.sh single-docs
85
+ if : ${{ steps.build.outcome == 'success' }}
86
+
83
87
- name : Run checks on imported code
84
88
run : ci/code_checks.sh code
85
89
if : ${{ steps.build.outcome == 'success' }}
Original file line number Diff line number Diff line change 37
37
run : |
38
38
source activate pandas-dev
39
39
python web/pandas_web.py web/pandas --target-path=web/build
40
+
40
41
- name : Build documentation
41
42
run : |
42
43
source activate pandas-dev
Original file line number Diff line number Diff line change 12
12
# $ ./ci/code_checks.sh doctests # run doctests
13
13
# $ ./ci/code_checks.sh docstrings # validate docstring errors
14
14
# $ ./ci/code_checks.sh typing # run static type analysis
15
+ # $ ./ci/code_checks.sh single-docs # check single-page docs build warning-free
15
16
16
- [[ -z " $1 " || " $1 " == " code" || " $1 " == " doctests" || " $1 " == " docstrings" || " $1 " == " typing" ]] || \
17
+ [[ -z " $1 " || " $1 " == " code" || " $1 " == " doctests" || " $1 " == " docstrings" || " $1 " == " typing" || " $1 " == " single-docs " ]] || \
17
18
{ echo " Unknown command $1 . Usage: $0 [code|doctests|docstrings|typing]" ; exit 9999; }
18
19
19
20
BASE_DIR=" $( dirname $0 ) /.."
@@ -102,4 +103,11 @@ if [[ -z "$CHECK" || "$CHECK" == "typing" ]]; then
102
103
fi
103
104
fi
104
105
106
+ # ## SINGLE-PAGE DOCS ###
107
+ if [[ -z " $CHECK " || " $CHECK " == " single-docs" ]]; then
108
+ python doc/make.py --warnings-are-errors --single pandas.Series.value_counts
109
+ python doc/make.py --warnings-are-errors --single pandas.Series.str.split
110
+ python doc/make.py clean
111
+ fi
112
+
105
113
exit $RET
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ pandas documentation
26
26
easy-to-use data structures and data analysis tools for the `Python <https://www.python.org/>`__
27
27
programming language.
28
28
29
+ {% if not single_doc -%}
29
30
.. panels::
30
31
:card: + intro-card text-center
31
32
:column: col-lg-6 col-md-6 col-sm-6 col-xs-12 d-flex
@@ -96,16 +97,22 @@ programming language.
96
97
:text: To the development guide
97
98
:classes: btn-block btn-secondary stretched-link
98
99
99
-
100
+ {% endif %}
100
101
{% if single_doc and single_doc.endswith('.rst') -%}
101
102
.. toctree::
102
103
:maxdepth: 3
103
104
:titlesonly:
104
105
105
106
{{ single_doc[:-4] }}
107
+ {% elif single_doc and single_doc.count('.') <= 1 %}
108
+ .. autosummary::
109
+ :toctree: reference/api/
110
+
111
+ {{ single_doc }}
106
112
{% elif single_doc %}
107
113
.. autosummary::
108
114
:toctree: reference/api/
115
+ :template: autosummary/accessor_method.rst
109
116
110
117
{{ single_doc }}
111
118
{% else -%}
You can’t perform that action at this time.
0 commit comments