-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into custom_dataset
- Loading branch information
Showing
52 changed files
with
1,858 additions
and
348 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,7 @@ jobs: | |
- name: Run tests | ||
run: pytest -v -s | ||
|
||
- name: Test torchmd-train utility | ||
run: torchmd-train --help | ||
|
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,36 @@ | ||
name: Build Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Env | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
init-shell: bash | ||
generate-run-shell: true | ||
|
||
- name: Install docs dependencies | ||
run: | | ||
pip install -vv . | ||
pip install -r docs/requirements.txt | ||
shell: bash -el {0} | ||
|
||
- name: Build Sphinx Documentation | ||
run: | | ||
cd docs | ||
make html | ||
shell: bash -el {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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,11 @@ dmypy.json | |
|
||
# temp directories | ||
logs/ | ||
|
||
# Docs | ||
docs/build/ | ||
docs/source/generated | ||
|
||
# Extra | ||
|
||
*~ |
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,17 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "mambaforge-22.9" | ||
jobs: | ||
post_create_environment: | ||
- pip install -r docs/requirements.txt | ||
- pip 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: | ||
|
||
torchmdnet | ||
|
||
|
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,88 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
|
||
# -- Project information | ||
project = "TorchMD-Net" | ||
author = "RaulPPelaez" | ||
|
||
import git | ||
|
||
|
||
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("../../") | ||
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", | ||
] | ||
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 = False | ||
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), | ||
} | ||
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/ | ||
exclude_patterns = [ | ||
"generated/torchmdnet.datasets.*.rst", | ||
"generated/torchmdnet.scripts.*rst", | ||
] | ||
html_static_path = ["../_static"] | ||
html_css_files = [ | ||
"style.css", | ||
] | ||
|
||
autodoc_mock_imports = ["torchmdnet.extensions.torchmdnet_extensions"] |
Oops, something went wrong.