Skip to content

Commit

Permalink
ci: setup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 10, 2023
1 parent 9391566 commit ed545e1
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
formats:
- pdf
build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_checkout:
- git fetch --unshallow || true
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
46 changes: 46 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import pathlib
import tomllib

import chipstream
# 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

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'ChipStream'
github_project = 'DC-analysis/' + project

with (pathlib.Path(__file__).parent.parent / "pyproject.toml").open("rb") as f:
data = tomllib.load(f)
authors = [a["name"] for a in data["project"]["authors"]]
author = ", ".join(authors)
copyright = '2023, ' + author
release = chipstream.__version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

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 = 'sphinx_rtd_theme'
html_static_path = ['_static']


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ('https://docs.python.org/', None),
"dclab": ('https://dclab.readthedocs.io/en/stable/', None),
"dcnum": ('https://dcnum.readthedocs.io/en/stable/', None),
"h5py": ('https://h5py.readthedocs.io/en/stable/', None),
"numpy": ('https://docs.scipy.org/doc/numpy/', None),
}
18 changes: 18 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Welcome to ChipStream's documentation!
======================================

Missing something? Please create an
`issue <https://github.com/DC-analysis/ChipStream/issues>`_.

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



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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx
sphinxcontrib.bibtex>=2.0
sphinx_rtd_theme==1.0

0 comments on commit ed545e1

Please sign in to comment.