Skip to content

Commit

Permalink
Add numpydoc Sphinx extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Feb 27, 2024
1 parent dec5667 commit 6be44ef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ jobs:
steps:
- uses: actions/checkout@v4


- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.11'

- name: Install poetry
run: pipx install poetry
Expand All @@ -80,7 +79,7 @@ jobs:
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.11'

- name: Install poetry
run: pipx install poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-on-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.11'

- name: Install poetry
run: pipx install poetry
Expand Down
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"numpydoc",
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinxcontrib.contentui",
]
Expand All @@ -39,6 +40,9 @@
"ase": ("https://wiki.fysik.dtu.dk/ase/", None),
}

numpydoc_validation_checks = {"all", "EX01", "SA01", "ES01"}
numpydoc_validation_exclude = {r"\.__weakref__$", r"\.__repr__$"}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ optional = true
[tool.poetry.group.docs.dependencies]
furo = "^2024.1.29"
markupsafe = "<2.1"
numpydoc = "^1.6.0"
sphinx = "^7.2.6"
sphinxcontrib-contentui = "^0.2.5"
sphinxcontrib-details-directive = "^0.1"
Expand Down

0 comments on commit 6be44ef

Please sign in to comment.