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

Notebook %psource magic command not displaying #2101

Open
ivanistheone opened this issue Jan 20, 2024 · 1 comment
Open

Notebook %psource magic command not displaying #2101

ivanistheone opened this issue Jan 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ivanistheone
Copy link

ivanistheone commented Jan 20, 2024

Describe the bug

context
I'm using the %psource magic command to display the source code of a helper function, but the output doesn't show up in the .html build of this notebook.

expectation
I expected the source to be printed below just like in JupyuterLab:
Screen Shot 2024-01-20 at 10 30 00 AM

bug
But instead nothign appears below the cell:

Screen Shot 2024-01-20 at 10 30 23 AM

see online version here: https://nobsstats.com/examples/one_sample_t-test.html#p-value-calculation

problem
This is a problem for people trying to use magic commands as part of educational notebooks.
I'm a big fan of %pdef and %psource and I want students to learn to use these powerful tools.

Reproduce the bug

  1. Create notebook that uses %psource command
  2. Use jupyter-book build . to build html
  3. Inspect the notebook html built version

List your environment

I'm on mac running Python 3.9.4

jupyter-book --version
Jupyter Book      : 0.13.2
External ToC      : 0.3.1
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.2
Sphinx Book Theme : 0.3.3
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.13
@ivanistheone ivanistheone added the bug Something isn't working label Jan 20, 2024
Copy link

welcome bot commented Jan 20, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@ivanistheone ivanistheone changed the title Notebook magic commands not displaying Notebook %psource magic command not displaying Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant