Skip to content

Conversation

@woodtp
Copy link
Contributor

@woodtp woodtp commented Dec 16, 2025

Produce official documentation for PyORBIT. Automatically generates the Python API reference with sphinx.ext.autosummary. To enable automatic documentation for the C++ part of the repo, a combination of Doxygen, Breathe, and Exhale is used.

Important

New dependencies included in a separate docs-environment.yml:

sphinx
doxygen
breathe  # sphinx-doxygen bridge
exhale   # automatic documentation of C++ library API
myst-parser  # markdown support
sphinx-copbutton  # turn on 'copy-to-clipboard' buttons in codeblocks.

Todo

  • Quick Start/Installation instructions/examples/other static content
  • Figure out why sphinx.ext.autosummary works intermittently between the various orbit modules.
  • Extend to C++ portion of code base.
  • Setup HTML deployment to somewhere... lab-hosted? GitHub Pages?
    • CI/CD
  • Decide on a theme
  • Ship dependenciesrequirements.txt required to build docs.
  • How to handle documentation of python bindings to C++?

Current state is deployed from this feature branch to the following url:
https://pyorbit-collaboration.github.io/PyORBIT3

@woodtp woodtp added the documentation Improvements or additions to documentation label Dec 16, 2025
@woodtp woodtp self-assigned this Dec 16, 2025
@woodtp woodtp requested a review from azukov December 16, 2025 01:55
@woodtp
Copy link
Contributor Author

woodtp commented Dec 16, 2025

I'm not a fan of how sphinx-apidoc appends each submodule of orbit with "... package" in the header. I think it would be cleaner if each item in the TOC was simply:

orbit.aperture
orbit.bunch_generators
...

I haven't yet determined whether details like these are customizable in the options or would it require manual intervention/an external script.

@woodtp
Copy link
Contributor Author

woodtp commented Dec 17, 2025

Relevant to #84, apparently compilation will fail if any of numpy, scipy, or matplotlib are missing as a consequence of:

from numpy import *
from scipy.optimize import fsolve
from scipy.optimize import root
from scipy.integrate import odeint
from scipy.constants import c
from matplotlib.pyplot import *

import numpy as np
from scipy.optimize import leastsq

#101 resolves this.

@woodtp
Copy link
Contributor Author

woodtp commented Dec 18, 2025

Automatic generation of docs for the C++ part of the repo is working with the inclusion of Breathe and Exhale. I'm excluding all of the wrapper code from being documented; we probably want to handle documentation of bindings in a more useful format.

Resolved an issue where some of the C++ side of PyORBIT was getting
documented twice. Ignored some macros that were causing errors while
building documentation. Documentated a couple of methods as examples.
@woodtp woodtp mentioned this pull request Jan 12, 2026
Wood, Tony and others added 9 commits January 12, 2026 12:37
Wood, Tony added 5 commits January 12, 2026 16:35
Building and re-deploying on each PR may be problematic as the
github-pages environment is protected.
woodtp and others added 3 commits January 13, 2026 11:46
If things are really busy, the default 10 minutes is an insufficient
amount of time to wait in the queue.
@woodtp woodtp marked this pull request as ready for review January 13, 2026 17:19
@woodtp
Copy link
Contributor Author

woodtp commented Jan 13, 2026

Reverting cdc67ff and 5f422a4 because increasing the timeout for actions/deploy-pages beyond 10 minutes doesn't do anything.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant