Skip to content

Commit

Permalink
move examples to user-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
StFroese committed Sep 8, 2023
1 parent c6662cd commit 743ee40
Show file tree
Hide file tree
Showing 27 changed files with 24 additions and 22 deletions.
13 changes: 8 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ help:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile examples
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

examples:
mkdir -p user-guide/examples

clean:
rm -rf api
rm -rf user-guide/examples
rm -rf user-guide/examples/*.zip
rm -rf user-guide/examples/*.rst
rm -rf user-guide/examples/*/*.ipynb
rm -rf user-guide/examples/*/*.py.md5
rm -rf user-guide/examples/*/*.pickle
rm -rf user-guide/examples/*/*.rst
rm -rf user-guide/examples/*/images
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


Expand Down
17 changes: 8 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,22 @@ def setup(app):

sphinx_gallery_conf = {
"examples_dirs": [
"../examples/examples",
"user-guide/examples",
], # path to your example scripts
"gallery_dirs": [
"user-guide/examples",
], # path to where to save gallery generated output
"subsection_order": ExplicitOrder(
[
"../examples/examples/algorithms",
"../examples/examples/core",
"../examples/examples/visualization",
"../examples/examples/tutorials",
"user-guide/examples/tutorials",
"user-guide/examples/algorithms",
"user-guide/examples/core",
"user-guide/examples/visualization",
]
),
"within_subsection_order": FileNameSortKey,
"nested_sections": False,
"copyfile_regex": r"index.rst|.*\.png|.*\.json",
# "copyfile_regex": r".*\.rst|.*\.png|.*\.json",
"filename_pattern": r".*\.py",
"promote_jupyter_magic": True,
"line_numbers": True,
Expand Down Expand Up @@ -229,8 +229,7 @@ def setup(app):
"changes",
"user-guide/examples/*/*.ipynb",
"user-guide/examples/*/*.py",
"user-guide/tutorials/*.ipynb",
"user-guide/tutorials/*.py",
"user-guide/examples/*/README.rst",
]

# The name of the Pygments (syntax highlighting) style to use.
Expand All @@ -245,7 +244,7 @@ def setup(app):
# Define the json_url for our version switcher.
json_url = "https://ctapipe.readthedocs.io/en/latest/_static/switcher.json"

# Define the version we use for matching in the version switcher.
# Define the version we use for matching in the version switcher.,
version_match = os.getenv("READTHEDOCS_VERSION")
# If READTHEDOCS_VERSION doesn't exist, we're not on RTD
# If it is an integer, we're in a PR build and the version isn't correct.
Expand Down
6 changes: 6 additions & 0 deletions docs/user-guide/examples/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _tutorials_and_examples_gallery:

Tutorials and Examples gallery
==============================

This gallery provides an overview of different ctapipe modules and how to use them.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _tutorials_gallery:
.. _tutorials:

Tutorials gallery
Tutorials
=================

This gallery contains different tutorials of different use cases for ctapipe.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions examples/examples/README.txt

This file was deleted.

0 comments on commit 743ee40

Please sign in to comment.