-
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.
Merge pull request #2 from birdday/docs
Initial Docs build.
- Loading branch information
Showing
11 changed files
with
247 additions
and
2 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,60 @@ | ||
name: "Sphinx: Render docs" | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
permissions: | ||
contents: write | ||
|
||
env: | ||
ETS_TOOLKIT: qt4 | ||
QT_API: "pyqt5" | ||
TVTK_VERBOSE: "true" | ||
VTK_PARSER_VERBOSE: "true" | ||
PYTHONUNBUFFERED: "1" | ||
USER: "github-pages" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Install Linux packages for Qt5/Qt6 support and start Xvfb | ||
uses: pyvista/setup-headless-display-action@v3 | ||
with: | ||
qt: true | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Upgrade pip, install package, install requirements, build docs | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r ./docs/requirements.txt | ||
- name: Install dependencies | ||
run: | | ||
set -exo pipefail | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade pyqt5 numpy vtk pillow pytest pytest-timeout traits traitsui --only-binary="numpy,vtk" | ||
- name: Install mayavi and tvtk | ||
run: pip install mayavi | ||
# - name: Test Mayavi package | ||
# run: pytest -v --timeout=10 mayavi | ||
# - name: Test tvtk package | ||
# run: pytest -sv --timeout=60 tvtk | ||
- name: Install Atomaton | ||
run: pip install -e . | ||
- name: Build Docs | ||
run: sphinx-build docs ./docs/_build/html/ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: html-docs | ||
path: docs/_build/html/ | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/html/ |
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 = . | ||
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,41 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. | ||
import sys | ||
from pathlib import Path | ||
sys.path.insert(0, str(Path(__file__).resolve().parents[2])) | ||
import atomaton | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'Atomaton' | ||
copyright = '2024, Brian A. Day' | ||
author = 'Brian A. Day' | ||
release = '0.1.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'sphinx.ext.duration', | ||
'sphinx.ext.doctest', | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.autosummary', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'pydata_sphinx_theme' | ||
html_static_path = ['_static'] |
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,38 @@ | ||
.. Atomaton documentation master file, created by | ||
sphinx-quickstart on Fri Feb 2 21:53:39 2024. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to Atomaton's documentation! | ||
==================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 10 | ||
:caption: Contents: | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
||
|
||
|
||
Contents | ||
-------- | ||
|
||
.. toctree:: | ||
|
||
usage | ||
lammps | ||
visualize | ||
|
||
Check out the :doc:`usage` section for further information, including how to | ||
:ref:`install <installation>` the project. | ||
|
||
Learn how to :ref:`view structures <visualization>` and generate movies! | ||
|
||
Integrate with :ref:`LAMMPS <lammps>`! |
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,12 @@ | ||
LAMMPS | ||
====== | ||
|
||
.. _lammps: | ||
|
||
LAMMPS Input File Generation: :mod:`atomaton.write_lammps_files` | ||
---------------------------------------------------------------- | ||
|
||
.. automodule:: atomaton.write_lammps_files | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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=. | ||
set BUILDDIR=_build | ||
|
||
%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.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%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,2 @@ | ||
sphinx==7.4.7 | ||
pydata-sphinx-theme |
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,23 @@ | ||
Usage | ||
===== | ||
|
||
.. _installation: | ||
|
||
Installation | ||
------------ | ||
|
||
To use Atomaton, first install it using pip: | ||
|
||
.. code-block:: console | ||
(.venv) $ pip install atomaton | ||
Analyzer: :mod:`atomaton.analyze` | ||
-------------------------------------------- | ||
|
||
.. automodule:: atomaton.analyze | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
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,12 @@ | ||
View structures | ||
===== | ||
|
||
.. _visualization: | ||
|
||
Visualizer: :mod:`atomaton.visualize` | ||
-------------------------------------------- | ||
|
||
.. automodule:: atomaton.visualize | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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 |
---|---|---|
|
@@ -10,6 +10,6 @@ | |
author_email="[email protected]", | ||
url="https://github.com/birdday/atomaton", | ||
packages=["atomaton"], | ||
install_requires=["numpy", "ase", "vtk==9.2.6", "mayavi", "imageio", "pyqt5", ], | ||
install_requires=["numpy", "ase", "vtk", "mayavi", "imageio", "PyQt6"], | ||
tests_require=["pytest"], | ||
) |