Add Sphinx/Doxygen/Breathe documentation framework for phlex and phlex::experimental API#323
Add Sphinx/Doxygen/Breathe documentation framework for phlex and phlex::experimental API#323
Conversation
|
@copilot I think for maximum clarity, it would be better to reset this branch to upstream/main and then re-do the work following the current philosophy, functions/class structure, etc. |
Done. In commit The PR now shows only 13 files changed (135 additions, 0 deletions from main): the |
0712ae9 to
2095c80
Compare
There was a problem hiding this comment.
Pull request overview
Adds a Sphinx + Doxygen + Breathe documentation scaffold under docs/ to generate API reference documentation for key phlex::experimental types, along with dependency requirements and gitignore entries for generated outputs.
Changes:
- Add Sphinx project entrypoint (
index.rst) and minimalconf.pywired to Breathe. - Add API reference
.rstpages for severalphlex::experimentalclasses. - Add Doxygen configuration + Python requirements, and ignore generated docs artifacts in
.gitignore.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/source/index.rst | Adds top-level Sphinx landing page and toctree for API pages. |
| docs/source/conf.py | Adds Sphinx configuration with Breathe integration. |
| docs/source/api/graph_proxy.rst | Adds API page for phlex::experimental::graph_proxy. |
| docs/source/api/framework_graph.rst | Adds API page for framework_graph and layer_sentry. |
| docs/source/api/registrar.rst | Adds API page for phlex::experimental::registrar. |
| docs/source/api/declared_transform.rst | Adds API page for declared_transform. |
| docs/source/api/declared_fold.rst | Adds API page for declared_fold. |
| docs/source/api/declared_unfold.rst | Adds API page for declared_unfold. |
| docs/source/api/product_store.rst | Adds API page for product_store. |
| docs/source/api/products.rst | Adds API page for products. |
| docs/requirements.txt | Adds Python dependencies for building docs. |
| docs/Doxyfile | Adds Doxygen configuration to emit XML for Breathe. |
| .gitignore | Ignores generated Doxygen/Sphinx build output directories. |
Comments suppressed due to low confidence (1)
docs/requirements.txt:4
- The PR description says dependencies are “pinned”, but
requirements.txtuses version ranges (e.g.,>=9.1,<10) which will allow new releases and can change doc build output over time. Either pin exact versions (e.g.,==...) to match the description, or update the description to reflect that these are minimum/compatible ranges. Also remove the trailing blank line at EOF to avoid generating a 4th empty requirement line.
sphinx>=9.1,<10
breathe>=4.36,<5
sphinx-rtd-theme>=3.1,<4
|
@phlexbot python-fix |
|
Automatic ruff fixes pushed (commit af87c94). |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 84.05% 84.08% +0.03%
==========================================
Files 127 127
Lines 3306 3306
Branches 562 562
==========================================
+ Hits 2779 2780 +1
Misses 329 329
+ Partials 198 197 -1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
824f679 to
a7a5bf2
Compare
dcbc52d to
e416cbc
Compare
e416cbc to
85a095f
Compare
85a095f to
a62c7df
Compare
Re-evaluated after rebase. The only needed fix was removing the |
|
@copilot Does any of the documentation provided need to be updated due to changes in the code, or are there any new classes/files that would have been covered by the goals of the original prompt? |
All currently documented classes remain accurate. Two new user-facing classes were added to the codebase after the original branch was created and are now covered:
Both are now documented in |
31b7611 to
3b11ebf
Compare
docs/Doxyfile
Outdated
| INPUT = ../phlex ../form | ||
| OUTPUT_DIRECTORY = doxygen |
There was a problem hiding this comment.
INPUT and OUTPUT_DIRECTORY are written as relative paths that only work if Doxygen is invoked from docs/ (e.g., cd docs && doxygen Doxyfile). If someone runs doxygen docs/Doxyfile from the repo root (a common invocation), ../phlex/../form will point outside the repo and the XML will be written to <repo>/doxygen/, which won’t match the Sphinx Breathe path or the .gitignore entries. Consider making these paths robust to the invocation working directory (e.g., repo-root-relative paths) or add a documented wrapper/Makefile target that enforces running from docs/.
| INPUT = ../phlex ../form | |
| OUTPUT_DIRECTORY = doxygen | |
| # Paths are relative to the repository root; invoke as: doxygen docs/Doxyfile | |
| INPUT = phlex form | |
| OUTPUT_DIRECTORY = docs/doxygen |
| breathe_projects = { | ||
| "Phlex": "../doxygen/xml/", | ||
| } |
There was a problem hiding this comment.
breathe_projects["Phlex"] points to ../doxygen/xml/ relative to docs/source/, which assumes Doxygen writes XML to docs/doxygen/xml. With the current docs/Doxyfile, that location depends on the working directory used when invoking Doxygen, so Sphinx can easily fail to find the XML. Align this path with a Doxygen output location that’s stable (or document/enforce the expected invocation directory).
3b11ebf to
a04ec85
Compare
|
@copilot https://gh.io/copilot-coding-agent-docs #323 (branch |
Done in Doxyfile paths fixed:
|
| sphinx>=9.1,<10 | ||
| breathe>=4.36,<5 | ||
| sphinx-rtd-theme>=3.1,<4 |
There was a problem hiding this comment.
There appears to be an extra blank line at EOF in this newly added file. Repo text-file formatting guidelines require the file to end with exactly one newline and no trailing blank line; remove the final empty line.
| breathe_projects = { | ||
| "Phlex": "../doxygen/xml/", | ||
| } | ||
| breathe_default_project = "Phlex" |
There was a problem hiding this comment.
There appears to be an extra blank line at EOF in this newly added file (after breathe_default_project). Repo text-file formatting guidelines require the file to end with exactly one newline and no trailing blank line; remove the final empty line.
| api/configuration | ||
| api/handle | ||
| api/concurrency | ||
| api/product_store | ||
| api/products |
There was a problem hiding this comment.
There appears to be an extra blank line at EOF in this newly added file. Repo text-file formatting guidelines require the file to end with exactly one newline and no trailing blank line; remove the final empty line.
| .. doxygenclass:: phlex::handle | ||
| :members: | ||
| :undoc-members: |
There was a problem hiding this comment.
There appears to be an extra blank line at EOF in this newly added file. Repo text-file formatting guidelines require the file to end with exactly one newline and no trailing blank line; remove the final empty line (and apply the same fix to the other new docs/source/api/*.rst files).
| templates_path = ["_templates"] | ||
| exclude_patterns = [] |
There was a problem hiding this comment.
templates_path = ["_templates"] points to a directory that is not present under docs/source/. Either add docs/source/_templates/ (if you intend to customize templates) or remove this setting to avoid Sphinx warnings about missing template directories.
| PREDEFINED = "BOOST_DLL_ALIAS(a,b)=" \ | ||
| "PHLEX_DETAIL_REGISTER_PLUGIN(...)=" |
There was a problem hiding this comment.
There appears to be an extra blank line at EOF in this newly added file (after the PREDEFINED block). Repo text-file formatting guidelines require the file to end with exactly one newline and no trailing blank line; remove the final empty line.
4dc2b20 to
267fc43
Compare
|
Review the full CodeQL report for details. |
…work This commit introduces the foundational infrastructure for documenting the C++ codebase using a Sphinx, Doxygen, and Breathe toolchain. Key changes include: - A new `docs/` directory to house all documentation-related files. - Configuration files for Sphinx (`conf.py`) and Doxygen (`Doxyfile`). - A `requirements.txt` file listing the necessary Python dependencies for building the documentation. - The `phlex/core/graph_proxy.hpp` header has been fully documented with Doxygen comments to serve as a style guide and working example. - An initial Sphinx structure in `docs/source/` that integrates the Doxygen XML output via Breathe, making the `graph_proxy` documentation available on the documentation website. Initial plan Update docs: pin latest deps, fix version, expand API coverage, add .gitignore entries Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com> Reset branch to main and re-apply docs-only changes Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com> Fix docs for current codebase: correct version, class names, macros, and .gitignore Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com> Add module docstring to docs/source/conf.py for ruff D100 compliance Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com> Apply ruff fixes Ignore `mypy` errors
Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
…ing entry points) Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
…docs (configuration, handle, concurrency) Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
267fc43 to
8934e85
Compare
Adds a Sphinx + Doxygen + Breathe documentation scaffold under
docs/to generate API reference documentation forphlexandphlex::experimentaltypes, along with dependency requirements and gitignore entries for generated outputs.Documentation framework
docs/Doxyfile: Doxygen configuration for XML output consumed by Breathe; paths are repo-root-relative — invoke asdoxygen docs/Doxyfilefrom the repository rootdocs/source/conf.py: Sphinx configuration with Breathe integration, version0.1.0matchingCMakeLists.txt;breathe_projectspath (../doxygen/xml/) resolves correctly todocs/doxygen/xml/fromdocs/source/docs/source/index.rst: documentation index organized into three toctree sections: Plugin entry points, Algorithm nodes, Data modelDependency pinning
docs/requirements.txt:sphinx>=9.1,<10,breathe>=4.36,<5,sphinx-rtd-theme>=3.1,<4API pages —
phlexnamespacephlex::configuration— parameter access class used by every algorithmphlex::handle<T>— data product access wrapper passed to algorithm functionsphlex::concurrency— concurrency control struct used in algorithm registrationAPI pages —
phlex::experimentalnamespacemodule_graph_proxy,source_graph_proxy,graph_proxy,framework_graph,registrardeclared_transform,declared_fold,declared_unfoldproduct_store,productsDoxyfile configuration
INPUT = phlex form,OUTPUT_DIRECTORY = docs/doxygen(repo-root-relative)FILE_PATTERNS = *.hpp *.cpp,EXCLUDE_PATTERNS = */detail/*PREDEFINEDmacros for current codebase (BOOST_DLL_ALIAS,PHLEX_DETAIL_REGISTER_PLUGIN)Housekeeping
.gitignore: addeddocs/doxygen/anddocs/build/for generated outputconf.py: module docstring added for ruff D100 compliance💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.