Skip to content

Commit 3f1693c

Browse files
authored
Use Calkit pipeline (#5)
1 parent 42f0083 commit 3f1693c

File tree

8 files changed

+267
-180
lines changed

8 files changed

+267
-180
lines changed

.calkit/env-locks/py.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- brotli=1.1.0=hd74edd7_2
5+
- brotli-bin=1.1.0=hd74edd7_2
6+
- bzip2=1.0.8=h99b78c6_7
7+
- ca-certificates=2025.4.26=hbd8a1cb_0
8+
- contourpy=1.3.2=py312hb23fbb9_0
9+
- cycler=0.12.1=pyhd8ed1ab_1
10+
- fonttools=4.58.0=py312h998013c_0
11+
- freetype=2.13.3=hce30654_1
12+
- kiwisolver=1.4.8=py312h2c4a281_0
13+
- lcms2=2.17=h7eeda09_0
14+
- lerc=4.0.0=hd64df32_1
15+
- libblas=3.9.0=31_h10e41b3_openblas
16+
- libbrotlicommon=1.1.0=hd74edd7_2
17+
- libbrotlidec=1.1.0=hd74edd7_2
18+
- libbrotlienc=1.1.0=hd74edd7_2
19+
- libcblas=3.9.0=31_hb3479ef_openblas
20+
- libcxx=20.1.5=ha82da77_0
21+
- libdeflate=1.24=h5773f1b_0
22+
- libexpat=2.7.0=h286801f_0
23+
- libffi=3.4.6=h1da3d7d_1
24+
- libfreetype=2.13.3=hce30654_1
25+
- libfreetype6=2.13.3=h1d14073_1
26+
- libgfortran=14.2.0=heb5dd2a_105
27+
- libgfortran5=14.2.0=h2c44a93_105
28+
- libjpeg-turbo=3.1.0=h5505292_0
29+
- liblapack=3.9.0=31_hc9a63f6_openblas
30+
- liblzma=5.8.1=h39f12f2_1
31+
- libopenblas=0.3.29=openmp_hf332438_0
32+
- libpng=1.6.47=h3783ad8_0
33+
- libsqlite=3.49.2=h3f77e49_0
34+
- libtiff=4.7.0=h2f21f7c_5
35+
- libwebp-base=1.5.0=h2471fea_0
36+
- libxcb=1.17.0=hdb1d25a_0
37+
- libzlib=1.3.1=h8359307_2
38+
- llvm-openmp=20.1.5=hdb05f8b_0
39+
- matplotlib=3.10.3=py312h1f38498_0
40+
- matplotlib-base=3.10.3=py312hdbc7e53_0
41+
- munkres=1.1.4=pyh9f0ad1d_0
42+
- ncurses=6.5=h5e97a16_3
43+
- numpy=2.2.6=py312h7c1f314_0
44+
- openjpeg=2.5.3=h8a3d83b_0
45+
- openssl=3.5.0=h81ee809_1
46+
- packaging=25.0=pyh29332c3_1
47+
- pandas=2.2.3=py312hcb1e3ce_3
48+
- pillow=11.2.1=py312h50aef2c_0
49+
- pip=25.1.1=pyh8b19718_0
50+
- pthread-stubs=0.4=hd74edd7_1002
51+
- pyparsing=3.2.3=pyhd8ed1ab_1
52+
- python=3.12.10=hc22306f_0_cpython
53+
- python-dateutil=2.9.0.post0=pyhff2d567_1
54+
- python-tzdata=2025.2=pyhd8ed1ab_0
55+
- python_abi=3.12=7_cp312
56+
- pytz=2025.2=pyhd8ed1ab_0
57+
- qhull=2020.2=h420ef59_5
58+
- readline=8.2=h1d1bf99_2
59+
- setuptools=80.8.0=pyhff2d567_0
60+
- six=1.17.0=pyhd8ed1ab_0
61+
- tk=8.6.13=h5083fa2_1
62+
- tornado=6.5.1=py312hea69d52_0
63+
- tzdata=2025b=h78e105d_0
64+
- unicodedata2=16.0.0=py312hea69d52_0
65+
- wheel=0.45.1=pyhd8ed1ab_1
66+
- xorg-libxau=1.0.12=h5505292_0
67+
- xorg-libxdmcp=1.1.5=hd74edd7_0
68+
- zstd=1.5.7=h6491c7d_2
69+
name: calkit-example-basic

.calkit/env-locks/tex.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[
2+
{
3+
"RepoTags": [
4+
"texlive/texlive:latest-full"
5+
],
6+
"Parent": "",
7+
"Comment": "buildkit.dockerfile.v0",
8+
"Created": "2025-05-11T13:45:24.681068416Z",
9+
"Author": "",
10+
"Config": {
11+
"Hostname": "",
12+
"Domainname": "",
13+
"User": "",
14+
"AttachStdin": false,
15+
"AttachStdout": false,
16+
"AttachStderr": false,
17+
"Tty": false,
18+
"OpenStdin": false,
19+
"StdinOnce": false,
20+
"Env": [
21+
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
22+
"LANG=C.UTF-8",
23+
"LC_ALL=C.UTF-8",
24+
"TEXLIVE_INSTALL_NO_CONTEXT_CACHE=1",
25+
"NOPERLDOC=1",
26+
"DEBIAN_FRONTEND=noninteractive"
27+
],
28+
"Cmd": [
29+
"bash"
30+
],
31+
"Image": "",
32+
"Volumes": null,
33+
"WorkingDir": "/workdir",
34+
"Entrypoint": null,
35+
"OnBuild": null,
36+
"Labels": {
37+
"org.opencontainers.image.authors": "Island of TeX",
38+
"org.opencontainers.image.source": "https://gitlab.com/islandoftex/images/texlive/-/blob/master/Dockerfile",
39+
"org.opencontainers.image.url": "https://gitlab.com/islandoftex/images/texlive"
40+
}
41+
},
42+
"Architecture": "arm64",
43+
"Os": "linux",
44+
"Size": 2409562089,
45+
"GraphDriver": {
46+
"Data": null,
47+
"Name": "overlayfs"
48+
},
49+
"RootFS": {
50+
"Type": "layers",
51+
"Layers": [
52+
"sha256:f20086072b1d2fffdc8a8a3afc546d1ecb13a9047ac9cc6c941e9783ba2c1c40",
53+
"sha256:cc4ebc54dd55374e26421ee3710a3cb932690ec294b3665230f54ae0ddbbacec",
54+
"sha256:2ff8561f9f970e166f982b4a6f584a0ce9a275836a281d9e5b62fb27d6a99e8f",
55+
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
56+
"sha256:6b5bb1acd1ecb71e7df10f16fba58ee8afbc1a4295b26486766742471c7380bf",
57+
"sha256:84cc1f955c35ccf33e8c50a7e8cab52e5c5e186124d3d2dc294de9d227ca2f9e",
58+
"sha256:e408bd808583af5c8c473d3a99d1e503095ebae3752b54408e274eb7596f163f",
59+
"sha256:8d7558178b2bf04a68ead86ebe9fe20fe199f9e4703cddf9389f508711365a83",
60+
"sha256:0b653ec0cefe2beb09dee6dfd05199f92481c2cdd0d893aa5f6cfca402f301d8"
61+
]
62+
},
63+
"Descriptor": {
64+
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
65+
"digest": "sha256:ac2a1fbc4dad1ec27c7407c24907af5a38a5f53c4baf9c6dc5973efd34b355e6",
66+
"size": 685
67+
},
68+
"DockerfileMD5": null,
69+
"DepsMD5s": {}
70+
}
71+
]

calkit.yaml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11
owner: calkit
22
name: example-basic
33
title: Basic Calkit example
4-
description: A basic Calkit exmple project.
4+
description: A basic Calkit example project.
55
git_repo_url: https://github.com/calkit/example-basic
66
dependencies:
77
- docker
88
- conda
99
questions:
1010
- Can we make reproducibility simple?
11+
environments:
12+
py:
13+
path: environment.yml
14+
kind: conda
15+
description: A Python environment
16+
tex:
17+
kind: docker
18+
image: texlive/texlive:latest-full
19+
description: TeX Live via Docker.
20+
pipeline:
21+
stages:
22+
collect-data:
23+
kind: python-script
24+
script_path: scripts/collect-data.py
25+
environment: py
26+
outputs:
27+
- data/raw/data.csv
28+
plot-voltage:
29+
kind: python-script
30+
script_path: scripts/plot-voltage.py
31+
environment: py
32+
inputs:
33+
- from_stage_outputs: collect-data
34+
outputs:
35+
- figures/voltage-time-series.png
36+
build-paper:
37+
kind: latex
38+
target_path: paper/paper.tex
39+
environment: tex
40+
inputs:
41+
- figures
42+
outputs:
43+
- paper/paper.pdf
1144
datasets:
1245
- path: data/raw/data.csv
1346
title: Raw data
@@ -23,13 +56,3 @@ publications:
2356
title: The paper
2457
description: This is the paper.
2558
stage: build-paper
26-
environments:
27-
py:
28-
path: environment.yml
29-
kind: conda
30-
description: A Python environment
31-
tex:
32-
kind: docker
33-
image: texlive/texlive:latest-full
34-
wdir: /work
35-
description: TeX Live via Docker.

dvc.lock

Lines changed: 65 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
schema: '2.0'
22
stages:
33
collect-data:
4-
cmd: calkit xenv -n py -- python scripts/collect-data.py
4+
cmd: calkit xenv -n py --no-check -- python scripts/collect-data.py
55
deps:
6-
- path: environment.yml
6+
- path: .calkit/env-locks/py.yml
77
hash: md5
8-
md5: 627d0116e60eab837fbf07edb4d370e0
9-
size: 114
8+
md5: 8119fb42c7e8531010248790fff169cf
9+
size: 2200
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: 2ba6a2254202b7055d370eb59a35dfae
18-
size: 43644
17+
md5: c3319d519671cab28a01aca7a7d199f9
18+
size: 43633
1919
plot-voltage:
20-
cmd: calkit xenv -n py -- python scripts/plot-voltage.py
20+
cmd: calkit xenv -n py --no-check -- python scripts/plot-voltage.py
2121
deps:
22-
- path: data/raw/data.csv
22+
- path: .calkit/env-locks/py.yml
2323
hash: md5
24-
md5: 2ba6a2254202b7055d370eb59a35dfae
25-
size: 43644
26-
- path: environment.yml
24+
md5: 8119fb42c7e8531010248790fff169cf
25+
size: 2200
26+
- path: data/raw/data.csv
2727
hash: md5
28-
md5: 627d0116e60eab837fbf07edb4d370e0
29-
size: 114
28+
md5: c3319d519671cab28a01aca7a7d199f9
29+
size: 43633
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: d4cd33821c032be468a77d65873937bc
38-
size: 43613
37+
md5: b0d7f4d7cddb00d3d8c1758720e4d79b
38+
size: 45261
3939
copy-figures-to-paper-dir:
4040
cmd: cp -r figures paper/figures
4141
deps:
@@ -51,19 +51,62 @@ stages:
5151
size: 45148
5252
nfiles: 2
5353
build-paper:
54-
cmd: "calkit xenv -n tex -- latexmk -cd -interaction=nonstopmode -pdf paper/paper.tex\n"
54+
cmd: calkit xenv -n tex --no-check -- latexmk -cd -interaction=nonstopmode -pdf
55+
paper/paper.tex
5556
deps:
57+
- path: .calkit/env-locks/tex.json
58+
hash: md5
59+
md5: b04cd12c7a8313853c8739a55f6320fe
60+
size: 2791
5661
- path: figures
5762
hash: md5
58-
md5: 1a9009ee25ecfe1fbfe1916de2eb7deb.dir
59-
size: 43638
63+
md5: 1d42180c43a4f7c68c0bb3c98f7e3896.dir
64+
size: 45286
6065
nfiles: 2
6166
- path: paper/paper.tex
6267
hash: md5
63-
md5: 6455fc859c8b1838f22d5ac74223b323
64-
size: 604
68+
md5: 1480301e18c57bf533d604e1a3593101
69+
size: 653
6570
outs:
6671
- path: paper/paper.pdf
6772
hash: md5
68-
md5: 6f1fec0754597ecdb78cf0e9852884ad
69-
size: 92860
73+
md5: 3020732b698cfd131ef6c1bc0d207521
74+
size: 95329
75+
_check_env_py:
76+
cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml
77+
deps:
78+
- path: environment.yml
79+
hash: md5
80+
md5: 4282ecbec6810eb293bdf62d7f956ffd
81+
size: 119
82+
outs:
83+
- path: .calkit/env-locks/py.yml
84+
hash: md5
85+
md5: 8119fb42c7e8531010248790fff169cf
86+
size: 2200
87+
_check_env_tex:
88+
cmd: calkit check docker-env texlive/texlive:latest-full -o .calkit/env-locks/tex.json
89+
outs:
90+
- path: .calkit/env-locks/tex.json
91+
hash: md5
92+
md5: b04cd12c7a8313853c8739a55f6320fe
93+
size: 2791
94+
_check-env-py:
95+
cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml
96+
deps:
97+
- path: environment.yml
98+
hash: md5
99+
md5: 4282ecbec6810eb293bdf62d7f956ffd
100+
size: 119
101+
outs:
102+
- path: .calkit/env-locks/py.yml
103+
hash: md5
104+
md5: 8119fb42c7e8531010248790fff169cf
105+
size: 2200
106+
_check-env-tex:
107+
cmd: calkit check docker-env texlive/texlive:latest-full -o .calkit/env-locks/tex.json
108+
outs:
109+
- path: .calkit/env-locks/tex.json
110+
hash: md5
111+
md5: b04cd12c7a8313853c8739a55f6320fe
112+
size: 2791

dvc.yaml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
stages:
2+
_check-env-py:
3+
cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml
4+
deps:
5+
- environment.yml
6+
outs:
7+
- .calkit/env-locks/py.yml:
8+
cache: false
9+
persist: true
10+
always_changed: true
11+
_check-env-tex:
12+
cmd: calkit check docker-env texlive/texlive:latest-full -o .calkit/env-locks/tex.json
13+
deps: []
14+
outs:
15+
- .calkit/env-locks/tex.json:
16+
cache: false
17+
persist: true
18+
always_changed: true
219
collect-data:
3-
cmd: calkit xenv -n py -- python scripts/collect-data.py
20+
cmd: calkit xenv -n py --no-check -- python scripts/collect-data.py
421
deps:
522
- scripts/collect-data.py
6-
- environment.yml
23+
- .calkit/env-locks/py.yml
724
outs:
825
- data/raw/data.csv
926
plot-voltage:
10-
cmd: calkit xenv -n py -- python scripts/plot-voltage.py
27+
cmd: calkit xenv -n py --no-check -- python scripts/plot-voltage.py
1128
deps:
1229
- scripts/plot-voltage.py
30+
- .calkit/env-locks/py.yml
1331
- data/raw/data.csv
14-
- environment.yml
1532
outs:
1633
- figures/voltage-time-series.png
1734
build-paper:
18-
cmd: >
19-
calkit xenv -n tex --
20-
latexmk -cd -interaction=nonstopmode -pdf paper/paper.tex
35+
cmd: calkit xenv -n tex --no-check -- latexmk -cd -interaction=nonstopmode
36+
-pdf paper/paper.tex
2137
deps:
22-
- figures
2338
- paper/paper.tex
39+
- figures
40+
- .calkit/env-locks/tex.json
2441
outs:
2542
- paper/paper.pdf

0 commit comments

Comments
 (0)