Skip to content

Commit 87c41a7

Browse files
HenrZukilianvolmer
andauthored
1215 Preparation for readthedocs (#1217)
- initial version to set up readthedocs for our project - automatic docstring formatter problems need to be adressed next week Co-authored-by: Kilian Volmer <kvolmer@uni-bonn.de>
1 parent 35acc29 commit 87c41a7

File tree

121 files changed

+4364
-1504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4364
-1504
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,7 @@ pycode/memilio-epidata/memilio/epidata/CredentialsRegio.ini
280280
# Docs
281281
docs/html
282282
docs/xml
283+
docs/source/api
284+
docs/source/generated
283285

284286
# End of https://www.gitignore.io/api/c++,node,python

.readthedocs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: "2"
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
apt_packages:
6+
- libmagic1
7+
tools:
8+
python: "3.10"
9+
10+
python:
11+
install:
12+
- requirements: docs/requirements.txt
13+
14+
sphinx:
15+
configuration: docs/source/conf.py

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ WARN_LOGFILE =
733733
# spaces.
734734
# Note: If this tag is empty the current directory is searched.
735735

736-
INPUT = ../README.md README.md ../pycode/README.md ../pycode/memilio-epidata/memilio/epidata ../cpp/README.md ../cpp/memilio/ ../cpp/models/
736+
INPUT = ../cpp/models
737737

738738
# This tag can be used to specify the character encoding of the source files
739739
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sphinx==7.1.2
2+
sphinx-rtd-theme==1.3.0rc1
3+
furo
4+
sphinx-copybutton
5+
breathe
6+
sphinx-hoverxref
7+
pycode/memilio-epidata
8+
pycode/memilio-generation
9+
pycode/memilio-plot
10+
pycode/memilio-simulation
11+
pycode/memilio-surrogatemodel
12+
exhale
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
7+
{% block methods %}
8+
{% if '__init__' in methods %}
9+
.. automethod:: __init__
10+
:noindex:
11+
{% endif %}
12+
{% if methods %}
13+
.. rubric:: Methods Summary
14+
.. autosummary::
15+
{% for item in methods %}
16+
~{{ name }}.{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block attributes %}
22+
{% if attributes %}
23+
.. rubric:: Attributes
24+
.. autosummary::
25+
{% for item in attributes %}
26+
~{{ name }}.{{ item }}
27+
{%- endfor %}
28+
{% endif %}
29+
{% endblock %}
30+
31+
{% block methods_full %}
32+
{% if methods %}
33+
.. rubric:: Methods
34+
{% for item in methods %}
35+
.. automethod:: {{ name }}.{{ item }}
36+
{%- endfor %}
37+
{% endif %}
38+
{% endblock %}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. automodule:: {{ fullname }}
4+
:members:
5+
:undoc-members:
6+
7+
{% block attributes %}
8+
{% if attributes %}
9+
.. rubric:: {{ _('Module Attributes') }}
10+
11+
.. autosummary::
12+
{% for item in attributes %}
13+
{{ item }}
14+
{%- endfor %}
15+
{% endif %}
16+
{% endblock %}
17+
18+
{% block functions %}
19+
{% if functions %}
20+
.. rubric:: {{ _('Functions') }}
21+
22+
.. autosummary::
23+
{% for item in functions %}
24+
{{ item }}
25+
{%- endfor %}
26+
{% endif %}
27+
{% endblock %}
28+
29+
{% block classes %}
30+
{% if classes %}
31+
.. rubric:: {{ _('Classes') }}
32+
33+
.. autosummary::
34+
{% for item in classes %}
35+
{{ item }}
36+
{%- endfor %}
37+
{% endif %}
38+
{% endblock %}
39+
40+
{% block exceptions %}
41+
{% if exceptions %}
42+
.. rubric:: {{ _('Exceptions') }}
43+
44+
.. autosummary::
45+
{% for item in exceptions %}
46+
{{ item }}
47+
{%- endfor %}
48+
{% endif %}
49+
{% endblock %}
50+
51+
{% block modules %}
52+
{% if modules %}
53+
.. rubric:: Modules
54+
55+
.. autosummary::
56+
:toctree:
57+
:recursive:
58+
{% for item in modules %}
59+
{{ item }}
60+
{%- endfor %}
61+
{% endif %}
62+
{% endblock %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "!breadcrumbs.html" %}
2+
{%- block breadcrumbs_aside %}
3+
<li class="wy-breadcrumbs-aside", style="margin-left: 20px;">
4+
<a href="https://github.com/SciCompMod/memilio" target="_blank" aria-label="GitHub">
5+
<svg height="24" width="24" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
6+
<path fill-rule="evenodd"
7+
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z">
8+
</path>
9+
</svg>
10+
</a>
11+
</li>
12+
{{ super() }}
13+
{% endblock %}

0 commit comments

Comments
 (0)