Skip to content

CI: Show ipython directive errors #36863

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
merged 3 commits into from
Oct 6, 2020
Merged

CI: Show ipython directive errors #36863

merged 3 commits into from
Oct 6, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Oct 4, 2020

Current output of ipython directive errors in CI is essentially a blank line, so adding a bit more to try to show what error is happening.

(pandas-dev) ➜  ~ grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log

<<<-------------------------------------------------------------------------

vs.

(pandas-dev) ➜  ~ grep -B10 "^<<<-------------------------------------------------------------------------$" sphinx.log


>>>-------------------------------------------------------------------------
Exception in /Users/danielsaxton/pandas/doc/source/user_guide/enhancingperf.rst at block ending on line 834
Specify :okexcept: as an option in the ipython:: block to suppress this message
  File "<ipython-input-66-d3ab2b9618fd>", line 1
    df.query("strings == "a" and nums == 1")
                          ^
SyntaxError: invalid syntax

<<<-------------------------------------------------------------------------

@dsaxton dsaxton added Docs CI Continuous Integration labels Oct 4, 2020
@jreback
Copy link
Contributor

jreback commented Oct 5, 2020

ok so this is a go-forward better error message? if that is the case lgtm.

@jreback jreback added this to the 1.2 milestone Oct 5, 2020
@dsaxton
Copy link
Member Author

dsaxton commented Oct 5, 2020

ok so this is a go-forward better error message? if that is the case lgtm.

Yeah, saw a PR that failed this check but had to do a lot more digging to figure out what was wrong. I figure this makes it easier (ten lines is arbitrary, but should be fine usually).

@jreback
Copy link
Contributor

jreback commented Oct 5, 2020

ok merge away

@dsaxton dsaxton merged commit 8c1b2d3 into pandas-dev:master Oct 6, 2020
@dsaxton dsaxton deleted the show-ipython-directive-errors branch October 6, 2020 00:07
jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this pull request Oct 13, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants