Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
582 stars 342 forks source link

Consolidate YAML API documentation in doxygen #1548

Closed ischoegl closed 11 months ago

ischoegl commented 11 months ago

Changes proposed in this pull request

This PR documents an attempt to consolidate Sphinx documentation for YAML Input within doxygen. The test emerged from discussion in Cantera/enhancements#178; the starting point was to test doxygen's capabilities for the integration of markdown files.

This PR consolidates the following information:

Other comments:

If applicable, fill in the issue number this pull request is fixing

Partially addresses Cantera/enhancements#178 Partial fix for Cantera/cantera-website#250 (by avoiding links between doxygen and Sphinx generated content)

If applicable, provide an example illustrating new features this pull request is introducing

Rendered content:

image

Format Reference

image

Works for doxygen=1.9.1 and 1.9.2. There is a known treeview bug in 19.3 until 1.9.6; this appears to be fixed in 1.9.7 although subpage tables of contents do not render for 1.9.7, see bug report (marked as fixed, but not yet released). I retrieved all doxygen versions from conda-forge.

Checklist

ischoegl commented 11 months ago

Realizing that doxylink is actually set up (:ct:, not sure what took me so long 🎉 ), I created links from Sphinx: linking to sections defined in Doxygen markdown files works nicely, see:

image
ischoegl commented 11 months ago

Thanks for the feedback! I do agree that it is a substantial refactor, but strongly believe that merging YAML tutorial and reference makes for an improved user experience (having to look up pieces at two disjoint parts of the website is imho not ideal).

Whether consolidated YAML documentation goes into Doxygen (as proposed here) or Sphinx is probably not too consequential. For my own part, I believe Doxygen is slightly simpler, as cross references are handled internally, and tests only require running scons doxygen. Doxygen produces useful warnings about broken links by itself.

Regarding your comments:

ischoegl commented 11 months ago

This is largely superseded by #1572 and #1573. Regarding other items, I opened Cantera/enhancements#182.

One bit I spent some time on (and which I believe may be worth porting) was to update the documentation of the coverage-dependent species YAML documentation, which I found utterly confusing. Edit: opened #1579.