Skip to content

Commit 312b663

Browse files
authored
Merge pull request #113 from andthum/docs/update
Update Documentation
2 parents 59f4be7 + 78290a2 commit 312b663

17 files changed

+129
-43
lines changed

AUTHORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Release-Wise List of Authors
2222
Upcoming release
2323

2424
* Add your name, if you have contributed to the upcoming release.
25-
Athors are ordered alphabetically by their full name.
25+
Authors are ordered alphabetically by their full name.
2626
Additionally, add your name to the `authors` option of the
2727
`[project]` section in `pyproject.toml`.
2828
* Andreas Thum

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPHINXBUILD = sphinx-build
77
SOURCEDIR = source
88
BUILDDIR = build
99
AUTOSUMDIR_PATTERN = _sphinx_autosummary*
10-
AUTOSUMDIR = $(shell find $(SOURCEDIR) -name "$(AUTOSUMDIR_PATTERN)")
10+
AUTOSUMDIR = $(shell find $(SOURCEDIR) -type d -name "$(AUTOSUMDIR_PATTERN)")
1111

1212
# Put this first so that "make" without argument is like "make help".
1313
help:

docs/README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,13 @@ After installing all requirements, the documentation can be built via
3434
# Deactivate the virtual Python environment.
3535
deactivate
3636
37+
To clean the build directory and remove all automatically generated
38+
files, run in the ``docs/`` directory the following commands.
39+
40+
.. code-block:: bash
41+
42+
make clean
43+
make clean_autosum
44+
3745
3846
.. _Sphinx: https://www.sphinx-doc.org/

docs/requirements-docs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Requirements to build hpcss' documentation.
22

3-
sphinx >=3.0, <7.0
4-
sphinx-rtd-theme <2.0
5-
tomlkit < 1.0
3+
sphinx >=5.0, <7.0
4+
sphinx-rtd-theme >=1.0, <2.0
5+
tomlkit >=0.1, < 1.0

docs/source/conf.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# Standard libraries
2121
import os
2222
import sys
23+
from datetime import datetime
2324

2425
# Third-party libraries
2526
import tomlkit
@@ -32,11 +33,12 @@
3233
# is relative to the documentation root, use os.path.abspath to make it
3334
# absolute, like shown here.
3435

35-
# Recursively import all directories containing Pyhon scripts.
36+
# Recursively import all directories containing Python scripts.
3637
directories = ("analysis", "python", "simulation")
3738
for directory in directories:
38-
for path in os.walk(os.path.abspath("../../" + directory)):
39-
sys.path.insert(1, path[0])
39+
for root, _dirs, _files in os.walk(os.path.abspath("../../" + directory)):
40+
if os.path.basename(os.path.normpath(root)) not in ("", "__pycache__"):
41+
sys.path.insert(1, root)
4042

4143

4244
# -- Project information -----------------------------------------------
@@ -50,7 +52,8 @@
5052
author = ", ".join(str(dct["name"]) for dct in metadata["project"]["authors"])
5153

5254
# A copyright statement in the style "2008, Author Name".
53-
years = "2021, 2022"
55+
now = datetime.now().year
56+
years = "2021-{}, ".format(now)
5457
copyright = "Copyright (C) " + years + " " + author # noqa: A001
5558

5659
# The short X.Y version
@@ -228,7 +231,7 @@
228231
default_role = None
229232

230233
# If your documentation needs a minimal Sphinx version, state it here.
231-
needs_sphinx = "3.0"
234+
needs_sphinx = "5.0"
232235

233236
# If true, Sphinx will warn about all references where the target cannot
234237
# be found. This includes also argument types like "array_like",
@@ -304,7 +307,7 @@
304307
# large.
305308
html_favicon = "../logo/hpcss_favicon_32x32.png"
306309

307-
# A list of CSS files. Filenams must be relative to html_static_path.
310+
# A list of CSS files. Filenames must be relative to html_static_path.
308311
html_css_files = ["custom.css"]
309312

310313
# A list of paths that contain custom static files (such as style sheets

docs/source/doc_pages/dev_guide/build_docs.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ After installing all requirements, the documentation can be built via
3030
make doctest
3131
# Deactivate the virtual Python environment.
3232
deactivate
33+
34+
To clean the build directory and remove all automatically generated
35+
files, run in the :file:`docs/` directory the following commands.
36+
37+
.. code-block:: bash
38+
39+
make clean
40+
make clean_autosum

docs/source/doc_pages/dev_guide/code_guidelines_py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Other Python Code Guidelines
7575
- Constant variable names: ``UPPER_CASE_WITH_UNDERSCORES``
7676
- Underscores:
7777

78-
+ ``_``: For throwaway varibales, i.e. for variables that
78+
+ ``_``: For throwaway variables, i.e. for variables that
7979
will never be used. For instance if a function returns
8080
two values, but only one is of interest.
8181
+ ``single_trailing_underscore_``: Used by convention to

docs/source/doc_pages/dev_guide/dev_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mess.
2020
comfortable with that *before* you contribute to the project.
2121

2222
.. toctree::
23-
:caption: Table of Contens
23+
:caption: Table of Contents
2424
:name: dev-guide-toc
2525
:maxdepth: 1
2626
:hidden:

docs/source/doc_pages/dev_guide/dev_install.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interfere with other Python packages installed on your computer.
6060
3. Install the Development Packages
6161
-----------------------------------
6262

63-
Install the pacakges required for developing the project (i.e.
63+
Install the packages required for developing the project (i.e.
6464
formatters, linters, testing packages, pre-commit, etc.) into the
6565
:ref:`development environment <set-up-dev-env-label>`:
6666

@@ -84,6 +84,20 @@ this project by typing:
8484
8585
pre-commit install --install-hooks
8686
87+
.. note::
88+
89+
You might need to install
90+
`markdownlint <https://github.com/markdownlint/markdownlint>`_ (a
91+
Ruby gem package) in order to get the markdownlint pre-commit hook
92+
running.
93+
94+
Software required for installing `RubyGems <https://rubygems.org/>`_
95+
packages:
96+
97+
* Ruby developer package
98+
* `Ruby <https://www.ruby-lang.org/en/>`_
99+
* `RubyGems <https://rubygems.org/>`_
100+
87101
You can check if pre-commit works properly by running
88102

89103
.. code-block:: bash

docs/source/doc_pages/dev_guide/doc_guidelines.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In short:
3232
* Use docstrings to explain *what* the code does and *how to use*
3333
it.
3434

35-
Documentation is inteded to be read by users that don't
35+
Documentation is intended to be read by users that don't
3636
necessarily know anything about programming. Especially, they
3737
don't want to read the source code. Think about what you would
3838
like to know when using the code from someone else.

0 commit comments

Comments
 (0)