-
Notifications
You must be signed in to change notification settings - Fork 15
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
Generate documentation #223
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7ed70ac
Skeleton for docs
Shillaker 2b3208d
Remove autogen makefile
Shillaker 3a487e7
Tidy-up
Shillaker c0922ce
Add directory to cache actioN
Shillaker 8982188
RTD config file
Shillaker c8398be
Hack to install deps
Shillaker c944266
Added breathe-apidoc
Shillaker 6562c64
Simplify sphinx build
Shillaker 0bc7f9c
Revert unnecessary changes to GHA
Shillaker aa465ca
Merge branch 'master' into doxy
Shillaker b05267c
Populate classes with members, rtd theme
Shillaker 3f38700
Remove comment
Shillaker 60eb7f5
Update README
Shillaker 5c02816
Formatting
Shillaker 3b9247b
Check out code in docs build
Shillaker 229aa54
Remove conan-cache dep from docs build
Shillaker 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 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 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,13 @@ | ||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-20.04" | ||
tools: | ||
python: "3.9" | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
python: | ||
install: | ||
- requirements: requirements.txt |
This file contains 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 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 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,3 @@ | ||
doxygen/ | ||
apidoc/ | ||
sphinx/ |
This file contains 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,16 @@ | ||
DOXYFILE_ENCODING = UTF-8 | ||
PROJECT_NAME = "Faabric" | ||
OUTPUT_DIRECTORY = doxygen | ||
OUTPUT_LANGUAGE = English | ||
|
||
FULL_PATH_NAMES = NO | ||
MARKDOWN_SUPPORT = YES | ||
RECURSIVE = YES | ||
QUIET = YES | ||
|
||
GENERATE_LATEX = NO | ||
GENERATE_XML = YES | ||
GENERATE_HTML = NO | ||
|
||
INPUT = ../include ../src | ||
FILE_PATTERNS = *.h *.cpp |
This file contains 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,40 @@ | ||
from os.path import dirname, realpath, join | ||
from subprocess import run | ||
from os import makedirs | ||
|
||
# ---------------------------------------- | ||
# This is the Sphinx configuration file, which wraps | ||
# the calls to Doxygen and Breathe. | ||
# ---------------------------------------- | ||
|
||
DOCS_ROOT = dirname(realpath(__file__)) | ||
DOXYGEN_OUT = join(DOCS_ROOT, "doxygen", "xml") | ||
APIDOC_OUT_DIR = join(DOCS_ROOT, "apidoc") | ||
|
||
makedirs(APIDOC_OUT_DIR, exist_ok=True) | ||
|
||
run("doxygen", cwd=DOCS_ROOT, check=True, shell=True) | ||
|
||
run( | ||
"breathe-apidoc {} -o {} -f -m".format(DOXYGEN_OUT, APIDOC_OUT_DIR), | ||
cwd=DOCS_ROOT, | ||
check=True, | ||
shell=True, | ||
) | ||
|
||
project = "Faabric" | ||
copyright = "2022, Simon Shillaker" | ||
author = "Simon Shillaker" | ||
|
||
extensions = ["breathe", "myst_parser", "sphinx_rtd_theme"] | ||
|
||
templates_path = ["source/templates"] | ||
html_static_path = ["source/static"] | ||
|
||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
|
||
breathe_projects = {"Faabric": DOXYGEN_OUT} | ||
breathe_default_project = "Faabric" | ||
breathe_default_members = ("members", "undoc-members") |
This file contains 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,19 @@ | ||
Faabric Documentation | ||
=================================== | ||
|
||
These docs include some pages on specific topics, as well as the autogenerated | ||
docs from the code. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Topics | ||
|
||
source/development | ||
source/mpi_native | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Code | ||
|
||
apidoc/namespacelist | ||
apidoc/classlist |
File renamed without changes.
File renamed without changes.
This file contains 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 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
ansible | ||
black | ||
docker | ||
flake8 | ||
invoke | ||
numpy | ||
redis | ||
black==21.12b0 | ||
breathe==4.32.0 | ||
docker==5.0.3 | ||
flake8==4.0.1 | ||
invoke==1.6.0 | ||
myst-parser==0.16.1 | ||
numpy==1.21.5 | ||
redis==4.1.0 | ||
sphinx-rtd-theme==1.0.0 |
This file contains 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 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,22 @@ | ||
from os import makedirs | ||
from os.path import join | ||
from subprocess import run | ||
|
||
from tasks.util.env import PROJ_ROOT | ||
|
||
from invoke import task | ||
|
||
DOCS_DIR = join(PROJ_ROOT, "docs") | ||
SPHINX_OUT_DIR = join(DOCS_DIR, "sphinx") | ||
|
||
|
||
@task(default=True) | ||
def generate(ctx): | ||
makedirs(SPHINX_OUT_DIR, exist_ok=True) | ||
|
||
run( | ||
"sphinx-build -b html {} {}".format(DOCS_DIR, SPHINX_OUT_DIR), | ||
cwd=DOCS_DIR, | ||
check=True, | ||
shell=True, | ||
) |
This file contains 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
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.
I'll remove these
TEMP
steps when we do the next release.