Skip to content

Commit 10900e8

Browse files
redeboerweb-flowpre-commit-ci[bot]
authored
DX: define developer environment with uv (#23)
* DX: pin all notebook dependencies * DX: switch to Python 3.10 in developer environment --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a6cdc36 commit 10900e8

File tree

128 files changed

+26845
-1840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+26845
-1840
lines changed

.binder/postBuild

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
set -ex
3+
curl -LsSf https://pixi.sh/install.sh | bash
4+
export PATH="$HOME/.pixi/bin:$PATH"
5+
6+
pixi_packages="$(NO_COLOR= pixi list --explicit --no-install | awk 'NR > 1 {print $1}')"
7+
if [[ -n "$pixi_packages" ]]; then
8+
pixi global install $pixi_packages
9+
fi
10+
export PYTHONHASHSEED="0"
11+
pixi clean cache --yes
12+
13+
uv export \
14+
--extra jupyter \
15+
--extra notebooks \
16+
> requirements.txt
17+
uv pip install \
18+
--requirement requirements.txt \
19+
--system
20+
uv cache clean

.binder/runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.12

.cspell.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
".readthedocs.yml",
3636
".vscode/*",
3737
"docs/conf.py",
38-
"pyproject.toml",
39-
"tox.ini"
38+
"pyproject.toml"
4039
],
4140
"language": "en-US",
4241
"overrides": [
@@ -89,6 +88,7 @@
8988
"Mikhasenko",
9089
"NumPy",
9190
"parametrizations",
91+
"Pixi",
9292
"plotly",
9393
"pyplot",
9494
"QRules",
@@ -172,6 +172,7 @@
172172
"iframe",
173173
"imag",
174174
"infty",
175+
"installkernel",
175176
"ioff",
176177
"iplt",
177178
"ipykernel",
@@ -242,6 +243,7 @@
242243
"pycode",
243244
"pyfunc",
244245
"pygments",
246+
"pyproject",
245247
"pytest",
246248
"quadpy",
247249
"rankdir",
@@ -283,6 +285,7 @@
283285
"unbinned",
284286
"unnormalized",
285287
"unsrt",
288+
"venv",
286289
"viridis",
287290
"vmax",
288291
"vmin",

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ indent_size = 4
1515

1616
[LICENSE]
1717
indent_size = unset
18+
19+
[uv.lock]
20+
indent_size = 4

.envrc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
if [ -e .venv ]; then
2-
source .venv/bin/activate
3-
elif [ -e venv ]; then
4-
source venv/bin/activate
5-
elif [ -e .pixi ]; then
6-
watch_file pixi.lock
7-
eval "$(pixi shell-hook)"
8-
else
9-
layout anaconda
10-
fi
1+
watch_file pixi.lock
2+
eval "$(pixi shell-hook)"
3+
uv sync --all-extras --quiet
4+
source .venv/bin/activate

.github/release-drafter.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/cd.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,15 @@ on:
2828

2929
jobs:
3030
doc:
31-
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v1
31+
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2
3232
permissions:
3333
pages: write
3434
id-token: write
3535
with:
36-
apt-packages: graphviz
3736
gh-pages: true
38-
python-version: "3.12"
3937
specific-pip-packages: ${{ inputs.specific-pip-packages }}
4038
style:
4139
if: inputs.specific-pip-packages == ''
4240
secrets:
4341
token: ${{ secrets.PAT }}
44-
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1
45-
with:
46-
python-version: "3.12"
42+
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2

.github/workflows/clean-caches.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414
jobs:
1515
cleanup:
1616
name: Remove caches
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
steps:
19-
- uses: ComPWA/actions/clean-caches@v1
19+
- uses: ComPWA/actions/clean-caches@v2
2020
with:
2121
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2222
ref: ${{ inputs.ref }}

.github/workflows/lock.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Update
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: |-
6+
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
7+
8+
on:
9+
pull_request:
10+
branches:
11+
- main
12+
- epic/*
13+
paths:
14+
- .pre-commit-config.yaml
15+
- Manifest.toml
16+
- pixi.lock
17+
- uv.lock
18+
workflow_dispatch:
19+
20+
jobs:
21+
lock:
22+
uses: ComPWA/actions/.github/workflows/lock.yml@v2
23+
secrets:
24+
token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)