Skip to content

Commit e16332a

Browse files
committed
Use uv for Python environment
1 parent de53354 commit e16332a

File tree

10 files changed

+65
-200
lines changed

10 files changed

+65
-200
lines changed

.calkit/env-locks/py.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
contourpy==1.3.3
2+
cycler==0.12.1
3+
fonttools==4.59.1
4+
kiwisolver==1.4.9
5+
matplotlib==3.10.5
6+
numpy==2.3.2
7+
packaging==25.0
8+
pandas==2.3.1
9+
pillow==11.3.0
10+
pyparsing==3.2.3
11+
python-dateutil==2.9.0.post0
12+
pytz==2025.2
13+
six==1.17.0
14+
tzdata==2025.2

.calkit/env-locks/py.yml

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

.calkit/env-locks/tex.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
"RepoDigests": [
66
"texlive/texlive@sha256:9080025bd1762766c229ed7543107aa7799a82fa65b0643c4191305677863859"
77
],
8-
"Architecture": "amd64",
8+
"Architecture": "arm64",
99
"Os": "linux",
10-
"Size": 5197757512,
10+
"Size": 2465928923,
1111
"RootFS": {
1212
"Type": "layers",
1313
"Layers": [
14-
"sha256:612c2b206201f241fa381be8ec4426c972d1f1f87aa0a03c6069e3208234cdd8",
15-
"sha256:f235b594b1218e7983aa6603bc5fd152305a90659847a7790d6f905b18503cf5",
16-
"sha256:33449c67d1f954e1a00e30c99e92ba2841cf2ea88f2d0ebddf4911140e46c676",
14+
"sha256:9d0dd3a5ed802836311cd0db8808b203821cf667f4abc13b09a4bdfe2e6d4e27",
15+
"sha256:4d9f50bad01fd6cdbc25818ee80ab8c34841dd5f73a2bc7855118f550ec97ece",
16+
"sha256:1582e2b661d185b296c9f3f97e584f3089099434d0cd5690987a6730fbcb0177",
1717
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
18-
"sha256:ed8ba60461943d8baa2c622b730294f7b717199f998c783063e5f9db232245e0",
19-
"sha256:f48fed1f5cceccd41a655d62bf282143f0d16aa6e84a1c68a8abcefea04c7a34",
20-
"sha256:049fa4b5ad5f9b5f6506452fc5565d6269de882eb30e6a4317144e517584afcf",
21-
"sha256:72569cd299896a7599bf2e4f7edb0423f0c36d46f014a138dcc8da4e3e7bf573",
22-
"sha256:2756095a65922d1b03af7c30a3424e9fe5ecb45ac06de1f9ff169b114da4a96a"
18+
"sha256:5e29423f9aabd412d46a6ab5c11350d500d28c873047f5a587a9d1f823428ee9",
19+
"sha256:ef76807910ef7124b81c287007d336ee01898224ccf1da60308fc2b0a1a9cadc",
20+
"sha256:5a824a1ec9bb89001dd6c77033c29f38252da1f216520fab448e61a098268976",
21+
"sha256:4820f6792e6cb541113cfb2778757a9d93acdd3ad80997d510e294fd480b2950",
22+
"sha256:7b37c02f7d5213a671c2d5fe67dc52449710d2e6df5661bb1e7814c90f9b2361"
2323
]
2424
},
2525
"DockerfileMD5": null,

.github/workflows/run.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,8 @@ jobs:
2929
run: |
3030
git config user.name github-actions[bot]
3131
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
32-
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v3
3432
- name: Setup uv
3533
uses: astral-sh/setup-uv@v5
36-
- name: Setup Miniforge
37-
uses: conda-incubator/setup-miniconda@v3
38-
with:
39-
miniforge-version: latest
40-
auto-activate-base: true
41-
conda-remove-defaults: true
4234
- name: Install Calkit
4335
run: uv tool install calkit-python
4436
- name: Restore DVC cache
@@ -53,6 +45,7 @@ jobs:
5345
env:
5446
CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }}
5547
- run: calkit dvc pull
48+
continue-on-error: true
5649
- run: calkit run
5750
# If running on a PR, push to that branch, else push to main
5851
- run: calkit save -am "Run pipeline"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ This is a basic Calkit example project,
44
which includes data collection,
55
figure generation,
66
and LaTeX article compilation,
7-
all part of a single reproducible DVC pipeline.
7+
all part of a single reproducible pipeline.
88

9-
You can also view this project on [calkit.io](https://calkit.io/calkit/example-basic).
9+
You can also view this project on
10+
[calkit.io](https://calkit.io/calkit/example-basic).
1011

1112
This project can be reproduced with:
1213

calkit.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ description: A basic Calkit example project.
55
git_repo_url: https://github.com/calkit/example-basic
66
dependencies:
77
- docker
8-
- conda
8+
- uv
99
questions:
1010
- Can we make reproducibility simple?
1111
environments:
1212
py:
13-
path: environment.yml
14-
kind: conda
15-
description: A Python environment
13+
path: requirements.txt
14+
kind: uv-venv
15+
python: "3.13"
16+
prefix: .venv
17+
description: A Python virtual environment managed with uv
1618
tex:
1719
kind: docker
1820
image: texlive/texlive:latest-full

dvc.lock

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@ stages:
33
collect-data:
44
cmd: calkit xenv -n py --no-check -- python scripts/collect-data.py
55
deps:
6-
- path: .calkit/env-locks/py.yml
6+
- path: .calkit/env-locks/py.txt
77
hash: md5
8-
md5: 05f53fdb70c16e7be5ce9c85e2fa7baa
9-
size: 4547
8+
md5: de96276868627f6d4aa908b2b4759a56
9+
size: 231
1010
- path: scripts/collect-data.py
1111
hash: md5
1212
md5: eeab1328ac4a9df2ef2452d32c1e6cce
1313
size: 424
1414
outs:
1515
- path: data/raw/data.csv
1616
hash: md5
17-
md5: b7ba2e0ce65f893e4db48f9ae156d2cc
18-
size: 43611
17+
md5: de9fed6f097dc9eeb0d771172c235d11
18+
size: 43594
1919
plot-voltage:
2020
cmd: calkit xenv -n py --no-check -- python scripts/plot-voltage.py
2121
deps:
22-
- path: .calkit/env-locks/py.yml
22+
- path: .calkit/env-locks/py.txt
2323
hash: md5
24-
md5: 05f53fdb70c16e7be5ce9c85e2fa7baa
25-
size: 4547
24+
md5: de96276868627f6d4aa908b2b4759a56
25+
size: 231
2626
- path: data/raw/data.csv
2727
hash: md5
28-
md5: b7ba2e0ce65f893e4db48f9ae156d2cc
29-
size: 43611
28+
md5: de9fed6f097dc9eeb0d771172c235d11
29+
size: 43594
3030
- path: scripts/plot-voltage.py
3131
hash: md5
3232
md5: 087a567a0c0f6199a908399013d564a1
3333
size: 297
3434
outs:
3535
- path: figures/voltage-time-series.png
3636
hash: md5
37-
md5: 1f35eb0a43dba0169a83d14b873a0c79
38-
size: 44615
37+
md5: 2bad4528d4d1acace92cdeee39572663
38+
size: 40195
3939
copy-figures-to-paper-dir:
4040
cmd: cp -r figures paper/figures
4141
deps:
@@ -56,12 +56,12 @@ stages:
5656
deps:
5757
- path: .calkit/env-locks/tex.json
5858
hash: md5
59-
md5: c030e05b4e497d9d15b0cd07c1db16f3
59+
md5: 7c034176d0205f486250194d39887994
6060
size: 1171
6161
- path: figures
6262
hash: md5
63-
md5: 49feff31a47e2e19bf90299d06f62014.dir
64-
size: 44640
63+
md5: dda637b5e3496cfe2e567067e3803a76.dir
64+
size: 40220
6565
nfiles: 2
6666
- path: paper/paper.tex
6767
hash: md5
@@ -70,8 +70,8 @@ stages:
7070
outs:
7171
- path: paper/paper.pdf
7272
hash: md5
73-
md5: bff1721a57af4275b13af9dd8033ad9a
74-
size: 95417
73+
md5: eade534fc60e0302dc277944db06a83b
74+
size: 92533
7575
_check_env_py:
7676
cmd: calkit check conda-env --file environment.yml --output
7777
.calkit/env-locks/py.yml
@@ -96,19 +96,19 @@ stages:
9696
_check-env-py:
9797
cmd: calkit check environment --name py
9898
deps:
99-
- path: environment.yml
99+
- path: requirements.txt
100100
hash: md5
101-
md5: 4282ecbec6810eb293bdf62d7f956ffd
102-
size: 119
101+
md5: 2d0e401b7292d0d218bc567bfb37f9c7
102+
size: 24
103103
outs:
104-
- path: .calkit/env-locks/py.yml
104+
- path: .calkit/env-locks/py.txt
105105
hash: md5
106-
md5: 05f53fdb70c16e7be5ce9c85e2fa7baa
107-
size: 4547
106+
md5: de96276868627f6d4aa908b2b4759a56
107+
size: 231
108108
_check-env-tex:
109109
cmd: calkit check environment --name tex
110110
outs:
111111
- path: .calkit/env-locks/tex.json
112112
hash: md5
113-
md5: c030e05b4e497d9d15b0cd07c1db16f3
113+
md5: 7c034176d0205f486250194d39887994
114114
size: 1171

dvc.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ stages:
22
_check-env-py:
33
cmd: calkit check environment --name py
44
deps:
5-
- environment.yml
5+
- requirements.txt
66
outs:
7-
- .calkit/env-locks/py.yml:
7+
- .calkit/env-locks/py.txt:
88
cache: false
99
persist: true
1010
always_changed: true
@@ -25,7 +25,7 @@ stages:
2525
scripts/collect-data.py
2626
deps:
2727
- scripts/collect-data.py
28-
- .calkit/env-locks/py.yml
28+
- .calkit/env-locks/py.txt
2929
outs:
3030
- data/raw/data.csv
3131
desc: Automatically generated from the 'collect-data' stage in
@@ -35,7 +35,7 @@ stages:
3535
scripts/plot-voltage.py
3636
deps:
3737
- scripts/plot-voltage.py
38-
- .calkit/env-locks/py.yml
38+
- .calkit/env-locks/py.txt
3939
- data/raw/data.csv
4040
outs:
4141
- figures/voltage-time-series.png

environment.yml

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

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pandas
2+
matplotlib
3+
numpy

0 commit comments

Comments
 (0)