-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Add comprehensive project documentation site
Sets up Sphinx documentation with Read the Docs theme, including: - Installation guides for each backbone model - Detailed configuration and usage examples - Model backbone documentation - Contributing guidelines Adds GitHub Actions workflow to automatically build and deploy docs
- Loading branch information
1 parent
ae98bf2
commit 44172eb
Showing
18 changed files
with
649 additions
and
77 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # or your default branch | ||
paths: | ||
- 'docs/**' | ||
- '.github/workflows/docs.yml' | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r docs/requirements.txt | ||
pip install . | ||
- name: Build documentation | ||
run: | | ||
cd docs | ||
make html | ||
# Create .nojekyll file to allow files and folders starting with an underscore | ||
touch _build/html/.nojekyll | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: docs/_build/html | ||
|
||
deploy: | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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 |
---|---|---|
|
@@ -223,4 +223,5 @@ md_results/ | |
results_backup/ | ||
ZnMn2O4_*/ | ||
examples/matbench/data/ | ||
bfg.jar | ||
bfg.jar | ||
.dir2textignore |
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,19 @@ | ||
# 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 = . | ||
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) |
Empty file.
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,30 @@ | ||
# EquiformerV2 Backbone | ||
|
||
The EquiformerV2 backbone implements the EquiformerV2 model architecture in MatterTune. This is a state-of-the-art equivariant transformer model for molecular and materials property prediction. | ||
|
||
```{note} | ||
This documentation is currently under development. Please check back later for complete documentation of the EquiformerV2 backbone. | ||
``` | ||
|
||
## Key Features | ||
|
||
- Equivariant transformer architecture | ||
- Support for both molecular and periodic systems | ||
- State-of-the-art performance on various property prediction tasks | ||
|
||
## Basic Usage | ||
|
||
```python | ||
from mattertune import MatterTuner | ||
from mattertune.configs import EquiformerV2BackboneConfig | ||
|
||
config = { | ||
"model": { | ||
"name": "eqv2", | ||
"ckpt_path": "path/to/pretrained.pt", | ||
# Additional configuration options will be documented soon | ||
} | ||
} | ||
|
||
tuner = MatterTuner(config) | ||
``` |
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
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,45 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath("..")) | ||
|
||
project = "MatterTune" | ||
copyright = "2023, MatterTune Team" | ||
author = "MatterTune Team" | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.githubpages", | ||
"myst_parser", | ||
] | ||
|
||
# MyST Markdown settings | ||
myst_enable_extensions = [ | ||
"colon_fence", | ||
"deflist", | ||
"dollarmath", | ||
"fieldlist", | ||
"html_admonition", | ||
"html_image", | ||
"replacements", | ||
"smartquotes", | ||
"tasklist", | ||
] | ||
|
||
# Theme settings | ||
html_theme = "sphinx_rtd_theme" | ||
html_static_path = ["_static"] | ||
html_logo = None | ||
html_favicon = None | ||
|
||
# General settings | ||
source_suffix = { | ||
".rst": "restructuredtext", | ||
".md": "markdown", | ||
} | ||
master_doc = "index" | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
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,41 @@ | ||
# Contributing to MatterTune | ||
|
||
We welcome contributions to MatterTune! Whether you're fixing bugs, adding new features, improving documentation, or reporting issues, your help is appreciated. | ||
|
||
## How to Contribute | ||
|
||
1. Fork the repository | ||
2. Create a new branch for your feature | ||
3. Make your changes | ||
4. Submit a pull request | ||
|
||
For detailed contribution guidelines, please see our [Contributing Guidelines](https://github.com/Fung-Lab/MatterTune/blob/main/CONTRIBUTING.md) in the repository. | ||
|
||
## Development Setup | ||
|
||
1. Fork and clone the repository | ||
2. Create a virtual environment | ||
3. Install development dependencies | ||
4. Run tests to ensure everything is working | ||
|
||
## Code Style | ||
|
||
We follow standard Python code style guidelines: | ||
- Use Black for code formatting | ||
- Follow PEP 8 guidelines | ||
- Write descriptive docstrings | ||
- Add type hints where appropriate | ||
|
||
## Testing | ||
|
||
Please ensure all tests pass before submitting a pull request: | ||
```bash | ||
pytest tests/ | ||
``` | ||
|
||
## Documentation | ||
|
||
When contributing new features, please: | ||
1. Add docstrings to new functions and classes | ||
2. Update relevant documentation files | ||
3. Add examples where appropriate |
Oops, something went wrong.