Skip to content

Commit

Permalink
Move examples back out of docs tree
Browse files Browse the repository at this point in the history
This interfered with doctests collection, running
the examples during the collection,
which, since they are not modules but scripts, blocked it.

Also added git and sphinx build dirs to pytest ignore directories.
  • Loading branch information
maxnoe committed Sep 11, 2023
1 parent 1c56a3e commit 6fb72e8
Show file tree
Hide file tree
Showing 30 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.pytest_cache
*.log

Expand Down Expand Up @@ -27,6 +26,7 @@ MANIFEST
# Sphinx
docs/api
docs/_build
docs/auto_examples

# Editors and IDEs

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

sphinx_gallery_conf = {
"examples_dirs": [
"user-guide/examples",
"../examples",
], # path to your example scripts
"subsection_order": ExplicitOrder(
[
"user-guide/examples/tutorials",
"user-guide/examples/algorithms",
"user-guide/examples/core",
"user-guide/examples/visualization",
"../examples/tutorials",
"../examples/algorithms",
"../examples/core",
"../examples/visualization",
]
),
"within_subsection_order": FileNameSortKey,
Expand Down
1 change: 0 additions & 1 deletion docs/user-guide/examples/index.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/user-guide/examples_tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../auto_examples/index.rst
2 changes: 1 addition & 1 deletion docs/user-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ User Guide
getting-started
tools
data_models/index
examples/index
examples_tutorials
FAQ
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ filterwarnings = [
"error::astropy.utils.exceptions.AstropyDeprecationWarning",
"error::ctapipe.utils.deprecation.CTAPipeDeprecationWarning",
]
norecursedirs = [
".git",
"_build",
"auto_examples",
]

[tool.towncrier]
package = "ctapipe"
Expand Down

0 comments on commit 6fb72e8

Please sign in to comment.