Skip to content

Commit

Permalink
Merge branch 'main' into py3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Feb 7, 2024
2 parents f83273f + eec7322 commit 40e23ed
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 179 deletions.
2 changes: 0 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"transisions"
],
"ignorePaths": [
"**/*.rst_t",
"**/.cspell.json",
".constraints/*.txt",
".editorconfig",
Expand All @@ -32,7 +31,6 @@
".vscode/*",
"CITATION.cff",
"codecov.yml",
"docs/_templates/*",
"docs/conf.py",
"pyproject.toml",
"tox.ini",
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2

sphinx:
builder: html
builder: dirhtml
configuration: docs/conf.py
fail_on_warning: true

Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://open.vscode.dev/ComPWA/tensorwaves)
[![GitPod](https://img.shields.io/badge/gitpod-open-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ComPWA/tensorwaves)

This package is part of the [ComPWA Organization](https://github.com/ComPWA). For more
information about how to contribute to the packages, go to
[compwa-org.rtfd.io/en/stable/develop.html](https://compwa-org.rtfd.io/en/stable/develop.html)!
This package is part of the [ComPWA Organization](https://github.com/ComPWA). For more information about how to contribute to the packages, go to [compwa.github.io/develop](https://compwa.github.io/develop)!
55 changes: 0 additions & 55 deletions docs/_templates/genindex.html

This file was deleted.

4 changes: 0 additions & 4 deletions docs/_templates/layout.html

This file was deleted.

12 changes: 0 additions & 12 deletions docs/_templates/module.rst_t

This file was deleted.

49 changes: 0 additions & 49 deletions docs/_templates/package.rst_t

This file was deleted.

7 changes: 0 additions & 7 deletions docs/_templates/toc.rst_t

This file was deleted.

2 changes: 1 addition & 1 deletion docs/amplitude-analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"source": [
"::::{margin}\n",
":::{tip}\n",
"{doc}`TR-018<compwa-org:report/018>` explains some of the mechanisms behind the phase space generator as well as how to do {ref}`importance sampling<compwa-org:report/018:Intensity distribution>`.\n",
"{doc}`TR-018<compwa:report/018>` explains some of the mechanisms behind the phase space generator as well as how to do {ref}`importance sampling<compwa:report/018:Intensity distribution>`.\n",
":::\n",
"::::\n",
"\n",
Expand Down
35 changes: 12 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
"""Configuration file for the Sphinx documentation builder.
This file only contains a selection of the most common options. For a full list see the
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

from __future__ import annotations

import os
Expand Down Expand Up @@ -144,7 +138,7 @@ def get_tensorflow_url() -> str:
"icon_links": [
{
"name": "Common Partial Wave Analysis",
"url": "https://compwa-org.rtfd.io",
"url": "https://compwa.github.io",
"icon": "_static/favicon.ico",
"type": "local",
},
Expand Down Expand Up @@ -179,14 +173,6 @@ def get_tensorflow_url() -> str:
"type": "url",
},
],
"logo": {"text": REPO_TITLE},
"repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}",
"repository_branch": BRANCH,
"path_to_docs": "docs",
"use_download_button": True,
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
"colab_url": "https://colab.research.google.com",
Expand All @@ -195,13 +181,22 @@ def get_tensorflow_url() -> str:
"thebe": True,
"thebelab": True,
},
"logo": {"text": REPO_TITLE},
"path_to_docs": "docs",
"repository_branch": BRANCH,
"repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}",
"show_navbar_depth": 2,
"show_toc_level": 2,
"use_download_button": False,
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"use_source_button": True,
}
html_title = REPO_TITLE
intersphinx_mapping = {
"ampform": (f"https://ampform.readthedocs.io/en/{pin('ampform')}", None),
"compwa-org": ("https://compwa-org.readthedocs.io", None),
"compwa": ("https://compwa.github.io", None),
"graphviz": ("https://graphviz.readthedocs.io/en/stable", None),
"iminuit": ("https://iminuit.readthedocs.io/en/stable", None),
"jax": ("https://jax.readthedocs.io/en/latest", None),
Expand All @@ -222,7 +217,6 @@ def get_tensorflow_url() -> str:
linkcheck_ignore = [
"https://unix.stackexchange.com/a/129144",
]
master_doc = "index"
modindex_common_prefix = [f"{PACKAGE}."]
myst_enable_extensions = [
"amsmath",
Expand All @@ -237,7 +231,7 @@ def get_tensorflow_url() -> str:
"run_interactive": f"""
```{{margin}}
Run this notebook [on Binder]({BINDER_LINK}) or
{{ref}}`locally on Jupyter Lab <compwa-org:develop:Jupyter Notebooks>` to interactively
{{ref}}`locally on Jupyter Lab <compwa:develop:Jupyter Notebooks>` to interactively
modify the parameters.
```
""",
Expand All @@ -257,11 +251,6 @@ def get_tensorflow_url() -> str:
project = REPO_TITLE
pygments_style = "sphinx"
release = get_package_version("tensorwaves")
source_suffix = {
".ipynb": "myst-nb",
".md": "myst-nb",
".rst": "restructuredtext",
}
thebe_config = {
"repository_url": html_theme_options["repository_url"],
"repository_branch": html_theme_options["repository_branch"],
Expand Down
12 changes: 3 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@

:::{margin}

TensorWaves originates from [`pycompwa`](https://compwa.github.io), which did its
computations through a function tree that is similar to
[TensorFlow graphs](https://www.tensorflow.org/tensorboard/graphs) and
[SymPy expression trees](https://docs.sympy.org/latest/tutorial/manipulation.html). The
decision to use Python only has been further inspired by
[TensorFlowAnalysis](https://gitlab.cern.ch/poluekt/TensorFlowAnalysis),
[AmpliTF](https://github.com/apoluekt/AmpliTF) and [zfit](https://github.com/zfit/zfit).
TensorWaves originates from [`pycompwa`](https://github.com/ComPWA/pycompwa), which did its computations through a function tree that is similar to [TensorFlow graphs](https://www.tensorflow.org/tensorboard/graphs) and [SymPy expression trees](https://docs.sympy.org/latest/tutorial/manipulation.html). The decision to use Python only has been further inspired by [TensorFlowAnalysis](https://gitlab.cern.ch/poluekt/TensorFlowAnalysis), [AmpliTF](https://github.com/apoluekt/AmpliTF) and [zfit](https://github.com/zfit/zfit).

:::

Expand Down Expand Up @@ -80,7 +74,7 @@ API <api/tensorwaves>
Continuous benchmarks <https://compwa.github.io/tensorwaves>
Changelog <https://github.com/ComPWA/tensorwaves/releases>
Upcoming features <https://github.com/ComPWA/tensorwaves/milestones?direction=asc&sort=title&state=open>
Help developing <https://compwa-org.rtfd.io/en/stable/develop.html>
Help developing <https://compwa.github.io/develop>
```

```{toctree}
Expand All @@ -91,5 +85,5 @@ hidden:
QRules <https://qrules.readthedocs.io>
AmpForm <https://ampform.readthedocs.io>
PWA Pages <https://pwa.readthedocs.io>
ComPWA project <https://compwa-org.readthedocs.io>
ComPWA project <https://compwa.github.io>
```
20 changes: 10 additions & 10 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The fastest way of installing this package is through PyPI or Conda:
:::{margin}

TensorWaves can work with different computational backends. They are provided through
{ref}`optional dependencies <compwa-org:develop:Optional dependencies>`.
{ref}`optional dependencies <compwa:develop:Optional dependencies>`.
[JAX](https://jax.readthedocs.io) is usually the fastest backend, so it's recommended to
install that as in the install examples here.

Expand Down Expand Up @@ -115,7 +115,7 @@ run into trouble.
[create an NVIDIA account](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download).

5. **[Recommended]** Install JAX with GPU binaries in your
{ref}`virtual environment <compwa-org:develop:Virtual environment>` following
{ref}`virtual environment <compwa:develop:Virtual environment>` following
[these instructions](https://github.com/google/jax#pip-installation-gpu-cuda).

```shell
Expand Down Expand Up @@ -160,13 +160,13 @@ python3 -m pip install "tensorwaves[jax,pwa] @ git+https://github.com/ComPWA/ten
If you are working on {doc}`amplitude analysis </amplitude-analysis>`, we highly
recommend using the more dynamic
{ref}`'editable installation' <compwa-org:develop:Editable installation>` instead. This
{ref}`'editable installation' <compwa:develop:Editable installation>` instead. This
allows you to:
- exactly {ref}`pin all dependencies <compwa-org:develop:Pinning dependency versions>`
- exactly {ref}`pin all dependencies <compwa:develop:Pinning dependency versions>`
to a specific version, so that your work is **reproducible**.
- edit the source code of the framework and
{doc}`help improving it <compwa-org:develop>`.
{doc}`help improving it <compwa:develop>`.
For this, you first need to get the source code with [Git](https://git-scm.com):
Expand Down Expand Up @@ -196,11 +196,11 @@ This installs the project in a Conda environment following the definitions in

1. **[Recommended]** Create a virtual environment with
[`venv`](https://docs.python.org/3/library/venv.html) (see
{ref}`here <compwa-org:develop:Virtual environment>`).
{ref}`here <compwa:develop:Virtual environment>`).

2. Install the project as an
{ref}`'editable installation' <compwa-org:develop:Editable installation>` with
{ref}`additional packages <compwa-org:develop:Optional dependencies>` for the
{ref}`'editable installation' <compwa:develop:Editable installation>` with
{ref}`additional packages <compwa:develop:Optional dependencies>` for the
developer and all dependencies pinned through
[constraints files](https://pip.pypa.io/en/stable/user_guide/#constraints-files):

Expand All @@ -212,9 +212,9 @@ This installs the project in a Conda environment following the definitions in

::::

See {ref}`compwa-org:develop:Updating` for how to update the dependencies when new
See {ref}`compwa:develop:Updating` for how to update the dependencies when new
commits come in.

That's all! Have a look at {doc}`/usage` to try out the package. You can also have a
look at {doc}`compwa-org:develop` for tips on how to work with this 'editable' developer
look at {doc}`compwa:develop` for tips on how to work with this 'editable' developer
setup!
2 changes: 1 addition & 1 deletion src/tensorwaves/function/sympy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def create_function(
function faster and speeds up lambdification.
max_complexity: See :ref:`usage/faster-lambdify:Specifying complexity` and
:doc:`compwa-org:report/002`.
:doc:`compwa:report/002`.
Example:
>>> import numpy as np
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ commands =
sphinx-build \
--keep-going \
-TW \
-b html \
-b dirhtml \
docs/ docs/_build/html
description =
Build documentation and API through Sphinx
Expand Down Expand Up @@ -83,6 +83,7 @@ commands =
--re-ignore docs/usage/sub_expr_f? \
--watch docs \
--watch src \
-b dirhtml \
docs/ docs/_build/html
description =
Set up a server to directly preview changes to the HTML pages
Expand All @@ -97,7 +98,7 @@ commands =
sphinx-build \
--keep-going \
-TW \
-b html \
-b dirhtml \
docs/ docs/_build/html
description =
Build documentation through Sphinx WITH output of Jupyter notebooks
Expand Down Expand Up @@ -130,6 +131,7 @@ commands =
--re-ignore docs/usage/sub_expr_f? \
--watch docs \
--watch src \
-b dirhtml \
docs/ docs/_build/html
description =
Set up a server to directly preview changes to the HTML pages
Expand Down

0 comments on commit 40e23ed

Please sign in to comment.