Skip to content

Commit 9d87e06

Browse files
committed
Collect doc files based primarily on an inclusion list
It frequently arises that files were inadvertently included in the doc build, because it was based on a series of exclude patterns, but new filenames that don't match the exclude patterns are frequently created by new build systems, new submodules, un-tidy developer source trees, etc. So, use include_patterns as a set of positive patterns, then weed out a few specific items that otherwise match the include patterns.
1 parent 35ce615 commit 9d87e06

File tree

1 file changed

+16
-68
lines changed

1 file changed

+16
-68
lines changed

conf.py

+16-68
Original file line numberDiff line numberDiff line change
@@ -174,74 +174,22 @@ def autoapi_prepare_jinja_env(jinja_env):
174174

175175
# List of patterns, relative to source directory, that match files and
176176
# directories to ignore when looking for source files.
177-
exclude_patterns = ["**/build*",
178-
".git",
179-
".github",
180-
".env",
181-
".venv",
182-
".direnv",
183-
".devcontainer/Readme.md",
184-
"circuitpython-stubs",
185-
"data",
186-
"docs/autoapi",
187-
"docs/README.md",
188-
"drivers",
189-
"examples",
190-
"extmod",
191-
"frozen",
192-
"lib",
193-
"main.c",
194-
"mpy-cross",
195-
"ports/*/*.c",
196-
"ports/*/*.h",
197-
"ports/*/boards",
198-
"ports/*/common-hal",
199-
"ports/*/supervisor",
200-
"ports/atmel-samd/asf4",
201-
"ports/atmel-samd/asf4_conf",
202-
"ports/atmel-samd/external_flash",
203-
"ports/atmel-samd/freetouch",
204-
"ports/atmel-samd/peripherals",
205-
"ports/atmel-samd/QTouch",
206-
"ports/atmel-samd/tools",
207-
"ports/broadcom/firmware",
208-
"ports/broadcom/peripherals",
209-
"ports/cxd56/mkspk",
210-
"ports/cxd56/spresense-exported-sdk",
211-
"ports/espressif/certificates",
212-
"ports/espressif/esp-idf",
213-
"ports/espressif/esp-camera",
214-
"ports/espressif/esp-protocols",
215-
"ports/espressif/.idf_tools",
216-
"ports/espressif/peripherals",
217-
"ports/litex/hw",
218-
"ports/minimal",
219-
"ports/mimxrt10xx/peripherals",
220-
"ports/mimxrt10xx/sdk",
221-
"ports/nordic/device",
222-
"ports/nordic/bluetooth",
223-
"ports/nordic/modules",
224-
"ports/nordic/nrfx",
225-
"ports/nordic/peripherals",
226-
"ports/nordic/usb",
227-
"ports/raspberrypi/sdk",
228-
"ports/raspberrypi/pioasm",
229-
"ports/raspberrypi/lib",
230-
"ports/silabs/gecko_sdk",
231-
"ports/silabs/tools",
232-
"ports/stm/st_driver",
233-
"ports/stm/packages",
234-
"ports/stm/peripherals",
235-
"ports/stm/ref",
236-
"py",
237-
"shared/*",
238-
"shared-bindings/util.*",
239-
"shared-module",
240-
"supervisor",
241-
"tests",
242-
"test-stubs",
243-
"tools",
244-
"circuitpython-stubs/README.rst"]
177+
include_patterns = [
178+
# Top directory documentation
179+
"*.rst",
180+
"*.md",
181+
182+
# Docs inherited from microypython (but not templates or README.md, see below)
183+
"docs/**",
184+
185+
# Module documentation
186+
"shared-bindings/**",
187+
"ports/*/bindings/**",
188+
189+
# Port READMEs in various formats
190+
"ports/*/README*",
191+
]
192+
exclude_patterns = ["docs/autoapi/templates/**", "docs/README.md"]
245193

246194
# The reST default role (used for this markup: `text`) to use for all
247195
# documents.

0 commit comments

Comments
 (0)