Skip to content

Commit

Permalink
Merge branch 'add-documentation'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjholland committed May 16, 2024
2 parents 3921721 + 8663d57 commit 32f694d
Show file tree
Hide file tree
Showing 11 changed files with 460 additions and 129 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Sphinx: Render docs"

on: push

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Gather dependencies
run: |
pip install -U pip
pip install -r requirements-dev.txt
- name: Build HTML
run: |
sphinx-build -b html docs/source 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/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
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)
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

%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
25 changes: 25 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Configuration file for the Sphinx documentation builder."""


import os
import sys

sys.path.insert(0, os.path.abspath("../.."))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "PyProBE"
copyright = (
"2024, Thomas Holland, Electrochemical Science and Engineering Group,"
"Imperial College London"
)

author = "Thomas Holland"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["sphinx.ext.autodoc", "sphinx_rtd_theme", "sphinx.ext.napoleon"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_rtd_theme"
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. PyProBE documentation master file, created by
sphinx-quickstart on Wed May 15 18:15:32 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to PyProBE's documentation!
===================================

.. toctree::
:maxdepth: 2
:caption: Contents:



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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyprobe
=======

.. toctree::
:maxdepth: 4

pyprobe
37 changes: 37 additions & 0 deletions docs/source/pyprobe.experiments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pyprobe.experiments package
===========================

Submodules
----------

pyprobe.experiments.cycling module
----------------------------------

.. automodule:: pyprobe.experiments.cycling
:members:
:undoc-members:
:show-inheritance:

pyprobe.experiments.pOCV module
-------------------------------

.. automodule:: pyprobe.experiments.pOCV
:members:
:undoc-members:
:show-inheritance:

pyprobe.experiments.pulsing module
----------------------------------

.. automodule:: pyprobe.experiments.pulsing
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pyprobe.experiments
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/pyprobe.methods.differentiation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pyprobe.methods.differentiation package
=======================================

Submodules
----------

pyprobe.methods.differentiation.feng\_2020 module
-------------------------------------------------

.. automodule:: pyprobe.methods.differentiation.feng_2020
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pyprobe.methods.differentiation
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/source/pyprobe.methods.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pyprobe.methods package
=======================

Subpackages
-----------

.. toctree::
:maxdepth: 4

pyprobe.methods.differentiation

Module contents
---------------

.. automodule:: pyprobe.methods
:members:
:undoc-members:
:show-inheritance:
110 changes: 110 additions & 0 deletions docs/source/pyprobe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
pyprobe package
===============

Subpackages
-----------

.. toctree::
:maxdepth: 4

pyprobe.experiments
pyprobe.methods

Submodules
----------

pyprobe.batterycycler module
----------------------------

.. automodule:: pyprobe.batterycycler
:members:
:undoc-members:
:show-inheritance:

pyprobe.cell module
-------------------

.. automodule:: pyprobe.cell
:members:
:undoc-members:
:show-inheritance:

pyprobe.dashboard module
------------------------

.. automodule:: pyprobe.dashboard
:members:
:undoc-members:
:show-inheritance:

pyprobe.experiment module
-------------------------

.. automodule:: pyprobe.experiment
:members:
:undoc-members:
:show-inheritance:

pyprobe.filter module
---------------------

.. automodule:: pyprobe.filter
:members:
:undoc-members:
:show-inheritance:

pyprobe.method module
---------------------

.. automodule:: pyprobe.method
:members:
:undoc-members:
:show-inheritance:

pyprobe.plot module
-------------------

.. automodule:: pyprobe.plot
:members:
:undoc-members:
:show-inheritance:

pyprobe.procedure module
------------------------

.. automodule:: pyprobe.procedure
:members:
:undoc-members:
:show-inheritance:

pyprobe.rawdata module
----------------------

.. automodule:: pyprobe.rawdata
:members:
:undoc-members:
:show-inheritance:

pyprobe.result module
---------------------

.. automodule:: pyprobe.result
:members:
:undoc-members:
:show-inheritance:

pyprobe.units module
--------------------

.. automodule:: pyprobe.units
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pyprobe
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 32f694d

Please sign in to comment.