-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC/CI: run doctests on travis #19952
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
Merged
jorisvandenbossche
merged 24 commits into
pandas-dev:master
from
jorisvandenbossche:doctests-travis
Aug 17, 2018
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f17747f
let doctest fail travis if they fail
jorisvandenbossche d24bbd2
remove check for building docs, we also want to test if docstrings ch…
jorisvandenbossche 47f7034
Add Series and DataFrame doctests
jorisvandenbossche 67f4ae8
try propagating exit value
jorisvandenbossche 5caf04b
move to separate file
jorisvandenbossche 2d4c6ac
Merge remote-tracking branch 'upstream/master' into doctests-travis
jorisvandenbossche 10cf824
add read functions
jorisvandenbossche 32f6d1c
run doctests on python 3.6 build
jorisvandenbossche 5833f86
ensure doctest collection does not fail
jorisvandenbossche 1d8e592
temp: check running all doctests on travis
jorisvandenbossche 3add36c
cummax giving core dump
jorisvandenbossche a65ee48
Merge remote-tracking branch 'upstream/master' into doctests-travis
jorisvandenbossche 9317d31
try
jorisvandenbossche 7845ea3
remove snippet that causes segfault
jorisvandenbossche 6cc5a96
Merge remote-tracking branch 'upstream/master' into doctests-travis
jorisvandenbossche 9837682
fix DataFrame docstring
jorisvandenbossche 5d468d2
test checking all frame docstrings with skipped ones
jorisvandenbossche 6826dcf
add series + generic
jorisvandenbossche 834c750
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
jorisvandenbossche c03c895
also skip xs
jorisvandenbossche d3d5a50
clean-up
jorisvandenbossche 4884f03
add short docs about testing/validating docstrings
jorisvandenbossche caa43f1
typo
jorisvandenbossche 25bc158
skip describe
jorisvandenbossche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
echo "inside $0" | ||
|
||
|
||
source activate pandas | ||
cd "$TRAVIS_BUILD_DIR" | ||
|
||
RET=0 | ||
|
||
if [ "$DOCTEST" ]; then | ||
|
||
echo "Running doctests" | ||
|
||
# running all doctests is not yet working | ||
# pytest --doctest-modules --ignore=pandas/tests -v pandas | ||
|
||
# if [ $? -ne "0" ]; then | ||
# RET=1 | ||
# fi | ||
|
||
# DataFrame / Series docstrings | ||
pytest --doctest-modules -v pandas/core/frame.py \ | ||
-k"-assign -axes -combine -isin -itertuples -join -nlargest -nsmallest -nunique -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack -to_dict -to_records -to_stata -transform" | ||
|
||
if [ $? -ne "0" ]; then | ||
RET=1 | ||
fi | ||
|
||
pytest --doctest-modules -v pandas/core/series.py \ | ||
-k"-agg -map -nlargest -nonzero -nsmallest -reindex -searchsorted -to_dict" | ||
|
||
if [ $? -ne "0" ]; then | ||
RET=1 | ||
fi | ||
|
||
pytest --doctest-modules -v pandas/core/generic.py \ | ||
-k"-_set_axis_name -_xs -describe -droplevel -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -resample -sample -to_json -to_xarray -transform -transpose -values -xs" | ||
|
||
if [ $? -ne "0" ]; then | ||
RET=1 | ||
fi | ||
|
||
# top-level reshaping functions | ||
pytest --doctest-modules -v \ | ||
pandas/core/reshape/concat.py \ | ||
pandas/core/reshape/pivot.py \ | ||
pandas/core/reshape/reshape.py \ | ||
pandas/core/reshape/tile.py \ | ||
-k"-crosstab -pivot_table -cut" | ||
|
||
if [ $? -ne "0" ]; then | ||
RET=1 | ||
fi | ||
|
||
else | ||
echo "NOT running doctests" | ||
fi | ||
|
||
exit $RET |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@datapythonista eventually we should rework the documentation guidelines to include more of sprint content like https://python-sprints.github.io/pandas/guide/pandas_pr.html, but for now added short section more clearly mentioning the validation script and that the doctests need to pass