-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add docs * Add readthedocs * Update readthedocs * Update readthedocs * Empty commit to trigger doc rebuild * Update ci to build docs * Use https for modules * Update readthedocs * workaround for RTD not setting CONDA_PREFIX * Update README * Add installation instructions * Update some docstrings * Clean up pybind signatures in sphinx * Update docstring * Update usage * Update usage * Fix README * Add docstring * Update docstrings * Update conf.py * Update docs * Update docs * Update installation * Change the name of setParameter[Solver] to just setParameters in the python interface
- Loading branch information
1 parent
e98d0db
commit 8b66ac1
Showing
21 changed files
with
673 additions
and
39 deletions.
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 |
---|---|---|
|
@@ -7,4 +7,6 @@ cpp/example | |
.\#* | ||
temp | ||
*_init_* | ||
*.o | ||
*.o | ||
build | ||
docs/source/generated |
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,6 +1,6 @@ | ||
[submodule "third_party/uammd"] | ||
path = third_party/uammd | ||
url = git@github.com:/raulppelaez/uammd | ||
url = https://github.com/raulppelaez/uammd | ||
[submodule "third_party/LanczosAlgorithm"] | ||
path = third_party/LanczosAlgorithm | ||
url = git@github.com:Raulppelaez/LanczosAlgorithm | ||
url = https://github.com/Raulppelaez/LanczosAlgorithm |
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,21 @@ | ||
version: "2" | ||
|
||
submodules: | ||
include: all | ||
recursive: true | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "mambaforge-22.9" | ||
jobs: | ||
post_create_environment: | ||
- pip install -r docs/requirements.txt | ||
- cmake -DCMAKE_INSTALL_PREFIX=$(which pip | rev | cut -d/ -f3- | rev) . && make -j4 all install | ||
|
||
conda: | ||
environment: environment.yml | ||
|
||
|
||
sphinx: | ||
configuration: docs/source/conf.py |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,59 @@ | ||
@import 'theme.css'; | ||
|
||
.rst-content dl:not(.docutils) dt:first-child { | ||
margin-top: 0; | ||
} | ||
|
||
.rst-content dl:not(.docutils) dl dt { | ||
margin-bottom: 4px; | ||
border: none; | ||
border-left: solid 3px #ccc; | ||
background: #f0f0f0; | ||
color: #555; | ||
} | ||
|
||
.rst-content dl table, | ||
.rst-content dl ul, | ||
.rst-content dl ol, | ||
.rst-content dl p { | ||
margin-bottom: 8px !important; | ||
} | ||
|
||
.rst-content dl:not(.docutils) dt { | ||
display: table; | ||
margin: 6px 0; | ||
font-size: 90%; | ||
line-height: normal; | ||
background: #e7f2fa; | ||
color: #2980B9; | ||
border-top: solid 3px #6ab0de; | ||
padding: 6px; | ||
position: relative; | ||
} | ||
|
||
html.writer-html5 .rst-content dl.field-list { | ||
display: initial; | ||
} | ||
|
||
html.writer-html5 .rst-content dl.field-list>dd, | ||
html.writer-html5 .rst-content dl.field-list>dt { | ||
margin-bottom: 4px; | ||
padding-left: 6px; | ||
} | ||
|
||
p { | ||
line-height: 20px; | ||
font-size: 14px; | ||
} | ||
|
||
html.writer-html5 .rst-content dl.field-list>dt:after { | ||
content: initial; | ||
} | ||
|
||
dt.field-even { | ||
text-transform: uppercase; | ||
} | ||
|
||
dt.field-odd { | ||
text-transform: uppercase; | ||
} |
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,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
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,5 @@ | ||
sphinx==7.2.6 | ||
sphinx-rtd-theme==1.3.0 | ||
sphinxcontrib-autoprogram==0.1.8 | ||
sphinxcontrib-napoleon==0.7 | ||
gitpython |
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,10 @@ | ||
API Reference | ||
============= | ||
|
||
.. autosummary:: | ||
:toctree: generated | ||
:recursive: | ||
|
||
libMobility | ||
|
||
|
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,85 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
project = "libMobility" | ||
author = "RaulPPelaez" | ||
|
||
import git | ||
import sys | ||
import os | ||
|
||
|
||
def get_latest_git_tag(repo_path="."): | ||
repo = git.Repo(repo_path) | ||
tags = sorted(repo.tags, key=lambda t: t.commit.committed_datetime) | ||
return tags[-1].name if tags else None | ||
|
||
|
||
current_tag = get_latest_git_tag("../../") | ||
sys.path.append(os.path.abspath("./extensions")) | ||
if current_tag is None: | ||
current_tag = "master" | ||
release = current_tag | ||
version = current_tag | ||
|
||
# -- General configuration | ||
extensions = [ | ||
"sphinx.ext.duration", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
"sphinxcontrib.autoprogram", | ||
"customsig", | ||
] | ||
napoleon_google_docstring = True | ||
napoleon_numpy_docstring = True | ||
napoleon_include_init_with_doc = False | ||
napoleon_include_private_with_doc = False | ||
napoleon_include_special_with_doc = True | ||
napoleon_use_admonition_for_examples = True | ||
napoleon_use_admonition_for_notes = True | ||
napoleon_use_admonition_for_references = True | ||
napoleon_use_ivar = True | ||
napoleon_use_param = True | ||
napoleon_use_rtype = True | ||
napoleon_preprocess_types = True | ||
napoleon_type_aliases = None | ||
napoleon_attr_annotations = True | ||
autosummary_ignore_module_all = False | ||
|
||
intersphinx_mapping = { | ||
"python": ("https://docs.python.org/3/", None), | ||
"torch": ("https://pytorch.org/docs/stable/", None), | ||
"sphinx": ("https://www.sphinx-doc.org/en/master/", None), | ||
"pybind11": ("https://pybind11.readthedocs.io/en/stable/", None), | ||
} | ||
intersphinx_disabled_domains = ["std"] | ||
|
||
templates_path = ["_templates"] | ||
|
||
# -- Options for HTML output | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
|
||
# -- Options for EPUB output | ||
epub_show_urls = "footnote" | ||
|
||
autoclass_content = "both" | ||
autodoc_typehints = "none" | ||
autodoc_inherit_docstrings = False | ||
sphinx_autodoc_typehints = True | ||
html_show_sourcelink = True | ||
autodoc_default_options = { | ||
"members": True, | ||
"member-order": "bysource", | ||
"exclude-members": "__weakref__", | ||
"undoc-members": False, | ||
"show-inheritance": True, | ||
"inherited-members": False, | ||
} | ||
# Exclude all torchmdnet.datasets.*.rst files in source/generated/ | ||
html_static_path = ["../_static"] | ||
html_css_files = [ | ||
"style.css", | ||
] |
Oops, something went wrong.