jb-nbdev

A test to see how nbdev might use JupyterBook. Generated by nbs/index.ipynb

This is a test to see how nbdev might work with JupyterBook.

Cell Display

Hiding Cells

#hide can be used to hide an entire cell.

#hide-input can be used to only hide the input.

you should only see the cell output b/c the input is hidden

#hide-output can be used to only hide the output.

#hide-output
print('you should only see the input b/c the output is hidden.')

Collapsing Cells

  • Placing #collapse_input in a code cell will include your code in a collapsable element that is closed by default. For example:

#collapse_input
print('The code cell that produced this output is collapsed by default but you can expand it!')
The code cell that produced this output is collapsed by default but you can expand it!
  • Placing #collapse_output in a code cell will hide the output under a collapsable element that is closed by default.

#collapse_output
print('The input of this cell is visible as usual.\nHowever, the OUTPUT of this cell is collapsed by default but you can expand it!')
The input of this cell is visible as usual.
However, the OUTPUT of this cell is collapsed by default but you can expand it!

Showing Pictures

The below is a screenshot:

_images/att_00000.png

The above picture is embeddded with HTML:

<img width="400px" src="images/att_00000.png" class="bg-primary">

But you can also use markdown or MyST.

ShowDoc

Lets see what happens to show doc.

def func(param1=True, param2='foo'):
    """This func tests how show_doc renders signatures."""
    ...

func[source]

func(param1=True, param2='foo')

This func tests how show_doc renders signatures.