Skip to content

Commit

Permalink
Merge pull request #13 from enigne/add_read_the_docs
Browse files Browse the repository at this point in the history
Add read the docs
  • Loading branch information
Cheng Gong authored Apr 9, 2024
2 parents f7be8d4 + ad2f00e commit 890531f
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "2"

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

python:
install:
- requirements: docs/requirements.txt

sphinx:
configuration: docs/source/conf.py
20 changes: 20 additions & 0 deletions docs/Makefile
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)
43 changes: 43 additions & 0 deletions docs/api/pinnicle.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
pinnicle
=======

pinnicle.domain module
------------------------

.. automodule:: pinnicle.domain
:members:
:undoc-members:
:show-inheritance:

pinnicle.modeldata module
---------------------

.. automodule:: pinnicle.modeldata
:members:
:undoc-members:
:show-inheritance:

pinnicle.nn module
---------------------

.. automodule:: pinnicle.nn
:members:
:undoc-members:
:show-inheritance:

pinnicle.physics module
----------------------

.. automodule:: pinnicle.physics
:members:
:undoc-members:
:show-inheritance:

pinnicle.utils module
--------------------

.. automodule:: pinnicle.utils
:members:
:undoc-members:
:show-inheritance:

38 changes: 38 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Configuration file for the Sphinx documentation builder.
from importlib.metadata import version

# -- Project information

project = 'PINNICLE'
copyright = '2024, Cheng Gong'
author = 'Cheng Gong'

# The short X.Y version
version = version("PINNICLE")
# The full version, including alpha/beta/rc tags
release = version

# -- General configuration

extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
}
intersphinx_disabled_domains = ['std']

templates_path = ['_templates']

# The master toctree
master_doc = "index"

# -- Options for HTML output
html_theme = 'sphinx_rtd_theme'

36 changes: 36 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
PINNICLE
===================================

`PINNICLE<https://github.com/enigne/PINNICLE>` is a Python library for solving ice sheet modeling problems using a unified framework with Physics Informed Neural Networks


Check out the :doc:`usage` section for further information, including
how to :ref:`installation` the project.

.. note::

This project is under active development.

User guide
--------

.. toctree::
:maxdepth: 2


API reference
--------

.. toctree::
:maxdepth: 2
:caption: API

api/pinnicle


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
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
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1

0 comments on commit 890531f

Please sign in to comment.