Skip to content
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

Trying to fix very minor error in ExB_drift.ipynb #1088

Merged
merged 7 commits into from
Mar 27, 2021

Conversation

pheuer
Copy link
Member

@pheuer pheuer commented Mar 26, 2021

Started getting a CI error related to the thumbnail in this notebook. Trying to fix it in this PR just by splitting up some cells.

The error:

/home/runner/work/PlasmaPy/PlasmaPy/docs/notebooks/ExB_drift.ipynb:"nbsphinx-thumbnail": Unsupported output type in cell 11/output 0: "stream"
ERROR: InvocationError for command /home/runner/work/PlasmaPy/PlasmaPy/.tox/build_docs/bin/sphinx-build docs docs/_build/html -W -b html (exited with code 2)

Relevant documentation: https://nbsphinx.readthedocs.io/en/latest/code-cells.html#Plots

@pheuer pheuer requested a review from rocco8773 March 26, 2021 18:55
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Mar 26, 2021
@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.91%. Comparing base (5eb8450) to head (76dbb1e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1088   +/-   ##
=======================================
  Coverage   96.91%   96.91%           
=======================================
  Files          70       70           
  Lines        6928     6928           
=======================================
  Hits         6714     6714           
  Misses        214      214           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pheuer
Copy link
Member Author

pheuer commented Mar 26, 2021

I think I found a solution. Whatever changed in nbsphinx seems to like

fig = plt.figure(figsize=(6, 6))
ax = fig.add_subplot(111, projection="3d")

more than

fig = plt.figure()
ax = fig.gca(projection="3d")

Probably only a problem when making 3D plots with matplotlib, which is why we aren't seeing this error everywhere?

Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works, it works! I don't think that's a nbsphinx issue; there have been no recent release there. Matplotlib, on the other hand, did release 3.4.0 just yesterday. They probably deprecated that, or some such? The gca syntax felt wonky, anyway, so thanks for this cleanup!

@StanczakDominik StanczakDominik removed the request for review from rocco8773 March 27, 2021 08:46
@StanczakDominik StanczakDominik enabled auto-merge (squash) March 27, 2021 08:47
@StanczakDominik StanczakDominik merged commit 5dd2547 into PlasmaPy:master Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants