docs: Googlestyle docstrings and initial help sections#129
Open
vaeng wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes and expands the documentation for the DeviceAccess Python bindings by converting many pybind11 docstrings to Google-style (Napoleon-compatible) docstrings, reorganizing the Sphinx docs into a more structured set of pages, and introducing an initial mechanism to source example snippets from executable test code.
Changes:
- Updated pybind11 docstrings across multiple bindings to Google-style sections (Args/Returns/See Also/Raises) and improved API reference generation via Sphinx autosummary + napoleon.
- Added new documentation pages (overview/getting started/user guide/examples/FAQ/troubleshooting) and refreshed the Sphinx configuration/theme.
- Added initial “doc examples” tests and accompanying dummy map/dmap files intended for inclusion into docs via
literalinclude.
Reviewed changes
Copilot reviewed 26 out of 45 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
tests/testDocExamples.py |
Adds executable example snippets intended to be included in Sphinx docs. |
tests/documentationExamples/someDummyModule.map |
Dummy module map used by documentation examples/tests. |
tests/documentationExamples/someCrate.dmap |
Dummy dmap used by documentation examples/tests. |
src/RegisterCatalogue.cc |
Updates docstrings/args for RegisterCatalogue/RegisterInfo/DataDescriptor bindings. |
src/PyVoidRegisterAccessor.cc |
Enhances docstrings and adds argument annotations for VoidRegisterAccessor bindings. |
src/PyVersionNumber.cc |
Expands VersionNumber comparison/repr bindings and docstrings. |
src/PyTwoDRegisterAccessor.cc |
Updates docstrings and adds arg annotations for 2D accessor bindings. |
src/PyTransferGroup.cc |
Adds/expands TransferGroup docstrings and argument annotations. |
src/PyScalarRegisterAccessor.cc |
Updates scalar accessor docstrings to Google style with See Also/Returns. |
src/PyReadAnyGroup.cc |
Expands ReadAnyGroup/Notification docs and argument annotations. |
src/PyOneDRegisterAccessor.cc |
Updates 1D accessor docstrings and adds __getattr__ docs/arg name. |
src/PyDevice.cc |
Updates Device docstrings to Google style; reorganizes write() documentation. |
src/PyDataType.cc |
Updates DataType docstrings to Google style. |
src/PyDataConsistencyGroup.cc |
Improves DataConsistencyGroup docstrings and updates MatchingMode docs. |
src/deviceaccessPython.cc |
Updates module-level docs; adds argument names and richer docstrings for core types. |
pyproject.toml |
Adds a docs optional dependency group. |
doc/*.rst |
Introduces new top-level docs pages and rewrites the docs landing/index structure. |
doc/generated/*.rst |
Adds autosummary-generated API stubs for the reference section. |
doc/conf.py.in |
Updates Sphinx setup (autosummary, typehints, intersphinx, RTD theme, import mocking). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
565c79b to
2149e3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I reworked all of the docstrings, the docs layout and structure and started with introduction texts, faq etc.
Also initial groundworks to test the examples and include them directly from the test files into the docs.