I’m generating documentation with Sphinx for project with structure like this :
JavaScript
x
10
10
1
+ project
2
|
3
+- docs
4
|
5
+- tests
6
|
7
+- workflow -+- definitions -+- <some folders>
8
|
9
+- <rest of the project>
10
I want to exclude tests, and workflow/definition from documentation.
I tried exclude pattern in docs/conf.py
JavaScript
1
2
1
exclude_patterns = ['**/workflow/definitions', 'workflow/definitions', '*workflow/definitions', 'workflow/definitions*', 'workflow/definitions/*', 'workflow/definitions/*.*']
2
But even though workflow/definitions are still automatically generated.
Could someone show me correct exclude pattern how to ignore ‘definitions’ folder ?
Advertisement
Answer
exclude_patterns
can be used to exclude source files (reStructuredText files) from processing by sphinx-build.
exclude_patterns
has no effect when using sphinx-apidoc to generate reStructuredText files from Python modules (but you can tell sphinx-apidoc that certain pathnames should be excluded from the generation).