-
Notifications
You must be signed in to change notification settings - Fork 6
feat(docs): add complete C++ API reference #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
HaoZeke
wants to merge
1
commit into
metatensor:main
Choose a base branch
from
HaoZeke:cppAPIref
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Customized Options | ||
| # Make changes here to prevent things from being overwritten when the main file | ||
| # is updated | ||
|
|
||
| # Defaults | ||
| @INCLUDE = "./Doxyfile" | ||
|
|
||
| # XML | ||
| GENERATE_XML = YES | ||
| XML_PROGRAMLISTING = NO | ||
| # Sphinx uses lowercase references so.. | ||
| CASE_SENSE_NAMES = NO | ||
| # Prevents links to template arguments | ||
| HIDE_UNDOC_RELATIONS = YES | ||
|
|
||
| # HTML | ||
| GENERATE_HTML = NO | ||
| USE_MATHJAX = NO | ||
|
|
||
| # LaTeX | ||
| GENERATE_LATEX = NO | ||
|
|
||
| # Project Settings | ||
| PROJECT_NAME = "metatomic" | ||
|
|
||
| # Doxygen Settings | ||
| RECURSIVE = YES | ||
| INPUT = ../metatomic-torch/include/metatomic \ | ||
| ../metatomic-torch/include/metatomic/torch | ||
| OUTPUT_DIRECTORY = build/doxygen | ||
| CREATE_SUBDIRS = YES | ||
|
|
||
| # Language additions | ||
| OPTIMIZE_OUTPUT_FOR_C = NO | ||
| BUILTIN_STL_SUPPORT = NO | ||
|
|
||
| # Style | ||
| JAVADOC_BANNER = YES | ||
| JAVADOC_AUTOBRIEF = NO | ||
| INHERIT_DOCS = YES | ||
| INLINE_SOURCES = YES | ||
| SOURCE_BROWSER = YES | ||
| DISABLE_INDEX = NO | ||
| GENERATE_TREEVIEW = NO | ||
| HAVE_DOT = YES | ||
| DOT_IMAGE_FORMAT = YES | ||
| HTML_DYNAMIC_SECTIONS = YES | ||
| INTERACTIVE_SVG = YES | ||
| # # We link to standard definitions | ||
| # TAGFILES += "./tags/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/" | ||
|
|
||
| # Extract everything | ||
| EXTRACT_ALL = NO | ||
| EXTRACT_PRIVATE = YES | ||
| EXTRACT_PRIV_VIRTUAL = YES | ||
| EXTRACT_PACKAGE = YES | ||
| EXTRACT_STATIC = YES | ||
| MACRO_EXPANSION = YES | ||
| ENABLE_PREPROCESSING = YES | ||
|
|
||
| # Local Variables: | ||
| # mode: conf | ||
| # End: |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| INPUT_FILE = "build/doxygen/xml/index.xml" | ||
| OUTPUT_FILE = "src/api/index.rst" | ||
| INDEX_TITLE = "C++ API Reference" | ||
|
|
||
| FRAME_DIR_LIST = { | ||
| "subprojects/doxyrest/frame/common", | ||
| "subprojects/doxyrest/frame/cfamily" | ||
| } | ||
|
|
||
| LANGUAGE = "cpp" | ||
| ESCAPE_ASTERISKS = true | ||
| ESCAPE_TRAILING_UNDERSCORES = true |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #!/usr/bin/env nu | ||
|
|
||
| def main [] { | ||
| let root = ($env.PWD) | ||
| let deps_dir = ($root | path join "docs/subprojects") | ||
| let doxyrest_src = ($deps_dir | path join "doxyrest") | ||
| let install_dir = ($deps_dir | path join "install") | ||
| let has_doxyrest = (which doxyrest | is-not-empty) | ||
|
|
||
| # Setup Directory Structure | ||
| if not ($deps_dir | path exists) { | ||
| mkdir $deps_dir | ||
| } | ||
|
|
||
| # Grab Doxyrest if missing | ||
| if not $has_doxyrest and not ($install_dir | path exists) { | ||
| print "Downloading Doxyrest binary release..." | ||
| let version = "2.1.3" | ||
| let target = "linux-amd64" | ||
| let archive = $"doxyrest-($version)-($target).tar.xz" | ||
| let url = $"https://github.com/vovkos/doxyrest/releases/download/doxyrest-($version)/($archive)" | ||
|
|
||
| cd $deps_dir | ||
| http get $url | save $archive | ||
| tar -xJf $archive | ||
|
|
||
| if ($install_dir | path exists) { rm -rf $install_dir } | ||
| mv $"doxyrest-($version)-($target)" $install_dir | ||
|
|
||
| rm $archive | ||
| cd $root | ||
| } | ||
|
|
||
| # Still needed for the frames.. | ||
| if not ($doxyrest_src | path exists) { | ||
| print $"Cloning doxyrest into ($doxyrest_src)..." | ||
| git clone --depth 1 --single-branch https://github.com/vovkos/doxyrest $doxyrest_src | ||
| } | ||
|
|
||
| # Run the Pipeline | ||
| print "Generating XML with Doxygen..." | ||
| cd docs | ||
| mkdir build/doxygen/xml | ||
| doxygen Doxyfile.metatomic | ||
|
|
||
| print "Generating RST with local Doxyrest..." | ||
| # Add local bin to path for this execution | ||
| with-env { PATH: ($env.PATH | prepend ($install_dir | path join "bin")) } { | ||
| doxyrest -c doxyrest-config.lua | ||
| } | ||
|
|
||
| print "Building HTML with Sphinx (tox)..." | ||
| tox -e docs | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, we are not adding a new tool to the doc stack. Can this be made to work inside sphinx/tox?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably rewrite it in bash, yes, it's just a shell script :D