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

feature: Include all subclasses using a simple API command #184

Open
DaniBodor opened this issue Sep 6, 2024 · 0 comments
Open

feature: Include all subclasses using a simple API command #184

DaniBodor opened this issue Sep 6, 2024 · 0 comments
Assignees
Labels
extractor: griffe Related to griffe feature New feature or request fund Issue priority can be boosted

Comments

@DaniBodor
Copy link

DaniBodor commented Sep 6, 2024

This request is made in response to an answer I received on StackOverflow

Is your feature request related to a problem? Please describe.

I have a python package where there is a parent class (let's call it ParentClass) from which many other classes inherit. I want to create documentation using mkdocs and mkdocstrings, specifically for those classes that inherit from ParentClass. The file structure is roughly as follows:

my_package.features.childclass1.ChildClass1, my_package.features.childclass2.ChildClass2, etc
my_package.features.mixins.ParentClass

However, the features folder also contains subfolders with classes that do not inherit from ParentClass

Describe the solution you'd like

An option in mkdocstrings to automatically detect and render documentation specifically from classes that inherit from ParentClass?
the stackoverflow answer suggested something along the lines of cls.subclasses to get all subclasses of a class at once.

Describe alternatives you've considered

A suggestion was made on the stackoverflow post mentioned above, but seems like a bit of a complicated workaround.

Additional context

Boost priority

  • Boost priority in our backlog through Polar.sh. Higher pledge, higher priority.
  • Minimum pledge by user/organization is $5, minimum amount for boost is $30.
  • View all issues with pledges.
  • We receive the funds once the issue is completed and confirmed by you.
  • Features with the insiders label are released to sponsors first, and tied to a funding goal.
Fund with Polar
@DaniBodor DaniBodor added the feature New feature or request label Sep 6, 2024
@pawamoy pawamoy added extractor: griffe Related to griffe fund Issue priority can be boosted labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extractor: griffe Related to griffe feature New feature or request fund Issue priority can be boosted
Projects
None yet
Development

No branches or pull requests

2 participants