Skip to content

Eight names are exported as public API and documented nowhere #162

Description

@jeremymanning

Summary

Measured against clustrix.__all__ and every .rst, .ipynb and README.md under the repository:

53 exports, 8 appear nowhere in the docs
setup_environment              add_host_key        ProfileManager
setup_ssh_keys                 PackagedFile        create_modern_cluster_widget
                                                   display_modern_widget
                                                   show_widget

All 53 are importable and all have docstrings, so this is a reference gap rather than a broken surface. But a name in __all__ is public by declaration: it is what a user is invited to import, and four of these are things someone would plausibly reach for.

Which of these actually matter

  • setup_ssh_keys and add_host_key are the friction points the SSH story is built around — generating a key and trusting a host are the first two things a new user does. docs/source/ssh_setup.rst covers the topic without naming either function.
  • ProfileManager is the whole profile system behind the notebook widget, and the widget's own page does not mention it. A user who wants profiles from a script has no documented route.
  • show_widget, display_modern_widget, create_modern_cluster_widget are three entry points to the same widget. If they are not all meant to be public, the fix is to shrink __all__ rather than to document all three.
  • setup_environment and PackagedFile are plausibly internal. If so, they should come out of __all__.

Why this is worth recording

__all__ is the contract. Every name in it is either something a user should be able to find in the documentation, or something that should not be in __all__. Right now eight names are in neither state, and the two possible fixes point in opposite directions — so the decision has to be made per name rather than by adding eight reference stubs.

Definition of done

  • Each of the eight is either documented where a user would look for it, or removed from __all__
  • A test asserts the invariant, so a new export cannot arrive undocumented — the measurement above is about ten lines
  • If the three widget entry points stay, the documentation says which one to reach for and why the others exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions