Skip to content

Commit

Permalink
TEST: install dependencies per-notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 21, 2024
1 parent f2e28b2 commit 64d719a
Show file tree
Hide file tree
Showing 12 changed files with 4,279 additions and 22 deletions.
7 changes: 5 additions & 2 deletions .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
set -ex
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
uv export \
--extra jupyter \
> requirements.txt
uv pip install \
--editable '.[jupyter]' \
--no-cache \
--requirement requirements.txt \
--system
uv cache clean
1 change: 1 addition & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- epic/*
paths:
- .pre-commit-config.yaml
- uv.lock
workflow_dispatch:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ prof/
*venv/
.tox/
pyvenv*/
uv.lock

# Settings
.idea/
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ci:
skip:
- check-jsonschema
- pyright
- uv-lock

repos:
- repo: meta
Expand Down Expand Up @@ -118,7 +119,7 @@ repos:
pass_filenames: false

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.15.1
rev: v8.15.2
hooks:
- id: cspell

Expand Down Expand Up @@ -147,3 +148,8 @@ repos:
rev: v1.1.385
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.25
hooks:
- id: uv-lock
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:
pixi global install graphviz uv
- |-
export UV_LINK_MODE=copy
uv run --extra doc --with tox \
uv run --extra doc --locked --with tox \
tox -e doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{ '[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ComPWA/compwa.github.io/blob/{})'.format(branch) }} {{ '[![Binder](https://static.mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ComPWA/compwa.github.io/{}?urlpath=lab)'.format(branch) }}
<!-- prettier-ignore-end -->

The ["Common Partial Wave Analysis"](https://github.com/ComPWA) organization (ComPWA) aims to make amplitude analysis accessible through transparent and interactive documentation, modern software development tools, and collaboration-independent frameworks. One major novelty is that we [formulate amplitude models symbolically](./symbolics.ipynb) with a Computer Algebra System, which results in a **self-documenting workflow** with high-performance, **backend-agnostic computations**.
The ["Common Partial Wave Analysis"](https://github.com/ComPWA) organization (ComPWA) aims to make amplitude analysis accessible through transparent and interactive documentation, modern software development tools, and collaboration-independent frameworks. One major novelty is that we [formulate amplitude models symbolically](./symbolics/index.ipynb) with a Computer Algebra System, which results in a **self-documenting workflow** with high-performance, **backend-agnostic computations**.

Contact details can be found [here](https://github.com/ComPWA) on our GitHub organization page.

Expand Down Expand Up @@ -251,7 +251,7 @@ more about our ideals and ongoing projects on the {doc}`main</index>` page.
caption: Resources
hidden:
---
symbolics
symbolics/index
develop
adr
Technical Reports <https://compwa.github.io/reports>
Expand Down
1 change: 1 addition & 0 deletions docs/symbolics/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
17 changes: 2 additions & 15 deletions docs/symbolics.ipynb → docs/symbolics/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@
"# Symbolic amplitude models"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"!uv pip install -q 'numpy~=1.26' black==24.2.0 sympy==1.12"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -668,9 +655,9 @@
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Pyproject Local",
"language": "python",
"name": "python3"
"name": "pyproject_local_kernel"
},
"language_info": {
"codemirror_mode": {
Expand Down
11 changes: 11 additions & 0 deletions docs/symbolics/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[project]
dependencies = [
"black",
"graphviz",
"ipykernel",
"numpy",
"sympy",
]
name = "symbolics"
requires-python = ">=3.12"
version = "0.0.0"
590 changes: 590 additions & 0 deletions docs/symbolics/uv.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jupyter = [
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"pyproject-local-kernel",
"python-lsp-ruff",
"python-lsp-server[rope]",
]
Expand Down Expand Up @@ -385,3 +386,6 @@ description = Perform all linting, formatting, and spelling checks
setenv =
SKIP = pyright
"""

[tool.uv.workspace]
exclude = ["docs/*"]
3,655 changes: 3,655 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit 64d719a

Please sign in to comment.