Skip to content

Commit 58f9140

Browse files
authored
Merge pull request #2 from CCPBioSim/docs
put docs in sphinx
2 parents e3b0f61 + 216416e commit 58f9140

File tree

7 files changed

+288
-17
lines changed

7 files changed

+288
-17
lines changed

.github/workflows/sphinx.yaml

Whitespace-only changes.

pages/Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = build
9+
10+
# User-friendly check for sphinx-build
11+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13+
endif
14+
15+
# Internal variables.
16+
PAPEROPT_a4 = -D latex_paper_size=a4
17+
PAPEROPT_letter = -D latex_paper_size=letter
18+
ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19+
# the i18n builder cannot share the environment and doctrees with the others
20+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
21+
22+
.PHONY: all help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext customdefault
23+
24+
## Runs nit-picky and converting warnings into errors to
25+
## make sure the documentation is properly written
26+
customdefault:
27+
$(SPHINXBUILD) -b html -nW $(ALLSPHINXOPTS) $(BUILDDIR)/html
28+
29+
all: html
30+
31+
clean:
32+
rm -r $(BUILDDIR)
33+
34+
html:
35+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
36+
@echo
37+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
38+
39+
40+
view:
41+
xdg-open $(BUILDDIR)/html/index.html
734 KB
Loading
734 KB
Loading

