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

[Proposal] Make the SAE Lens API docs more comprehensive. #319

Open
jbloomAus opened this issue Oct 4, 2024 · 1 comment
Open

[Proposal] Make the SAE Lens API docs more comprehensive. #319

jbloomAus opened this issue Oct 4, 2024 · 1 comment

Comments

@jbloomAus
Copy link
Owner

Proposal

The SAE Lens API docs don't automatically list all code in the library (see here: https://jbloomaus.github.io/SAELens/api/). It would be good to make it so all functions / docstrings are present.

@BareBeaverBat
Copy link

Do you mean that you want all members (including those without docstrings) of the publicly-exposed classes/methods to show up on the API page of the documentation site?
If so, that can be done with a small edit to mkdocs.yml

plugins:
# ...
  - mkdocstrings:
# ... 
      handlers:
        python:
          options:
            show_if_no_docstring: true
            filters:
              - "!__all__"
              - "!__version__"
              - "!logger"
              - "!^_[^_]"

However, it makes the API page really long, mostly because of the many class and instance attributes (they take up space not only in the page but also in the Table of Contents).

I've gone through the mkdocstrings/mkdocstrings-python documentation, and I can't find a way to include methods with no docstring but exclude attributes with no doc string.

Would you (the maintainers) be open to a PR that
a) also added these options to the same part of mkdocs.yml (in addition to the above)

            group_by_category: true
            show_category_heading: true

which still leaves the page super long but avoids functions getting lost amidst the attributes in the Table of Contents

or b) skipped the approach described so far and just added docstrings to all classes/functions that're publicly-exposed by sae_lens/__init__.py's __all__ assignment (plus all non-'private' function members of those classes)?

If neither of those approaches would be satisfactory, does another approach come to mind that the maintainers would prefer?

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