model-diagnostics
model-diagnostics copied to clipboard
Make mkdocstrings filters work
Currently, the mkdocstrings filters in mkdocs.yml does not work (as I would expect). The files for generating the API Reference page are currently filtered in gen_ref_pages.py.
@lorentzenchr Could you please elaborate more on your need? When looking at the "filters" option https://mkdocstrings.github.io/python/usage/configuration/members/#with-filters-hello it seems to me that it is used to include/exclude Python objects rather than files.
But filenames translate to python (sub) modules and I'd like to filter those and couldn't get it to work as needed. Instead, gen_ref_pages.py has
set(Path("src").rglob("*.py"))
- set(Path("src").rglob("*tests/*.py"))
- set(Path("src").rglob("_*/*.py"))
- set(Path("src/").rglob("__about__.py"))
which does it's job, but doesn't seem like a nice solution to me.