Skip to content

RFC: add auto generated c++ api docs via mkdoxy #7963

@mahf708

Description

@mahf708

example mkdocs.yaml mods to get it working reasonably well (testing for the emulators comps, because I am trying to establish good protocols for that at the outset in terms of docs)

diff --git a/mkdocs.yaml b/mkdocs.yaml
index e2a806af55..622db78158 100644
--- a/mkdocs.yaml
+++ b/mkdocs.yaml
@@ -41,6 +41,8 @@ theme:
     - navigation.sections
     - navigation.path
     - navigation.tracking
+    - navigation.path
+    - navigation.tracking
     - navigation.top
     - search.suggest
     - search.highlight
@@ -56,7 +58,11 @@ markdown_extensions:
   - footnotes
   - pymdownx.details
   - pymdownx.highlight
-  - pymdownx.superfences
+  - pymdownx.superfences:
+      custom_fences:
+        - name: mermaid
+          class: mermaid
+          format: !!python/name:pymdownx.superfences.fence_code_format
   - pymdownx.tabbed:
       alternate_style: true
   - pymdownx.arithmatex:
@@ -73,6 +79,18 @@ plugins:
   - search
   - bibtex:
       bib_dir: docs/refs
+  - mkdoxy:
+      projects:
+        emulator_api:
+          src-dirs: components/emulator_comps/common/src components/emulator_comps/eatm/src
+          full-doc: True
+          api-path: Emulators/emulator_api
+          save-api: True
+          doxy-cfg:
+            FILE_PATTERNS: "*.cpp *.hpp"
+            RECURSIVE: True
+            EXTRACT_ALL: True
+            JAVADOC_AUTOBRIEF: True
 extra:
   analytics:
     provider: google

The key section is obviously the - mkdoxy one, and we can do stuff like:

+  - mkdoxy:
+      projects:
+        emulators:
+          src-dirs: components/emulator_comps/common/src components/emulator_comps/eatm/src
+          api-path: Emulators/api
+        eamxx:
+          src-dirs: components/eamxx/... ...
+          api-path: EAMxx/api
+        omega:
+          src-dirs: components/omega/... ...
+          api-path: Omega/api

pls discuss and weigh in; cc @rljacob + @bartgol, and pls feel free to tag others (RFC = request for comment)

  • update: added mkdoxy to conda-forge

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions