Skip to content

Commit 7b3ca5b

Browse files
cameronrutherfordryan.danehy@pnnl.govryan.danehy@pnnl.gov
authored
Support devcontainer, refactor GitHub acitons, add documentation (#92)
* Document Spack packaging * Document CI/CD configuration and build scripts * Address duplicate license and copyright notice files * Remove unused makefiles * Add devcontainer working build and pipeline for docs without action. * add instructions for dev container * remove documentation pipeline from running everytime * fix missing doxygen stylesheet * fix dotfile path --------- Co-authored-by: [email protected] <[email protected]> Co-authored-by: [email protected] <[email protected]>
1 parent 44bdb87 commit 7b3ca5b

File tree

20 files changed

+331
-550
lines changed

20 files changed

+331
-550
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Container image that runs your code
2+
FROM python:3.13.0a1-alpine
3+
4+
# Sphinx
5+
RUN pip3 install --no-cache-dir \
6+
sphinx \
7+
docutils \
8+
sphinx_rtd_theme \
9+
breathe \
10+
m2r2
11+
12+
# Tex
13+
RUN apk update && \
14+
apk add --no-cache \
15+
git \
16+
cmake \
17+
doxygen \
18+
graphviz \
19+
ttf-freefont

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Documentation Container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/common-utils:2": {
10+
"username": "automatic",
11+
"uid": "automatic",
12+
"gid": "automatic",
13+
"installZsh": false,
14+
"installOhMyZsh": false,
15+
"upgradePackages": false,
16+
"nonFreePackages": false
17+
}
18+
},
19+
"customizations": {
20+
"vscode": {
21+
"extensions": [
22+
"ms-azuretools.vscode-docker",
23+
"github.vscode-github-actions",
24+
"ms-vscode.cpptools-extension-pack",
25+
"GitHub.copilot",
26+
"ms-vscode.cpptools",
27+
"ms-vscode.cmake-tools"
28+
]
29+
}
30+
},
31+
"workspaceFolder": "/home/app/",
32+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/app/,type=bind,consistency=cached"
33+
}

.github/workflows/documentation.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: documentation
22

3-
on: [pull_request]
3+
on: workflow_dispatch
44

55
permissions:
66
contents: write
@@ -9,14 +9,30 @@ jobs:
99
docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- name: Doxygen Build
14-
uses: ryandanehy/sphinx-doxygen@v1
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
- uses: actions/setup-python@v4
1516
with:
16-
sphinx-path: './sphinx/_build'
17-
working-directory: 'docs'
18-
doxyfile-path: './doxygen/Doxyfile.in'
19-
- uses: actions/setup-python@v3
17+
python-version: '3.12'
18+
- name: Install pip dependencies
19+
run: pip3 install --no-cache-dir \
20+
sphinx \
21+
docutils \
22+
sphinx_rtd_theme \
23+
breathe \
24+
m2r2
25+
- name: Install apt packages
26+
uses: awalsh128/cache-apt-pkgs-action@latest
27+
with:
28+
packages: doxygen graphviz git graphviz ttf-freefont cmake
29+
version: 1.0.0
30+
- name: Doxygen Build
31+
run: |
32+
pushd docs
33+
sphinx-build . ./sphinx/_build
34+
doxygen ./doxygen/Doxyfile.in
35+
popd
2036
- name: Deploy to GitHub Pages
2137
uses: peaceiris/actions-gh-pages@v3
2238
if: ${{ github.event_name == 'pull_request' }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ spack-env-*/
1111
spack-build-*
1212
spack_install.*
1313
spack-configure-*
14+
docs/dox.warnings
15+

LICENSE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5353
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5454
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5555
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56-
57-
******************************************************************************

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
ReSolve is a library of GPU-resident linear solver. It contains iterative and direct linear solvers designed to run on NVIDIA and AMD GPUs, as well as on CPU devices.
44

5-
ReadTheDocs Documentation lives here https://ornl.github.io/ReSolve/
5+
ReadTheDocs Documentation lives here https://resolve.readthedocs.io/en/develop/
66

77
## Getting started
88

docs/conf.py

Lines changed: 10 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,9 @@
3838
# Get current directory
3939
conf_directory = os.path.dirname(os.path.realpath(__file__))
4040

41-
# If extensions (or modules to document with autodoc) are in another directory,
42-
# add these directories to sys.path here. If the directory is relative to the
43-
# documentation root, use os.path.abspath to make it absolute, like shown here.
44-
#sys.path.insert(0, os.path.abspath('.'))
4541

4642
# -- General configuration ------------------------------------------------
4743

48-
# If your documentation needs a minimal Sphinx version, state it here.
49-
#needs_sphinx = '1.0'
50-
5144
# Add any Sphinx extension module names here, as strings. They can be
5245
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5346
# ones.
@@ -58,91 +51,51 @@
5851
'sphinxcontrib.jquery',
5952
'sphinx.ext.todo',
6053
'sphinx.ext.coverage',
61-
'sphinx.ext.mathjax'
54+
'sphinx.ext.mathjax',
55+
'm2r2'
6256
]
6357

6458
# The main toctree document.
6559
master_doc = 'index'
6660

6761
# Add any paths that contain templates here, relative to this directory.
68-
# I think this is right:
6962
templates_path = [os.path.join(conf_directory, 'sphinx/_templates')]
70-
# Other variations:
7163

7264
# The suffix(es) of source filenames.
73-
# You can specify multiple suffix as a list of string:
74-
# source_suffix = ['.rst', '.md']
75-
source_suffix = ['.rst']
76-
77-
# The encoding of source files.
78-
#source_encoding = 'utf-8-sig'
65+
source_suffix = ['.rst', '.html', '.md']
7966

8067
project = 'ReSolve'
8168
copyright = '2023, UT-Battelle, LLC, and Battelle Memorial Institute'
8269
author = 'Kasia Świrydowicz, Slaven Peles'
8370
release = '1.0.0'
8471

85-
# -- General configuration ---------------------------------------------------
86-
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
87-
72+
templates_path = ['_templates']
8873
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
8974

75+
root_doc = 'index'
76+
9077
# -- Option for numbering figures/tables/etc.-----------------------------------
9178
# Note: numfig requires Sphinx (1.3+)
9279
numfig = True
9380

94-
# The version info for the project you're documenting, acts as replacement for
95-
# |version| and |release|, also used in various other places throughout the
96-
# built documents.
97-
#
98-
# The short X.Y version.
99-
#version = '0.1'
100-
# The full version, including alpha/beta/rc tags.
101-
#release = '0.1'
102-
10381
# The language for content autogenerated by Sphinx. Refer to documentation
10482
# for a list of supported languages.
10583
#
10684
# This is also used if you do content translation via gettext catalogs.
10785
# Usually you set "language" from the command line for these cases.
10886
language = 'English'
10987

110-
# There are two options for replacing |today|: either, you set today to some
111-
# non-false value, then it is used:
112-
#today = ''
113-
# Else, today_fmt is used as the format for a strftime call.
114-
#today_fmt = '%B %d, %Y'
115-
11688
# List of patterns, relative to source directory, that match files and
11789
# directories to ignore when looking for source files.
11890
exclude_patterns = [
11991
'cmake/blt/docs',
120-
'thirdparty']
121-
122-
# The reST default role (used for this markup: `text`) to use for all
123-
# documents.
124-
#default_role = None
125-
126-
# If true, '()' will be appended to :func: etc. cross-reference text.
127-
#add_function_parentheses = True
128-
129-
# If true, the current module name will be prepended to all description
130-
# unit titles (such as .. function::).
131-
#add_module_names = True
132-
133-
# If true, sectionauthor and moduleauthor directives will be shown in the
134-
# output. They are ignored by default.
135-
#show_authors = False
92+
'thirdparty',
93+
'doxygen-awesome-css'
94+
]
13695

13796
# The name of the Pygments (syntax highlighting) style to use.
13897
pygments_style = 'default'
13998

140-
# A list of ignored prefixes for module index sorting.
141-
#modindex_common_prefix = []
142-
143-
# If true, keep warnings as "system message" paragraphs in the built documents.
144-
#keep_warnings = False
145-
14699
# If true, `todo` and `todoList` produce output, else they produce nothing.
147100
todo_include_todos = False
148101

@@ -165,91 +118,6 @@
165118
html_theme_options = {}
166119
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
167120

168-
# The name for this set of Sphinx documents. If None, it defaults to
169-
# "<project> v<release> documentation".
170-
#html_title = None
171-
172-
# A shorter title for the navigation bar. Default is the same as html_title.
173-
#html_short_title = None
174-
175-
# The name of an image file (relative to this directory) to place at the top
176-
# of the sidebar.
177-
#html_logo = None
178-
179-
# The name of an image file (within the static path) to use as favicon of the
180-
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
181-
# pixels large.
182-
#html_favicon = None
183-
184-
# Add any paths that contain custom static files (such as style sheets) here,
185-
# relative to this directory. They are copied after the builtin static files,
186-
# so a file named "default.css" will overwrite the builtin "default.css".
187-
188-
# all static files should be in the _build/_static directory
189-
# readthedocs server checks out the github repo and paths remain the same
190-
html_static_path = [os.path.join(conf_directory, 'sphinx/_build/_static')]
191-
192-
#html_static_path = ['docs/sphinx/_build/_static/theme_overrides.css']
193-
194-
# Add any extra paths that contain custom files (such as robots.txt or
195-
# .htaccess) here, relative to this directory. These files are copied
196-
# directly to the root of the documentation.
197-
#html_extra_path = []
198-
199-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
200-
# using the given strftime format.
201-
#html_last_updated_fmt = '%b %d, %Y'
202-
203-
# If true, SmartyPants will be used to convert quotes and dashes to
204-
# typographically correct entities.
205-
#html_use_smartypants = True
206-
207-
# Custom sidebar templates, maps document names to template names.
208-
#html_sidebars = {}
209-
210-
# Additional templates that should be rendered to pages, maps page names to
211-
# template names.
212-
#html_additional_pages = {}
213-
214-
# If false, no module index is generated.
215-
#html_domain_indices = True
216-
217-
# If false, no index is generated.
218-
#html_use_index = True
219-
220-
# If true, the index is split into individual pages for each letter.
221-
#html_split_index = False
222-
223-
# If true, links to the reST sources are added to the pages.
224-
#html_show_sourcelink = True
225-
226-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
227-
#html_show_sphinx = True
228-
229-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
230-
#html_show_copyright = True
231-
232-
# If true, an OpenSearch description file will be output, and all pages will
233-
# contain a <link> tag referring to it. The value of this option must be the
234-
# base URL from which the finished HTML is served.
235-
#html_use_opensearch = ''
236-
237-
# This is the file name suffix for HTML files (e.g. ".xhtml").
238-
#html_file_suffix = None
239-
240-
# Language to be used for generating the HTML full-text search index.
241-
# Sphinx supports the following languages:
242-
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
243-
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
244-
#html_search_language = 'en'
245-
246-
# A dictionary with options for the search language support, empty by default.
247-
# Now only 'ja' uses this config value
248-
#html_search_options = {'type': 'default'}
249-
250-
# The name of a javascript file (relative to the configuration directory) that
251-
# implements a search results scorer. If empty, the default will be used.
252-
#html_search_scorer = 'scorer.js'
253121

254122
# Output file base name for HTML help builder.
255123
htmlhelp_basename = 'ReSolve'
@@ -258,7 +126,7 @@
258126
# override wide tables in RTD theme
259127
# (Thanks to https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html)
260128
# These folders are copied to the documentation's HTML output
261-
# html_static_path = ['sphinx/_static']
129+
html_static_path = ['./sphinx/style']
262130

263131
# These paths are either relative to html_static_path
264132
# or fully qualified paths (eg. https://...)

0 commit comments

Comments
 (0)