From cdf5d5bcd3c9d9275d534ecec0283e2d5f027b15 Mon Sep 17 00:00:00 2001 From: Christian Faber <chris-faber@gmx.de> Date: Mon, 21 Oct 2024 09:57:42 +0200 Subject: [PATCH] addin prolog to sphinx --- docs/source/conf.py | 23 +++++++++++++---------- docs/source/prolog.inc | 4 ++++ src/BioHelpers_FABER/rmsd.py | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 docs/source/prolog.inc diff --git a/docs/source/conf.py b/docs/source/conf.py index e4babb4..b028263 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,16 +13,17 @@ import os import sys from pathlib import Path + # sys.path.insert(0, os.path.abspath('../../src')) # sys.path.insert(0, os.path.abspath(os.path.join('..', '..', 'src'))) -sys.path.append(os.path.abspath('../../src')) +sys.path.append(os.path.abspath("../../src")) # sys.path.append(Path(__file__).parent.parent.as_posix()) # -- Project information ----------------------------------------------------- -project = 'BioHelpers' -copyright = '2024, Christian Faber' -author = 'Christian Faber' +project = "BioHelpers" +copyright = "2024, Christian Faber" +author = "Christian Faber" # -- General configuration --------------------------------------------------- @@ -31,27 +32,29 @@ author = 'Christian Faber' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.duration', - 'sphinx.ext.doctest', - 'sphinx.ext.autodoc', - 'sphinx.ext.napoleon', + "sphinx.ext.duration", + "sphinx.ext.doctest", + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +with open("prolog.inc", "r") as file: + rst_prolog = file.readlines() # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # 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, diff --git a/docs/source/prolog.inc b/docs/source/prolog.inc new file mode 100644 index 0000000..bf2150f --- /dev/null +++ b/docs/source/prolog.inc @@ -0,0 +1,4 @@ +.. # define a hard line break for HTML +.. |br| raw:: html + + <br /> \ No newline at end of file diff --git a/src/BioHelpers_FABER/rmsd.py b/src/BioHelpers_FABER/rmsd.py index 271d1dc..cdc9d37 100644 --- a/src/BioHelpers_FABER/rmsd.py +++ b/src/BioHelpers_FABER/rmsd.py @@ -82,7 +82,7 @@ def get_rotation_matrix(x: np.ndarray, y: np.ndarray) -> np.ndarray: def get_translation_vector(x: np.ndarray, y: np.ndarray) -> np.ndarray: """Get the translation vector :math:`\mathbf{r}` - | **Important Note:** The translation vector differs from Kabsch algorithm, there you translate befor rotating. In Coutsias paper it is the otherway round. + **Important Note:** The translation vector differs from Kabsch algorithm, there you translate befor rotating. In Coutsias paper it is the otherway round. :param x: set of vectors :type x: np.ndarray -- GitLab