From 5c6f984985e1acf93a277f008e391913adef95dd Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:00:33 -0700 Subject: [PATCH 1/6] Update CI to run on PRs --- .github/workflows/run.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 4398dd7..61351f6 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -1,16 +1,30 @@ name: Run pipeline -on: push +on: + push: + branches: + - main + pull_request: permissions: contents: write +# Make sure we only ever run one per branch so we don't have issues pushing +# after running the pipeline +concurrency: + group: calkit-run-${{ github.ref }} + cancel-in-progress: false + jobs: main: name: Run runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + # For PRs, checkout the head ref to avoid detached HEAD + ref: ${{ github.head_ref || github.ref_name }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Configure Git credentials run: | git config user.name github-actions[bot] @@ -33,8 +47,9 @@ jobs: - run: calkit config remote-auth env: CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }} - - run: dvc pull + - run: calkit dvc pull - run: calkit run + # If running on a PR, push to that branch, else push to main - run: calkit save -am "Run pipeline" env: CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }} From 884403fadf81ffd1b0dafb4b510dd07363e9c3ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 13:04:17 +0000 Subject: [PATCH 2/6] Run pipeline --- .calkit/env-locks/py.yml | 30 +++++++++++++++--------------- .calkit/env-locks/tex.json | 20 ++++++++++---------- dvc.lock | 30 +++++++++++++++--------------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.calkit/env-locks/py.yml b/.calkit/env-locks/py.yml index fdbd5b9..68401a5 100644 --- a/.calkit/env-locks/py.yml +++ b/.calkit/env-locks/py.yml @@ -21,22 +21,22 @@ dependencies: - fontconfig=2.15.0=h7e30c49_1 - fonts-conda-ecosystem=1=0 - fonts-conda-forge=1=0 - - fonttools=4.59.0=py312h8a5da7c_0 + - fonttools=4.59.1=py312h8a5da7c_0 - freetype=2.13.3=ha770c72_1 - - graphite2=1.3.14=hecca717_1 - - harfbuzz=11.3.3=hbb57e21_0 + - graphite2=1.3.14=hecca717_2 + - harfbuzz=11.4.1=h15599e2_0 - icu=75.1=he02047a_0 - - keyutils=1.6.1=h166bdaf_0 - - kiwisolver=1.4.8=py312h68727a3_1 + - keyutils=1.6.3=hb9d3cd8_0 + - kiwisolver=1.4.9=py312h0a2e395_0 - krb5=1.21.3=h659f571_0 - lcms2=2.17=h717163a_0 - ld_impl_linux-64=2.44=h1423503_1 - lerc=4.0.0=h0aef613_1 - - libblas=3.9.0=33_h59b9bed_openblas + - libblas=3.9.0=34_h59b9bed_openblas - libbrotlicommon=1.1.0=hb9d3cd8_3 - libbrotlidec=1.1.0=hb9d3cd8_3 - libbrotlienc=1.1.0=hb9d3cd8_3 - - libcblas=3.9.0=33_he106b2a_openblas + - libcblas=3.9.0=34_he106b2a_openblas - libclang-cpp20.1=20.1.8=default_hddf928d_0 - libclang13=20.1.8=default_ha444ac7_0 - libcups=2.3.3=hb8b1518_5 @@ -57,27 +57,27 @@ dependencies: - libglvnd=1.7.0=ha4b6fd6_2 - libglx=1.7.0=ha4b6fd6_2 - libgomp=15.1.0=h767d61c_4 - - libiconv=1.18=h4ce23a2_1 + - libiconv=1.18=h3b78370_2 - libjpeg-turbo=3.1.0=hb9d3cd8_0 - - liblapack=3.9.0=33_h7ac8fdf_openblas + - liblapack=3.9.0=34_h7ac8fdf_openblas - libllvm20=20.1.8=hecd9e04_0 - liblzma=5.8.1=hb9d3cd8_2 - libnsl=2.0.1=hb9d3cd8_1 - libntlm=1.8=hb9d3cd8_0 - - libopenblas=0.3.30=pthreads_h94d23a6_1 + - libopenblas=0.3.30=pthreads_h94d23a6_2 - libopengl=1.7.0=ha4b6fd6_2 - libpciaccess=0.18=hb9d3cd8_0 - libpng=1.6.50=h421ea60_1 - - libpq=17.5=h27ae623_0 + - libpq=17.6=h3675c94_0 - libsqlite=3.50.4=h0c1763c_0 - libstdcxx=15.1.0=h8f9b012_4 - libstdcxx-ng=15.1.0=h4852527_4 - - libtiff=4.7.0=hf01ce69_5 + - libtiff=4.7.0=h8261f1e_6 - libuuid=2.38.1=h0b41bf4_0 - libwebp-base=1.6.0=hd42ef1d_0 - libxcb=1.17.0=h8a09558_0 - libxcrypt=4.4.36=hd590300_1 - - libxkbcommon=1.10.0=h65c71a3_0 + - libxkbcommon=1.11.0=he8b52b9_0 - libxml2=2.13.8=h04c0eec_1 - libxslt=1.1.43=h7a3aeb2_0 - libzlib=1.3.1=hb9d3cd8_2 @@ -94,7 +94,7 @@ dependencies: - pcre2=10.45=hc749103_0 - pillow=11.3.0=py312h80c1187_0 - pip=25.2=pyh8b19718_0 - - pixman=0.46.4=h537e5f6_0 + - pixman=0.46.4=h54a6638_1 - pthread-stubs=0.4=hb9d3cd8_1002 - pyparsing=3.2.3=pyhe01879c_2 - pyside6=6.9.1=py312hdb827e4_0 @@ -109,7 +109,7 @@ dependencies: - setuptools=80.9.0=pyhff2d567_0 - six=1.17.0=pyhe01879c_1 - tk=8.6.13=noxft_hd72426e_102 - - tornado=6.5.1=py312h66e93f0_0 + - tornado=6.5.2=py312h4c3975b_0 - tzdata=2025b=h78e105d_0 - unicodedata2=16.0.0=py312h66e93f0_0 - wayland=1.24.0=h3e06ad9_0 diff --git a/.calkit/env-locks/tex.json b/.calkit/env-locks/tex.json index 49b9cc9..e61b098 100644 --- a/.calkit/env-locks/tex.json +++ b/.calkit/env-locks/tex.json @@ -3,23 +3,23 @@ "texlive/texlive:latest-full" ], "RepoDigests": [ - "texlive/texlive@sha256:50cbe04f3d8deaa934ad58500eb088087897f8934aa4ff283f0dd0d9913060c6" + "texlive/texlive@sha256:9080025bd1762766c229ed7543107aa7799a82fa65b0643c4191305677863859" ], "Architecture": "amd64", "Os": "linux", - "Size": 5212914632, + "Size": 5197757512, "RootFS": { "Type": "layers", "Layers": [ - "sha256:5ce2e09ce74c93c54460abe87dfbf53df28f85ff4098b11570480954fec94ff1", - "sha256:76029d00884870d5949eaee239be75ef962f6968df6ff6ec9ed5f9823ebb680f", - "sha256:bab4fac6f89ed2b202d5b55205f227ee2df615926f84eb4ab07b7de253c59f5b", + "sha256:612c2b206201f241fa381be8ec4426c972d1f1f87aa0a03c6069e3208234cdd8", + "sha256:f235b594b1218e7983aa6603bc5fd152305a90659847a7790d6f905b18503cf5", + "sha256:33449c67d1f954e1a00e30c99e92ba2841cf2ea88f2d0ebddf4911140e46c676", "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef", - "sha256:c6cef71aed9b0a4fd3832ce9561643b00ab032e4b13885d38ffde1b50fca6951", - "sha256:5f7e65b08ae04201d6f95dc624f95b3757a2210e6727341fed9524832212ebbf", - "sha256:f4e5a6e76a68b9fa5984ce99d6b08d6e5632b4315bcb3d2f8f112973eab7634b", - "sha256:f77ecbe90296b4f5ce84ccfdfc4f78e378dc1d4842895eb7dcd8b6937ce067b3", - "sha256:f33b6625cfc6bdb7953773301900546a06a7d7b1103ef1064bb9fac43b6ebc56" + "sha256:ed8ba60461943d8baa2c622b730294f7b717199f998c783063e5f9db232245e0", + "sha256:f48fed1f5cceccd41a655d62bf282143f0d16aa6e84a1c68a8abcefea04c7a34", + "sha256:049fa4b5ad5f9b5f6506452fc5565d6269de882eb30e6a4317144e517584afcf", + "sha256:72569cd299896a7599bf2e4f7edb0423f0c36d46f014a138dcc8da4e3e7bf573", + "sha256:2756095a65922d1b03af7c30a3424e9fe5ecb45ac06de1f9ff169b114da4a96a" ] }, "DockerfileMD5": null, diff --git a/dvc.lock b/dvc.lock index 0ca225c..4f2c464 100644 --- a/dvc.lock +++ b/dvc.lock @@ -5,7 +5,7 @@ stages: deps: - path: .calkit/env-locks/py.yml hash: md5 - md5: 415abac783d7124497e523d78afb628a + md5: 05f53fdb70c16e7be5ce9c85e2fa7baa size: 4547 - path: scripts/collect-data.py hash: md5 @@ -14,19 +14,19 @@ stages: outs: - path: data/raw/data.csv hash: md5 - md5: c6403931056cff39c66438d1b8dc17b8 - size: 43638 + md5: b7ba2e0ce65f893e4db48f9ae156d2cc + size: 43611 plot-voltage: cmd: calkit xenv -n py --no-check -- python scripts/plot-voltage.py deps: - path: .calkit/env-locks/py.yml hash: md5 - md5: 415abac783d7124497e523d78afb628a + md5: 05f53fdb70c16e7be5ce9c85e2fa7baa size: 4547 - path: data/raw/data.csv hash: md5 - md5: c6403931056cff39c66438d1b8dc17b8 - size: 43638 + md5: b7ba2e0ce65f893e4db48f9ae156d2cc + size: 43611 - path: scripts/plot-voltage.py hash: md5 md5: 087a567a0c0f6199a908399013d564a1 @@ -34,8 +34,8 @@ stages: outs: - path: figures/voltage-time-series.png hash: md5 - md5: 38086b513821aaa41b6b5bd2af71567a - size: 46700 + md5: 1f35eb0a43dba0169a83d14b873a0c79 + size: 44615 copy-figures-to-paper-dir: cmd: cp -r figures paper/figures deps: @@ -56,12 +56,12 @@ stages: deps: - path: .calkit/env-locks/tex.json hash: md5 - md5: 3a74b701e17d8cef01c6958e7fb9bf0c + md5: c030e05b4e497d9d15b0cd07c1db16f3 size: 1171 - path: figures hash: md5 - md5: dbdd5fb15cc447f44b204fa239c12463.dir - size: 46725 + md5: 49feff31a47e2e19bf90299d06f62014.dir + size: 44640 nfiles: 2 - path: paper/paper.tex hash: md5 @@ -70,8 +70,8 @@ stages: outs: - path: paper/paper.pdf hash: md5 - md5: 286a355ba0119bb7cdd6f8e5380b968f - size: 97242 + md5: 13ee8eb76f777de6242c16c15d054673 + size: 94915 _check_env_py: cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml @@ -103,12 +103,12 @@ stages: outs: - path: .calkit/env-locks/py.yml hash: md5 - md5: 415abac783d7124497e523d78afb628a + md5: 05f53fdb70c16e7be5ce9c85e2fa7baa size: 4547 _check-env-tex: cmd: calkit check environment --name tex outs: - path: .calkit/env-locks/tex.json hash: md5 - md5: 3a74b701e17d8cef01c6958e7fb9bf0c + md5: c030e05b4e497d9d15b0cd07c1db16f3 size: 1171 From ac3f2ecda4bbf05687be2668f5b262f72248f563 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:05:07 -0700 Subject: [PATCH 3/6] Setup Docker buildx --- .github/workflows/run.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 61351f6..a18324d 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -29,6 +29,8 @@ jobs: run: | git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Setup Miniforge uses: conda-incubator/setup-miniconda@v3 with: From 1cdd16327a77a454171f56ec48ed72866cb62bb5 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:09:53 -0700 Subject: [PATCH 4/6] Install Calkit with uv --- .github/workflows/run.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index a18324d..144be10 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -31,13 +31,16 @@ jobs: git config user.email 41898282+github-actions[bot]@users.noreply.github.com - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Setup uv + uses: astral-sh/setup-uv@v5 - name: Setup Miniforge uses: conda-incubator/setup-miniconda@v3 with: miniforge-version: latest auto-activate-base: true conda-remove-defaults: true - - run: pip install calkit-python + - name: Install Calkit + run: uv tool install calkit-python - name: Restore DVC cache id: cache-dvc-restore uses: actions/cache/restore@v4 From 21051ca22ea3c68073563e6d1e0fe795defbbab2 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:13:42 -0700 Subject: [PATCH 5/6] Add to paper --- paper/paper.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper/paper.tex b/paper/paper.tex index 7790868..eb6bd3a 100644 --- a/paper/paper.tex +++ b/paper/paper.tex @@ -40,6 +40,8 @@ \section{Section 2} This is another sentence in the second section. +This was added in a PR. + %--/Paper-- \end{document} From 351da3d7da8a57eda2bb4ed7655f203b0cca3664 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 13:16:52 +0000 Subject: [PATCH 6/6] Run pipeline --- dvc.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc.lock b/dvc.lock index 4f2c464..4280a37 100644 --- a/dvc.lock +++ b/dvc.lock @@ -65,13 +65,13 @@ stages: nfiles: 2 - path: paper/paper.tex hash: md5 - md5: 1480301e18c57bf533d604e1a3593101 - size: 653 + md5: 09f2923d7ec5a75fefe95497d6e177cd + size: 678 outs: - path: paper/paper.pdf hash: md5 - md5: 13ee8eb76f777de6242c16c15d054673 - size: 94915 + md5: bff1721a57af4275b13af9dd8033ad9a + size: 95417 _check_env_py: cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml