Skip to content

Commit

Permalink
update sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtgoncalves committed Apr 15, 2024
1 parent 77929d7 commit 6d45ed0
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 126 deletions.
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
32 changes: 32 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../src/epidemik/'))

# 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 = 'epidemik'
copyright = '2024, Bruno Goncalves'
author = 'Bruno Goncalves'
release = '0.0.20'

# -- 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']
45 changes: 45 additions & 0 deletions docs/epidemik.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
epidemik package
================

Submodules
----------

epidemik.EpiModel module
------------------------

.. automodule:: epidemik.EpiModel
:members:
:undoc-members:
:show-inheritance:

epidemik.MetaEpiModel module
----------------------------

.. automodule:: epidemik.MetaEpiModel
:members:
:undoc-members:
:show-inheritance:

epidemik.NetworkEpiModel module
-------------------------------

.. automodule:: epidemik.NetworkEpiModel
:members:
:undoc-members:
:show-inheritance:

epidemik.utils module
---------------------

.. automodule:: epidemik.utils
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: epidemik
:members:
:undoc-members:
:show-inheritance:
20 changes: 20 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. epidemik documentation master file, created by
sphinx-quickstart on Mon Apr 15 09:20:13 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to epidemik's documentation!
====================================

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



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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
10 changes: 5 additions & 5 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help
set SOURCEDIR=.
set BUILDDIR=_build

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

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

Expand Down
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
epidemik
========

.. toctree::
:maxdepth: 4

epidemik
8 changes: 6 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1
matplotlib>=3.3
networkx>=3
numpy>=1.2
pandas>=2.0
scipy>=1.10
tqdm>=4
55 changes: 0 additions & 55 deletions docs/source/conf.py

This file was deleted.

60 changes: 0 additions & 60 deletions docs/source/index.rst

This file was deleted.

4 changes: 2 additions & 2 deletions tests/tests_MetaEpiModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

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

self.SIR = MetaEpiModel(self.travel, self.population)
self.beta = 0.3
Expand Down

0 comments on commit 6d45ed0

Please sign in to comment.