pages/source/conf.py

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/stable/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
15+
# Incase the project was not installed
16+
import os
17+
import sys
18+
import time
19+
20+
sys.path.insert(0, os.path.abspath(".."))
21+
22+
# -- Project information -----------------------------------------------------
23+
24+
project = "ccpbiosim dev"
25+
copyright_first_year = "2025"
26+
copyright_owners = "CCPBioSim"
27+
author = "James Gebbie-Rayet"
28+
current_year = str(time.localtime().tm_year)
29+
copyright_year_string = (
30+
current_year
31+
if current_year == copyright_first_year
32+
else f"{copyright_first_year}-{current_year}"
33+
)
34+
copyright = f"{copyright_year_string}, {copyright_owners}. All rights reserved"
35+
36+
# The short X.Y version
37+
version = ""
38+
# The full version, including alpha/beta/rc tags
39+
release = ""
40+
41+
42+
# -- General configuration ---------------------------------------------------
43+
44+
# If your documentation needs a minimal Sphinx version, state it here.
45+
#
46+
# needs_sphinx = '1.0'
47+
48+
# Add any Sphinx extension module names here, as strings. They can be
49+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50+
# ones.
51+
extensions = [
52+
"sphinx.ext.autosummary",
53+
"sphinx.ext.autodoc",
54+
"sphinx.ext.mathjax",
55+
"sphinx.ext.viewcode",
56+
"sphinx.ext.napoleon",
57+
"sphinx.ext.intersphinx",
58+
"sphinx.ext.extlinks",
59+
"sphinx_copybutton",
60+
"myst_parser",
61+
]
62+
63+
autosummary_generate = True
64+
napoleon_google_docstring = False
65+
napoleon_use_param = False
66+
napoleon_use_ivar = True
67+
68+
# Add any paths that contain templates here, relative to this directory.
69+
# templates_path = ["_templates"]
70+
71+
# The suffix(es) of source filenames.
72+
# You can specify multiple suffix as a list of string:
73+
#
74+
source_suffix = ['.rst', '.md']
75+
#source_suffix = ".md"
76+
77+
# The master toctree document.
78+
master_doc = "index"
79+
80+
# The language for content autogenerated by Sphinx. Refer to documentation
81+
# for a list of supported languages.
82+
#
83+
# This is also used if you do content translation via gettext catalogs.
84+
# Usually you set "language" from the command line for these cases.
85+
language = "en"
86+
87+
# List of patterns, relative to source directory, that match files and
88+
# directories to ignore when looking for source files.
89+
# This pattern also affects html_static_path and html_extra_path .
90+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
91+
92+
# The name of the Pygments (syntax highlighting) style to use.
93+
pygments_style = "default"
94+
95+
96+
# -- Options for HTML output -------------------------------------------------
97+
98+
# The theme to use for HTML and HTML Help pages. See the documentation for
99+
# a list of builtin themes.
100+
#
101+
html_theme = "furo"
102+
# html_logo = "images/blaah"
103+
104+
# Theme options are theme-specific and customize the look and feel of a theme
105+
# further. For a list of options available for each theme, see the
106+
# documentation.
107+
#
108+
# html_theme_options = {}
109+
html_theme_options = {
110+
"light_logo": "ccpbiosim-dark-sq.png", # Your light mode logo file
111+
"dark_logo": "ccpbiosim-light-sq.png", # Your dark mode logo file
112+
}
113+
114+
# Add any paths that contain custom static files (such as style sheets) here,
115+
# relative to this directory. They are copied after the builtin static files,
116+
# so a file named "default.css" will overwrite the builtin "default.css".
117+
html_static_path = ["_static"]
118+
119+
# Custom sidebar templates, must be a dictionary that maps document names
120+
# to template names.
121+
#
122+
# The default sidebars (for documents that don't match any pattern) are
123+
# defined by theme itself. Builtin themes are using these templates by
124+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
125+
# 'searchbox.html']``.
126+
#
127+
# html_sidebars = {}
128+
129+
130+
# -- Options for HTMLHelp output ---------------------------------------------
131+
132+
# Output file base name for HTML help builder.
133+
htmlhelp_basename = "ccpbiosim_doc"
134+
135+
136+
# -- Options for LaTeX output ------------------------------------------------
137+
138+
latex_elements = {
139+
# The paper size ('letterpaper' or 'a4paper').
140+
#
141+
# 'papersize': 'letterpaper',
142+
# The font size ('10pt', '11pt' or '12pt').
143+
#
144+
# 'pointsize': '10pt',
145+
# Additional stuff for the LaTeX preamble.
146+
#
147+
# 'preamble': '',
148+
# Latex figure (float) alignment
149+
#
150+
# 'figure_align': 'htbp',
151+
}
152+
153+
# Grouping the document tree into LaTeX files. List of tuples
154+
# (source start file, target name, title,
155+
# author, documentclass [howto, manual, or own class]).
156+
latex_documents = [
157+
(
158+
master_doc,
159+
"ccpbiosim.tex",
160+
"CCPBioSim Developers Documentation",
161+
"CCPBioSim",
162+
"manual",
163+
),
164+
]
165+
166+
167+
# -- Options for manual page output ------------------------------------------
168+
169+
# One entry per manual page. List of tuples
170+
# (source start file, name, description, authors, manual section).
171+
man_pages = [(master_doc, "CCPBioSim", "CCPBioSim Developers Documentation", [author], 1)]
172+
173+
174+
# -- Options for Texinfo output ----------------------------------------------
175+
176+
# Grouping the document tree into Texinfo files. List of tuples
177+
# (source start file, target name, title, author,
178+
# dir menu entry, description, category)
179+
texinfo_documents = [
180+
(
181+
master_doc,
182+
"CCPBioSim",
183+
"CCPBioSim Developers Documentation",
184+
author,
185+
"CCPBioSim",
186+
"CCPBioSim developer pages for its GitHub organisation.",
187+
),
188+
]
189+
190+
191+
# -- Extension configuration -------------------------------------------------
192+
def setup(app):
193+
app.add_css_file("custom.css")

pages/source/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Welcome to CCPBioSim Developer Organisation
2+
===========================================
3+
4+
This GitHub organisation contains software, workshop material and many other types of repositories. These pages are aimed at developers, not users. They contain information about our development practices as well as details of which repositories are actively maintained and which are not.
5+
6+
This is currently a work in progress. Over time we wish to add things like roadmaps, dashboards, docs about coding etc etc.
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:caption: Contents:
11+
12+
workshops-dash
13+
14+
Indices and tables
15+
------------------
16+
17+
* :ref:`genindex`
18+
* :ref:`modindex`
19+
* :ref:`search`

0 commit comments

Comments
 (0)