Skip to content

Commit 6d45ed0

Browse files
committed
update sphinx
1 parent 77929d7 commit 6d45ed0

10 files changed

+119
-126
lines changed

docs/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8-
SOURCEDIR = source
9-
BUILDDIR = build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
1010

1111
# Put it first so that "make" without argument is like "make help".
1212
help:

docs/conf.py

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import os
2+
import sys
3+
sys.path.insert(0, os.path.abspath('../src/epidemik/'))
4+
5+
# Configuration file for the Sphinx documentation builder.
6+
#
7+
# For the full list of built-in configuration values, see the documentation:
8+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
9+
10+
# -- Project information -----------------------------------------------------
11+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12+
13+
project = 'epidemik'
14+
copyright = '2024, Bruno Goncalves'
15+
author = 'Bruno Goncalves'
16+
release = '0.0.20'
17+
18+
# -- General configuration ---------------------------------------------------
19+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
20+
21+
extensions = []
22+
23+
templates_path = ['_templates']
24+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
25+
26+
27+
28+
# -- Options for HTML output -------------------------------------------------
29+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
30+
31+
html_theme = 'sphinx_rtd_theme'
32+
html_static_path = ['_static']

docs/epidemik.rst

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
epidemik package
2+
================
3+
4+
Submodules
5+
----------
6+
7+
epidemik.EpiModel module
8+
------------------------
9+
10+
.. automodule:: epidemik.EpiModel
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
epidemik.MetaEpiModel module
16+
----------------------------
17+
18+
.. automodule:: epidemik.MetaEpiModel
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
epidemik.NetworkEpiModel module
24+
-------------------------------
25+
26+
.. automodule:: epidemik.NetworkEpiModel
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
epidemik.utils module
32+
---------------------
33+
34+
.. automodule:: epidemik.utils
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: epidemik
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:

docs/index.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. epidemik documentation master file, created by
2+
sphinx-quickstart on Mon Apr 15 09:20:13 2024.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to epidemik's documentation!
7+
====================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
14+
15+
Indices and tables
16+
==================
17+
18+
* :ref:`genindex`
19+
* :ref:`modindex`
20+
* :ref:`search`

docs/make.bat

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ REM Command file for Sphinx documentation
77
if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
13-
if "%1" == "" goto help
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
1412

1513
%SPHINXBUILD% >NUL 2>NUL
1614
if errorlevel 9009 (
@@ -21,10 +19,12 @@ if errorlevel 9009 (
2119
echo.may add the Sphinx directory to PATH.
2220
echo.
2321
echo.If you don't have Sphinx installed, grab it from
24-
echo.http://sphinx-doc.org/
22+
echo.https://www.sphinx-doc.org/
2523
exit /b 1
2624
)
2725

26+
if "%1" == "" goto help
27+
2828
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2929
goto end
3030

docs/modules.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
epidemik
2+
========
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
epidemik

docs/requirements.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
sphinx==7.1.2
2-
sphinx-rtd-theme==1.3.0rc1
1+
matplotlib>=3.3
2+
networkx>=3
3+
numpy>=1.2
4+
pandas>=2.0
5+
scipy>=1.10
6+
tqdm>=4

docs/source/conf.py

-55
This file was deleted.

docs/source/index.rst

-60
This file was deleted.

tests/tests_MetaEpiModel.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
class MetaEpiModelTestCase(unittest.TestCase):
77
def setUp(self):
8-
self.travel = pd.DataFrame({'A': [0.9, 0.1], 'B':[0.1, 0.9]}, index=["A", "B"])
9-
self.population = pd.DataFrame({'Population':[100000, 10000]}, index=["A", "B"])
8+
self.travel = pd.DataFrame({'A': [0.99, 0.1], 'B':[0.01, 0.9]}, index=["A", "B"])
9+
self.population = pd.DataFrame({'Population':[100_000, 10_000]}, index=["A", "B"])
1010

1111
self.SIR = MetaEpiModel(self.travel, self.population)
1212
self.beta = 0.3

0 commit comments

Comments
 (0)