From efd6edd314cda5801082e194340abe5237d00d48 Mon Sep 17 00:00:00 2001 From: Jen Schripsema Date: Thu, 28 Sep 2023 12:53:46 -0600 Subject: [PATCH] updated Sphinx config to correctly apply css, corrected typos in .gitignore and demo docstring --- .gitignore | 2 +- docs/conf.py | 32 +++++++++++++------ .../demographics/TyphoidDemographics.py | 2 +- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index ffdfa61..785494c 100644 --- a/.gitignore +++ b/.gitignore @@ -70,7 +70,7 @@ instance/ # Sphinx documentation docs/_build/ -docs/emodpy-typhoid*.rst +docs/emodpy_typhoid*.rst docs/modules.rst # PyBuilder diff --git a/docs/conf.py b/docs/conf.py index 8945d56..df7d08e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,10 +59,27 @@ 'sphinx_copybutton', 'sphinx.ext.intersphinx', 'sphinxext.remoteliteralinclude', - 'myst_parser', - 'sphinx_search.extension' + 'myst_parser', # source files written in MD or RST + 'sphinx_search.extension', # search across entire IDM docs domain + 'sphinx.ext.viewcode' # link to view source code ] +myst_enable_extensions = [ + "amsmath", + "attrs_inline", + "colon_fence", + "deflist", + "dollarmath", + "fieldlist", + "html_admonition", + "html_image", + "linkify", + "replacements", + "smartquotes", + "strikethrough", + "substitution", + "tasklist", +] plantuml = 'plantweb' autodoc_default_options = { @@ -208,18 +225,13 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] -html_context = { - 'css_files': [ - '_static/theme_overrides.css', - '_static/copy_button.css' - ] -} -html_js_files = ['show_block_by_os.js'] +html_static_path = ['_static'] html_css_files = ['theme_overrides.css'] +html_js_files = ['show_block_by_os.js'] + # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/emodpy_typhoid/demographics/TyphoidDemographics.py b/emodpy_typhoid/demographics/TyphoidDemographics.py index b3789ca..89edbf2 100644 --- a/emodpy_typhoid/demographics/TyphoidDemographics.py +++ b/emodpy_typhoid/demographics/TyphoidDemographics.py @@ -81,7 +81,7 @@ def from_csv( pop_filename_in, site="No_Site", min_node_pop = 0 ): site: A string to identify the country, village, or trial site. Returns: - A :py:class:`~emodpy_malaria.demographics.MalariaDemographics` instance. + A :py:class:`~emodpy_typhoid.demographics.MalariaDemographics` instance. """ typhoid_demog = Demog.from_csv( pop_filename_in ) nodes = []