From 280367378129ff5f314b99446dce5ab6a34dc259 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:46:51 -0700 Subject: [PATCH 1/8] Add Actions workflow to run pipeline --- .github/workflows/run.yml | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/run.yml diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml new file mode 100644 index 0000000..a495505 --- /dev/null +++ b/.github/workflows/run.yml @@ -0,0 +1,42 @@ +name: Run pipeline + +on: push + +permissions: + contents: write + +jobs: + main: + name: Run + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + cache: pip + - run: pip install calkit-python uv + - name: Restore DVC cache + id: cache-dvc-restore + uses: actions/cache/restore@v4 + with: + path: .dvc/cache + key: ${{ runner.os }}-dvc-cache + - run: calkit config remote-auth + env: + CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }} + - run: dvc pull + - run: calkit run + - run: calkit save -am "Run pipeline" + env: + CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }} + - name: Save DVC cache + id: cache-dvc-save + uses: actions/cache/save@v4 + with: + path: .dvc/cache + key: ${{ steps.cache-dvc-restore.outputs.cache-primary-key }} From e86b44d6a4c2fc801fce998ebb917b86045f58d4 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:49:10 -0700 Subject: [PATCH 2/8] Remove Python cache --- .github/workflows/run.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index a495505..203cea6 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - cache: pip - run: pip install calkit-python uv - name: Restore DVC cache id: cache-dvc-restore From 732e614d3ee5103d74c9d89a71556d7d9f9e71db Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:50:30 -0700 Subject: [PATCH 3/8] Set conda as dep --- calkit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calkit.yaml b/calkit.yaml index 1d27315..1ce9cee 100644 --- a/calkit.yaml +++ b/calkit.yaml @@ -5,7 +5,7 @@ description: A basic Calkit exmple project. git_repo_url: https://github.com/calkit/example-basic dependencies: - docker - - mamba + - conda questions: - Can we make reproducibility simple? datasets: From 00c4b85cfe314340ce52c7e97800feeb69b5d8ec Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:51:57 -0700 Subject: [PATCH 4/8] Use miniforge --- .github/workflows/run.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 203cea6..8996fc3 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -15,10 +15,12 @@ jobs: run: | git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 + - name: Setup Miniforge + uses: conda-incubator/setup-miniconda@v3 with: - python-version: "3.13" - - run: pip install calkit-python uv + miniforge-version: latest + auto-activate-base: true + - run: pip install calkit-python - name: Restore DVC cache id: cache-dvc-restore uses: actions/cache/restore@v4 From 222bb231b1fced2c9ea4f8684fddc45622737def Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 17:52:53 +0000 Subject: [PATCH 5/8] Run pipeline --- .dvc/config | 1 + 1 file changed, 1 insertion(+) diff --git a/.dvc/config b/.dvc/config index e1e30f4..9cb9da2 100644 --- a/.dvc/config +++ b/.dvc/config @@ -1,5 +1,6 @@ [core] remote = calkit + autostage = true ['remote "calkit"'] url = https://api.calkit.io/projects/calkit/example-basic/dvc auth = custom From 6d34b73026eab6d260fc891ab8533cb3d60fe1ce Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:56:11 -0700 Subject: [PATCH 6/8] Update paper to test CI --- paper/paper.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper/paper.tex b/paper/paper.tex index d6e7549..d000666 100644 --- a/paper/paper.tex +++ b/paper/paper.tex @@ -35,7 +35,8 @@ \section{Section 1} \pagebreak \section{Section 2} -Lorem Ipsum \\ + +This is the second section of the paper. %--/Paper-- From e84d9d6dac40a6331ea79768214a8f3cbfa3eabc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 17:58:43 +0000 Subject: [PATCH 7/8] Run pipeline --- dvc.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc.lock b/dvc.lock index 7128352..71d60c3 100644 --- a/dvc.lock +++ b/dvc.lock @@ -60,10 +60,10 @@ stages: nfiles: 2 - path: paper/paper.tex hash: md5 - md5: af281fec490bfff26b5954baa2e177d6 - size: 577 + md5: 6455fc859c8b1838f22d5ac74223b323 + size: 604 outs: - path: paper/paper.pdf hash: md5 - md5: 272ef20d54a4c536be5a92693164a735 - size: 92833 + md5: 6f1fec0754597ecdb78cf0e9852884ad + size: 92860 From eb6d8fa0b6a80126fccdb4e1aac08ace1df91b70 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Sun, 9 Mar 2025 10:59:51 -0700 Subject: [PATCH 8/8] Set conda-remove-defaults --- .github/workflows/run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 8996fc3..612f442 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -20,6 +20,7 @@ jobs: with: miniforge-version: latest auto-activate-base: true + conda-remove-defaults: true - run: pip install calkit-python - name: Restore DVC cache id: cache-dvc-restore