Skip to content

Commit

Permalink
fix(docs): Improve documentation (#77)
Browse files Browse the repository at this point in the history
* First push

* minor change
  • Loading branch information
sylvaincom authored Nov 12, 2024
1 parent 5e581d5 commit 749467e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
API
===

This page lists all the public functions and classes of the `hazardous`
This page lists all the public functions and classes of the ``hazardous``
package:

.. currentmodule:: hazardous
Expand Down
34 changes: 28 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx_gallery.gen_gallery',
'sphinx.ext.autosummary',
"numpydoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
'numpydoc',
'sphinx_design',
"sphinx_design",
"sphinx_gallery.gen_gallery",
"sphinx_copybutton",
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Expand All @@ -40,8 +41,17 @@

# sphinx_gallery options
sphinx_gallery_conf = {
'examples_dirs': '../examples', # path to example scripts
'gallery_dirs': 'auto_examples', # path to gallery generated output
"examples_dirs": "../examples", # path to example scripts
"gallery_dirs": "auto_examples", # path to gallery generated output
"within_subsection_order": "FileNameSortKey", # See https://sphinx-gallery.github.io/stable/configuration.html#sorting-gallery-examples for alternatives
"show_memory": False,
"write_computation_times": False,
'reference_url': {
# Intersphinx links
# The module you locally document uses None
'hazardous': None,
}

}

# intersphinx configuration
Expand All @@ -57,4 +67,16 @@
"announcement": (
"https://raw.githubusercontent.com/soda-inria/hazardous/main/doc/announcement.html"
),
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/soda-inria/hazardous/",
"icon": "fa-brands fa-github",
},
],

}

# Sphinx-Copybutton configuration
copybutton_prompt_text = r">>> |\.\.\. |\$ "
copybutton_prompt_is_regexp = True
2 changes: 1 addition & 1 deletion examples/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Examples
========

Below is a gallery of examples on how to use `hazardous` for predictive
Below is a gallery of examples on how to use ``hazardous`` for predictive
competive risk analysis problems.
File renamed without changes.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ doc = [
"pydata-sphinx-theme",
"sphinx-gallery",
"sphinx-design",
"sphinx-copybutton",
"matplotlib",
"pillow", # to scrape images from the examples
"numpydoc",
Expand Down

0 comments on commit 749467e

Please sign in to comment.