Skip to content

Commit

Permalink
FEAT: publish package on PyPI (#329)
Browse files Browse the repository at this point in the history
* DOC: add install and usage instructions
* DOC: add PyPI badges
* MAINT: rename to `polarimetry-lc2pkpi` on PyPI
* MAINT: switch to MyST colon fences

---------

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
redeboer and web-flow authored Dec 17, 2023
1 parent dafc75e commit 03314e2
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .constraints/py3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.10.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=setuptools
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.10.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=polarimetry-lc2pkpi --unsafe-package=setuptools
#
accessible-pygments==0.0.4
aiohttp==3.9.1
Expand Down Expand Up @@ -220,5 +220,5 @@ yarl==1.9.4
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# polarimetry
# polarimetry-lc2pkpi
# setuptools
4 changes: 2 additions & 2 deletions .constraints/py3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.11.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=setuptools
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.11.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=polarimetry-lc2pkpi --unsafe-package=setuptools
#
accessible-pygments==0.0.4
aiohttp==3.9.1
Expand Down Expand Up @@ -217,5 +217,5 @@ yarl==1.9.4
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# polarimetry
# polarimetry-lc2pkpi
# setuptools
4 changes: 2 additions & 2 deletions .constraints/py3.12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.12.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=setuptools
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.12.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=polarimetry-lc2pkpi --unsafe-package=setuptools
#
accessible-pygments==0.0.4
aiohttp==3.9.1
Expand Down Expand Up @@ -217,5 +217,5 @@ yarl==1.9.4
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# polarimetry
# polarimetry-lc2pkpi
# setuptools
4 changes: 2 additions & 2 deletions .constraints/py3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.8.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=setuptools
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.8.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=polarimetry-lc2pkpi --unsafe-package=setuptools
#
accessible-pygments==0.0.4
aiohttp==3.9.1
Expand Down Expand Up @@ -224,5 +224,5 @@ yarl==1.9.4
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# polarimetry
# polarimetry-lc2pkpi
# setuptools
4 changes: 2 additions & 2 deletions .constraints/py3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.9.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=setuptools
# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.9.txt --strip-extras --unsafe-package=pip --unsafe-package=polarimetry --unsafe-package=polarimetry-lc2pkpi --unsafe-package=setuptools
#
accessible-pygments==0.0.4
aiohttp==3.9.1
Expand Down Expand Up @@ -221,5 +221,5 @@ yarl==1.9.4
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# polarimetry
# polarimetry-lc2pkpi
# setuptools
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"ccrcr",
"cmin",
"commitlint",
"concat",
"einsum",
"exportnotebooks",
"hangle",
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ repos:
- --no-github-actions
- --no-gitpod
- --no-prettierrc
- --no-pypi
- --no-ruff
- --no-version-branches
- --repo-name=polarimetry
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Aligned polarimetry field of the Λc → p π K decay

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)

[![10.1007/JHEP07(2023)228](<https://zenodo.org/badge/doi/10.1007/JHEP07(2023)228.svg>)](<https://doi.org/10.1007/JHEP07(2023)228>)
[![10.5281/zenodo.7544989](https://zenodo.org/badge/doi/10.5281/zenodo.7544989.svg)](https://doi.org/10.5281/zenodo.7544989)
[![GPLv3+ license](https://img.shields.io/badge/License-GPLv3+-blue.svg)](https://www.gnu.org/licenses/gpl-3.0-standalone.html)

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)
[![PyPI package](https://badge.fury.io/py/polarimetry-lc2pki.svg)](https://pypi.org/project/polarimetry-lc2pki)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/polarimetry-lc2pki)](https://pypi.org/project/polarimetry-lc2pki)

This repository a symbolic amplitude model for the decay $\Lambda^+_c \to p \pi^+ K^-$ that is aligned with [Dalitz-plot decomposition](https://journals.aps.org/prd/abstract/10.1103/PhysRevD.101.034033) and computes an align polarimeter vector field $\vec\alpha$. Helicity couplings and other parameter values are taken from a recent study by the LHCb Collaboration[^1] and its [supplementary material](https://cds.cern.ch/record/2824328/files).

<!-- cspell:ignore semileptonic -->
Expand Down
38 changes: 25 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ myst:

# Polarimetry in Λ<sub>c</sub>⁺&nbsp;&nbsp;p&nbsp;K⁻&nbsp;π⁺

```{title} Welcome
```
:::{title} Welcome
:::

[![10.48550/arXiv.2301.07010](https://zenodo.org/badge/doi/10.48550/arXiv.2301.07010.svg)](https://doi.org/10.48550/arXiv.2301.07010)
[![10.5281/zenodo.7544989](https://zenodo.org/badge/doi/10.5281/zenodo.7544989.svg)](https://doi.org/10.5281/zenodo.7544989)
Expand Down Expand Up @@ -81,17 +80,33 @@ This website shows all analysis results that led to the publication of [LHCb-PAP

:::

::::{only} latex

<!-- cspell:ignore lc2pkpi -->

::::{only} latex
:::{note}

This document is a PDF rendering of the supplemental material hosted behind SSO-login on [lc2pkpi‑polarimetry.docs.cern.ch](https://lc2pkpi-polarimetry.docs.cern.ch). Go to this webpage for a more extensive and interactive experience.
:::
::::

[![PyPI package](https://badge.fury.io/py/polarimetry-lc2pki.svg)](https://pypi.org/project/polarimetry-lc2pki)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/polarimetry-lc2pki)](https://pypi.org/project/polarimetry-lc2pki)

Each of the pages contain code examples for how to reproduce the results with the Python package hosted at [github.com/ComPWA/polarimetry](https://github.com/ComPWA/polarimetry). However, to quickly get import the model in another package, it is possible to install the package from PyPI:

```bash
pip install lc2pkpi-polarimetry
```

:::{autolink-concat}
:::

::::
Each of the models can then simply be imported as

```python
import polarimetry

model = polarimetry.published_model()
```

<!-- cspell:ignore maxdepth -->

Expand Down Expand Up @@ -132,10 +147,7 @@ CERN GitLab (archived) <https://gitlab.cern.ch/polarimetry/Lc2pKpi>

{{ DOWNLOAD_PAPER_FIGURES }}

:::{dropdown} Notebook execution times

```{nb-exec-table}
```

::::{dropdown} Notebook execution times
:::{nb-exec-table}
:::
::::
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ dependencies = [
description = "Symbolic expressions that describe an aligned polarimeter vector field"
dynamic = ["version"]
license = {text = "GPLv3 or later"}
name = "polarimetry"
name = "polarimetry-lc2pkpi"
requires-python = ">=3.8"

[project.optional-dependencies]
dev = [
"polarimetry[doc]",
"polarimetry[jupyter]",
"polarimetry[sty]",
"polarimetry[test]",
"polarimetry-lc2pkpi[doc]",
"polarimetry-lc2pkpi[jupyter]",
"polarimetry-lc2pkpi[sty]",
"polarimetry-lc2pkpi[test]",
"sphinx-autobuild",
"tox >=1.9",
]
Expand Down Expand Up @@ -85,7 +85,7 @@ jupyter = [
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"polarimetry[doc]",
"polarimetry-lc2pkpi[doc]",
"python-lsp-ruff",
"python-lsp-server[rope]",
]
Expand Down

0 comments on commit 03314e2

Please sign in to comment.