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

Remove or move examples to documentation #2266

Merged
merged 22 commits into from
Mar 30, 2023
Merged

Remove or move examples to documentation #2266

merged 22 commits into from
Mar 30, 2023

Conversation

kosack
Copy link
Contributor

@kosack kosack commented Feb 23, 2023

fixes #931
fixes #657

  • improved the CameraDisplay and ArrayDisplay example notebooks in the docs
  • moved some code from the old examples into notebook
  • removed all old script examples

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

docs/examples/camera_display.ipynb Show resolved Hide resolved
docs/examples/camera_display.ipynb Show resolved Hide resolved
docs/examples/camera_display.ipynb Show resolved Hide resolved
docs/examples/camera_display.ipynb Show resolved Hide resolved
@maxnoe maxnoe linked an issue Mar 1, 2023 that may be closed by this pull request
@kosack kosack marked this pull request as ready for review March 2, 2023 17:02
@kosack
Copy link
Contributor Author

kosack commented Mar 2, 2023

Note that this is only a first step to cleaning up the example and tutorial notebooks. The intention here is not to fix all of them, but just to remove the script example and make sure anything interesting in them was moved to the notebooks. There will have to be a more complete overhaul of the documentation notebooks at a future point, as they are missing a large amount of information and contain some outdated practices.

@maxnoe
Copy link
Member

maxnoe commented Mar 3, 2023

Some errors in the docs build, seems like a spurious space?

 /home/runner/work/ctapipe/ctapipe/docs/ctapipe_api/coordinates/index.rst:41: WARNING: [Errno 2] No such file or directory: '/home/runner/work/ctapipe/ctapipe/docs/../ctapipe_api/coordinates/plot_camera_frames.py'
/home/runner/work/ctapipe/ctapipe/docs/ctapipe_api/visualization/index.rst:26: WARNING: [Errno 2] No such file or directory: '/home/runner/work/ctapipe/ctapipe/docs/../examples/plot_hillas_parameters.py'
/home/runner/work/ctapipe/ctapipe/docs/examples/index.rst:18: WARNING: toctree contains reference to nonexisting document 'examples/ camera_display'
/home/runner/work/ctapipe/ctapipe/docs/examples/index.rst:18: WARNING: toctree contains reference to nonexisting document 'examples/ array_display'
/home/runner/work/ctapipe/ctapipe/docs/examples/index.rst:18: WARNING: toctree contains reference to nonexisting document 'examples/ shower_core'
looking for now-outdated files... none found
pickling environment... done
/home/runner/work/ctapipe/ctapipe/docs/examples/array_display.ipynb: WARNING: document isn't included in any toctree
/home/runner/work/ctapipe/ctapipe/docs/examples/camera_display.ipynb: WARNING: document isn't included in any toctree
/home/runner/work/ctapipe/ctapipe/docs/examples/shower_core.ipynb: WARNING: document isn't included in any toctree
checking consistency... done
preparing documents... done
writing output... [ 14%] api/ctapipe.atmosphere.AtmosphereDensityProfile .. api/ctapipe.coordinates.EastingNorthingFrame
writing output... [ 28%] api/ctapipe.coordinates.EngineeringCameraFrame .. api/ctapipe.core.traits.Unicode
writing output... [ 42%] api/ctapipe.core.traits.classes_with_traits .. api/ctapipe.image.largest_island
writing output... [ 57%] api/ctapipe.image.leakage_parameters .. api/ctapipe.instrument.camera.geometry.UnknownPixelShapeWarning
writing output... [ 71%] api/ctapipe.instrument.camera.readout.CameraReadout .. api/ctapipe.reco.reconstructor.Reconstructor
../CHANGES.rst:24: WARNING: py:obj reference target not found: examples/

Tobychev
Tobychev previously approved these changes Mar 7, 2023
@maxnoe
Copy link
Member

maxnoe commented Mar 28, 2023

Looks good, my only comment would be if we really need both the ArrayDisplay noteboko and the ShowerCore notebook, both deal with the ArrayDisplay, right? Maybe join them?

@kosack
Copy link
Contributor Author

kosack commented Mar 29, 2023

Looks good, my only comment would be if we really need both the ArrayDisplay noteboko and the ShowerCore notebook, both deal with the ArrayDisplay, right? Maybe join them?

Done

@kosack kosack requested a review from Tobychev March 29, 2023 12:19
maxnoe
maxnoe previously approved these changes Mar 29, 2023
Copy link
Member

@maxnoe maxnoe left a comment

Choose a reason for hiding this comment

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

I think it makes sense to pin nbsphinx to 0.8 as part of this PR to have the notebooks render correctly with our old sphinx version.

nbsphinx~=0.8.12 in setup.cfg and nbsphinx >=0.8.12,<0.9 in environment.yaml`

@maxnoe
Copy link
Member

maxnoe commented Mar 29, 2023

I added the pin. @Tobychev Could you approve again?

@maxnoe maxnoe added this to the v0.19.0 milestone Mar 30, 2023
@maxnoe maxnoe merged commit 53ee8cd into main Mar 30, 2023
@maxnoe maxnoe deleted the remove_examples branch March 30, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

untested examples? Cleanup and structure examples
3 participants