From 795733eede8b71f7455750af0d08bc81406b54b6 Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Thu, 3 Feb 2022 10:47:21 +0100 Subject: [PATCH] docs: add Hypothesis and utterances overlay (#159) --- .pre-commit-config.yaml | 2 +- docs/conf.py | 12 ++++++++++++ docs/formalisms/helicity.md | 2 +- docs/formalisms/tensor.md | 2 ++ docs/glossary.md | 2 +- setup.cfg | 1 + 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa1b08ee..a88b9560 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: - id: black - repo: https://github.com/asottile/blacken-docs - rev: v1.12.0 + rev: v1.12.1 hooks: - id: blacken-docs diff --git a/docs/conf.py b/docs/conf.py index b09f02a5..8a6897e3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -86,6 +86,7 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "sphinx_comments", "sphinx_copybutton", "sphinx_math_dollar", "sphinx_panels", @@ -173,6 +174,7 @@ linkcheck_ignore = [ "http://127.0.0.1:8000", "https://doi.org/10.1093/ptep/ptaa104", + "https://suchung.web.cern.ch", ] # Settings for myst_nb @@ -212,6 +214,16 @@ } myst_update_mathjax = False +# Settings for sphinx_comments +comments_config = { + "hypothesis": True, + "utterances": { + "repo": f"ComPWA/{REPO_NAME}", + "issue-term": "pathname", + "label": "📝 Docs", + }, +} + # Settings for Thebe cell output thebe_config = { "repository_url": html_theme_options["repository_url"], diff --git a/docs/formalisms/helicity.md b/docs/formalisms/helicity.md index 96d3cd9d..930bcaff 100644 --- a/docs/formalisms/helicity.md +++ b/docs/formalisms/helicity.md @@ -79,7 +79,7 @@ an example here. --> Recommended literature: - + - General introductions to helicity angles:
diff --git a/docs/formalisms/tensor.md b/docs/formalisms/tensor.md index 61e1f4bc..05385060 100644 --- a/docs/formalisms/tensor.md +++ b/docs/formalisms/tensor.md @@ -6,6 +6,8 @@ ### Covariant Tensor formalisms + + {cite}`anisovichMomentoperatorExpansionTwomeson2002` ## Non-covariant tensor formalisms diff --git a/docs/glossary.md b/docs/glossary.md index 11aa772d..73366272 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -1,4 +1,4 @@ - + # Glossary diff --git a/setup.cfg b/setup.cfg index 6c8ab2b0..3677ac14 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,6 +64,7 @@ doc = myst-nb >=0.11 # myst_enable_extensions Sphinx >=3 sphinx-book-theme + sphinx-comments sphinx-copybutton sphinx-math-dollar sphinx-panels