Description
In some downloadable scripts from ReadTheDocs executable code is labeled as markdown and requires manual edits to be usefull. Some examples:
examples/how_to/assess_spotfindingresults.py
examples/how_to/plot_display.py
Steps/Code to Reproduce
make docs-html and open jupyter notebook examples from docs/source/gallery/how_to/
Expected Results
Downloadable scripts from ReadTheDocs should be easy to execute without intensive manual edits (removing # and indentations or copy and paste sections to new "code" cells in jupyter notebook).
Actual Results
Example of a section where code and markdown are one section.
|
################################################################################################### |
|
# Directly visualizing :py:class:`.SpotFindingResults` |
|
# ---------------------------------------------------- |
|
# You can convert the :py:class:`.SpotAttributes` from each round and channel of |
|
# :py:class:`.SpotFindingResults` to a numpy array and then use napari commands to display them |
|
# in your :code:`Viewer`. |
|
# |
|
# .. code-block:: python |
|
# |
|
# # save SpotAttributes for each (round,channel) as numpy array in list |
|
# spots_numpy = list() |
|
# for rnd in spots.round_labels: |
|
# for ch in spots.ch_labels: |
|
# spots_numpy.append(spots[{Axes.CH:ch, Axes.ROUND:rnd}].spot_attrs.data[['z', 'y', |
|
# 'x']].to_numpy()) |
|
# |
|
# # display found spots for each (round,channel) as a layer in napari |
|
# viewer = display(stack=imgs) |
|
# layer_index = 0 |
|
# for rnd in spots.round_labels: |
|
# for ch in spots.ch_labels: |
|
# viewer.add_points(data=spots_numpy[layer_index], symbol='ring', face_color='red', |
|
# size=5, name=f'r: {rnd}, ch: {ch}', visible=False) |
|
# layer_index = layer_index + 1 |
Description
In some downloadable scripts from ReadTheDocs executable code is labeled as markdown and requires manual edits to be usefull. Some examples:
examples/how_to/assess_spotfindingresults.pyexamples/how_to/plot_display.pySteps/Code to Reproduce
make docs-htmland open jupyter notebook examples fromdocs/source/gallery/how_to/Expected Results
Downloadable scripts from ReadTheDocs should be easy to execute without intensive manual edits (removing
#and indentations or copy and paste sections to new "code" cells in jupyter notebook).Actual Results
Example of a section where code and markdown are one section.
starfish/examples/how_to/plot_display.py
Lines 113 to 136 in 991aded