Closed quattro closed 1 year ago
AFAIK, the python apigen ext isn't readily aware of specific modules/files during generation; it kinda just import *
and parses what it finds. We have other issues that go a bit more in depth about the py.apigen's module awareness (#152 #153).
Sorry for the delayed response (and possibly disappointing answer).
@quattro I created an example that somewhat accomplishes your desire. It may not be the best use of python-apigen
, but it kinda works. I think you just needed some modification to your python_apigen_default_groups
regex.
Here is the full example foo-172.zip.
Below is snapshot of my solution...
python_apigen_modules = {
"foo.bar": "api/foo.bar.",
"foo.baz": "api/foo.baz.",
}
python_apigen_default_groups = [
(r".*:foo.bar.*", "Bar Public-members"),
(r"class:foo.bar.*", "Bar Classes"),
(r".*:foo.baz.*", "Baz Public-members"),
(r"class:foo.baz.*", "Baz Classes"),
]
python_apigen_default_order = [
(r".*:foo.bar.*", -1),
(r"class:foo.bar.*", -2),
(r".*:foo.baz.*", -1),
(r"class:foo.baz.*", -2),
]
Thank you both, @2bndy5 and @mhostetter. This is super helpful, I really appreciate you both taking time to respond. Cheers!
Can we call this issue solved?
Hi,
Thanks for developing such a fantastic documentation tool. I'm really liking it so far. I apologize for asking a question here, as I couldn't find a discussion board or email. Is it possible to use
python_apigen_default_groups
to define class and function groups per file within a module?I'd like to keep a bit of structure without having to manually create groups, such that the nav bar would have something like
where
file1
(or similarlyfile2
) could have its own rst with something likeI've tried with something like the following but with no luck