Skip to content

Make public-API modules public; add CLA notice#24

Merged
guenp merged 5 commits into
mainfrom
churchill/fix-pdoc-module-docstrings
Apr 26, 2026
Merged

Make public-API modules public; add CLA notice#24
guenp merged 5 commits into
mainfrom
churchill/fix-pdoc-module-docstrings

Conversation

@splch

@splch splch commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Rename 6 private modules (_exceptions, _extensions, _gates, _pagination, _polling, _session) to public by dropping the _ prefix. These all export user-facing symbols; making them public lets pdoc render their module-level docstrings (exception hierarchy, extension examples, gate parameter conventions, usage examples) naturally without any workarounds.
  • _transport.py stays private as it contains only internal plumbing.
  • Add CLA contact information to CONTRIBUTING.md per Evaluate CLA or DCO for contributor provenance #20.

Test Plan

  • uv run pytest tests/ - 219 passed, 100% coverage
  • uv run ruff format --check && ruff check - clean
  • Regeneration round-trip produces zero diff (staleness check)
  • uv run pdoc -o docs/ -d google ionq_core - module docstrings now render on submodule pages

Closes #20

splch added 2 commits April 26, 2026 07:54
pdoc skips module-level docstrings from private submodules when symbols
are re-exported via __init__.py. Compose __doc__ dynamically from the
existing submodule docstrings so pdoc renders the exception hierarchy,
extension examples, gate parameter conventions, and usage examples that
were previously invisible in the generated documentation.
@splch splch changed the title Surface private module docstrings in pdoc output Surface private module docstrings in pdoc output; add CLA notice Apr 26, 2026
splch added 2 commits April 26, 2026 07:59
Update the package_init template to compose __doc__ dynamically from
submodule docstrings instead of using a static literal. This way pdoc
renders the exception hierarchy, extension examples, gate parameter
conventions, and usage examples that were previously invisible.
Rename _exceptions, _extensions, _gates, _pagination, _polling, and
_session to drop the underscore prefix. These modules all export
user-facing symbols and were only private by convention. Making them
public lets pdoc render their module-level docstrings naturally,
eliminating the dynamic __doc__ composition workaround entirely.

_transport.py stays private as it contains only internal plumbing.
@splch splch changed the title Surface private module docstrings in pdoc output; add CLA notice Make public-API modules public; add CLA notice Apr 26, 2026
Comment thread CONTRIBUTING.md

## Contributor License Agreement

To receive IonQ's CLA, please contact @mjk or email [opensource@ionq.com](mailto:opensource@ionq.com).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjk fyi

@guenp guenp merged commit da7dcb3 into main Apr 26, 2026
10 checks passed
@guenp guenp deleted the churchill/fix-pdoc-module-docstrings branch April 26, 2026 15:53
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

Successfully merging this pull request may close these issues.

Evaluate CLA or DCO for contributor provenance

2 participants