From 5be097449df731e5b3ef79b76e557f6a347e7a61 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 10 Jan 2025 15:36:22 -0600 Subject: [PATCH] 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. --- conf.py | 84 +++++++++++---------------------------------------------- 1 file changed, 16 insertions(+), 68 deletions(-) diff --git a/conf.py b/conf.py index 9e185fd6a4de1..fbfd5a33ddce1 100644 --- a/conf.py +++ b/conf.py @@ -174,74 +174,22 @@ def autoapi_prepare_jinja_env(jinja_env): # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["**/build*", - ".git", - ".github", - ".env", - ".venv", - ".direnv", - ".devcontainer/Readme.md", - "circuitpython-stubs", - "data", - "docs/autoapi", - "docs/README.md", - "drivers", - "examples", - "extmod", - "frozen", - "lib", - "main.c", - "mpy-cross", - "ports/*/*.c", - "ports/*/*.h", - "ports/*/boards", - "ports/*/common-hal", - "ports/*/supervisor", - "ports/atmel-samd/asf4", - "ports/atmel-samd/asf4_conf", - "ports/atmel-samd/external_flash", - "ports/atmel-samd/freetouch", - "ports/atmel-samd/peripherals", - "ports/atmel-samd/QTouch", - "ports/atmel-samd/tools", - "ports/broadcom/firmware", - "ports/broadcom/peripherals", - "ports/cxd56/mkspk", - "ports/cxd56/spresense-exported-sdk", - "ports/espressif/certificates", - "ports/espressif/esp-idf", - "ports/espressif/esp-camera", - "ports/espressif/esp-protocols", - "ports/espressif/.idf_tools", - "ports/espressif/peripherals", - "ports/litex/hw", - "ports/minimal", - "ports/mimxrt10xx/peripherals", - "ports/mimxrt10xx/sdk", - "ports/nordic/device", - "ports/nordic/bluetooth", - "ports/nordic/modules", - "ports/nordic/nrfx", - "ports/nordic/peripherals", - "ports/nordic/usb", - "ports/raspberrypi/sdk", - "ports/raspberrypi/pioasm", - "ports/raspberrypi/lib", - "ports/silabs/gecko_sdk", - "ports/silabs/tools", - "ports/stm/st_driver", - "ports/stm/packages", - "ports/stm/peripherals", - "ports/stm/ref", - "py", - "shared/*", - "shared-bindings/util.*", - "shared-module", - "supervisor", - "tests", - "test-stubs", - "tools", - "circuitpython-stubs/README.rst"] +include_patterns = [ + # Top directory documentation + "*.rst", + "*.md", + + # Docs inherited from microypython (but not templates or README.md, see below) + "docs/**", + + # Module documentation + "shared-bindings/**", + "ports/*/bindings/**", + + # Port READMEs in various formats + "ports/*/README*", +] +exclude_patterns = ["docs/autoapi/templates/**", "docs/README.md"] # The reST default role (used for this markup: `text`) to use for all # documents.