Skip to content

Commit

Permalink
DOC: improve website navigation buttons (#227)
Browse files Browse the repository at this point in the history
* DOC: add ✅ for TR-021
* DOC: add Deepnote launch button
* DOC: add source code button
* DOC: remove download button
  Better to add "Source code" button
* DOC: show author name in bibtex citations
* DOC: link to Chung reference in TR-024
* ENH: remove Markdown comments from report table
* ENH: remove `ComPWA/` from issue numebr
* MAINT: remove outdated `thebelab` entry
* MAINT: remove Sphinx autodoc extension
  Not used because this is not a package
* MAINT: remove redundant `pygments_style`
* MAINT: remove more redundant Sphinx options
  • Loading branch information
redeboer authored Dec 13, 2023
1 parent ecd3625 commit a192904
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
1 change: 1 addition & 0 deletions docs/_list_technical_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def _create_tr_table() -> str:
r"[\1](report/\3.ipynb)",
card_info.get("details", ""),
)
details = re.sub(r"<!---* (.*?) -*-->(<br>)?", "", details)
tags = " ".join(_to_badge(tag) for tag in sorted(card_info["tags"]))
status = re.sub(
r"\[([^\]]+)\-([^\]]+)\]\(([^\)]+)\)",
Expand Down
24 changes: 4 additions & 20 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,9 @@ def get_nb_exclusion_patterns() -> list[str]:
f"https://mybinder.org/v2/gh/ComPWA/{REPO_NAME}/{BRANCH}?filepath=docs/usage"
)

add_module_names = False
author = "Common Partial Wave Analysis"
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,
"special-members": ", ".join([
"__call__",
"__eq__",
]),
}
autosectionlabel_prefix_document = True
bibtex_bibfiles = ["bibliography.bib"]
bibtex_reference_style = "author_year"
codeautolink_concat_default = True
codeautolink_global_preface = """
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -112,7 +102,6 @@ def get_nb_exclusion_patterns() -> list[str]:
]
extensions = [
"myst_nb",
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
Expand All @@ -130,7 +119,6 @@ def get_nb_exclusion_patterns() -> list[str]:
"sphinxcontrib.bibtex",
]
graphviz_output_format = "svg"
html_copy_source = True # needed for download notebook button
html_favicon = "_static/favicon.ico"
html_js_files = [
"https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js",
Expand All @@ -141,9 +129,6 @@ def get_nb_exclusion_patterns() -> list[str]:
"https://raw.githubusercontent.com/ComPWA/ComPWA/04e5199/doc/images/logo.svg"
)
html_show_copyright = False
html_show_sourcelink = False
html_show_sphinx = False
html_sourcelink_suffix = ""
html_static_path = ["_static"]
html_theme = "sphinx_book_theme"
html_theme_options = {
Expand All @@ -164,16 +149,17 @@ def get_nb_exclusion_patterns() -> list[str]:
"repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}",
"repository_branch": BRANCH,
"path_to_docs": "docs",
"use_download_button": True,
"use_download_button": False,
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"use_source_button": True,
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
"colab_url": "https://colab.research.google.com",
"deepnote_url": "https://deepnote.com",
"notebook_interface": "jupyterlab",
"thebe": True,
"thebelab": True,
},
"show_toc_level": 2,
}
Expand Down Expand Up @@ -219,7 +205,6 @@ def get_nb_exclusion_patterns() -> list[str]:
"https://www.andiamo.co.uk/resources/iso-language-codes", # 443, but works
"https://www.bookfinder.com",
]
master_doc = "index"
myst_enable_extensions = [
"amsmath",
"colon_fence",
Expand Down Expand Up @@ -253,7 +238,6 @@ def get_nb_exclusion_patterns() -> list[str]:
nitpicky = True
primary_domain = "py"
project = REPO_TITLE
pygments_style = "sphinx"
remove_from_toctrees = [
"adr/*",
"report/*",
Expand Down
2 changes: 1 addition & 1 deletion docs/report/021.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"\n",
"This report formulates the polarimeter vector field for in $\\Lambda_c \\to p\\pi K$ with [SymPy](https://docs.sympy.org) and visualizes it as an interactive widget with [TensorWaves](https://tensorwaves.rtfd.io) and [ipywidgets](https://ipywidgets.readthedocs.io).\n",
"+++\n",
"[compwa-org#129](https://github.com/ComPWA/compwa-org/issues/129)\n",
"✅&nbsp;[compwa-org#129](https://github.com/ComPWA/compwa-org/issues/129)\n",
":::\n",
"::::"
]
Expand Down
4 changes: 2 additions & 2 deletions docs/report/024.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"<!--- cspell:ignore COMAP cxxcode dodgerblue dummify fcode fillcolor indianred royalblue srepr toprettyxml --->\n",
"Investigation into dumping SymPy expressions to human-readable format for model preservation. The notebook was motivated by the [COMAP-V workshop on analysis preservation](https://indico.cern.ch/event/1348003/). See also SymPy [printing](https://docs.sympy.org/latest/modules/printing.html), [parsing](https://docs.sympy.org/latest/modules/parsing.html), and [expression manipulation](https://docs.sympy.org/latest/tutorials/intro-tutorial/manipulation.html).\n",
"+++\n",
"🚧&nbsp;[ComPWA/polarimetry#319](https://github.com/ComPWA/polarimetry/pull/319)\n",
"🚧&nbsp;[polarimetry#319](https://github.com/ComPWA/polarimetry/pull/319)\n",
":::\n",
"::::"
]
Expand Down Expand Up @@ -435,7 +435,7 @@
"tags": []
},
"source": [
"Now, let's build up a more complicated expression that contains this phase space factor. Here, we use SymPy to derive a Breit-Wigner using a single-channel [$K$ matrix](https://doi.org/10.1002/andp.19955070504):"
"Now, let's build up a more complicated expression that contains this phase space factor. Here, we use SymPy to derive a Breit-Wigner using a single-channel [$K$ matrix](https://doi.org/10.1002/andp.19955070504) {cite}`chungPartialWaveAnalysis1995`:"
]
},
{
Expand Down

0 comments on commit a192904

Please sign in to comment.