Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mkdocstrings filters work #69

Open
lorentzenchr opened this issue Apr 14, 2023 · 2 comments
Open

Make mkdocstrings filters work #69

lorentzenchr opened this issue Apr 14, 2023 · 2 comments

Comments

@lorentzenchr
Copy link
Owner

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.

@m-maggi
Copy link
Contributor

m-maggi commented Oct 31, 2023

@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.

@lorentzenchr
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants