calkit-python 0.31.2__tar.gz → 0.31.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. {calkit_python-0.31.2 → calkit_python-0.31.4}/PKG-INFO +1 -1
  2. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/__init__.py +1 -1
  3. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/check.py +12 -6
  4. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/main.py +5 -0
  5. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/environments.py +25 -18
  6. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/pipeline.py +2 -2
  7. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_new.py +5 -3
  8. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_pipeline.py +3 -1
  9. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/FUNDING.yml +0 -0
  10. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/workflows/docs.yml +0 -0
  11. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/workflows/format.yml +0 -0
  12. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/workflows/publish-test.yml +0 -0
  13. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/workflows/publish.yml +0 -0
  14. {calkit_python-0.31.2 → calkit_python-0.31.4}/.github/workflows/test.yml +0 -0
  15. {calkit_python-0.31.2 → calkit_python-0.31.4}/.gitignore +0 -0
  16. {calkit_python-0.31.2 → calkit_python-0.31.4}/.pre-commit-config.yaml +0 -0
  17. {calkit_python-0.31.2 → calkit_python-0.31.4}/.python-version +0 -0
  18. {calkit_python-0.31.2 → calkit_python-0.31.4}/CITATION.cff +0 -0
  19. {calkit_python-0.31.2 → calkit_python-0.31.4}/CONTRIBUTING.md +0 -0
  20. {calkit_python-0.31.2 → calkit_python-0.31.4}/LICENSE +0 -0
  21. {calkit_python-0.31.2 → calkit_python-0.31.4}/Makefile +0 -0
  22. {calkit_python-0.31.2 → calkit_python-0.31.4}/README.md +0 -0
  23. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/__main__.py +0 -0
  24. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/calc.py +0 -0
  25. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/check.py +0 -0
  26. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/__init__.py +0 -0
  27. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/cloud.py +0 -0
  28. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/config.py +0 -0
  29. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/core.py +0 -0
  30. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/describe.py +0 -0
  31. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/import_.py +0 -0
  32. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/list.py +0 -0
  33. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/new.py +0 -0
  34. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/notebooks.py +0 -0
  35. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/office.py +0 -0
  36. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/overleaf.py +0 -0
  37. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/slurm.py +0 -0
  38. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cli/update.py +0 -0
  39. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/cloud.py +0 -0
  40. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/conda.py +0 -0
  41. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/config.py +0 -0
  42. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/core.py +0 -0
  43. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/datasets.py +0 -0
  44. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/docker.py +0 -0
  45. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/dvc.py +0 -0
  46. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/git.py +0 -0
  47. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/github.py +0 -0
  48. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/gui.py +0 -0
  49. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/invenio.py +0 -0
  50. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/jupyter.py +0 -0
  51. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/licenses.py +0 -0
  52. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/magics.py +0 -0
  53. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/matlab.py +0 -0
  54. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/models/__init__.py +0 -0
  55. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/models/core.py +0 -0
  56. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/models/io.py +0 -0
  57. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/models/iteration.py +0 -0
  58. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/models/pipeline.py +0 -0
  59. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/notebooks.py +0 -0
  60. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/office.py +0 -0
  61. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/ops.py +0 -0
  62. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/overleaf.py +0 -0
  63. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/releases.py +0 -0
  64. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/server.py +0 -0
  65. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/__init__.py +0 -0
  66. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/core.py +0 -0
  67. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/__init__.py +0 -0
  68. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/article/paper.tex +0 -0
  69. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/core.py +0 -0
  70. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/jfm/jfm.bst +0 -0
  71. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/jfm/jfm.cls +0 -0
  72. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/jfm/lineno-FLM.sty +0 -0
  73. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/jfm/paper.tex +0 -0
  74. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/templates/latex/jfm/upmath.sty +0 -0
  75. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/__init__.py +0 -0
  76. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/__init__.py +0 -0
  77. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_check.py +0 -0
  78. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_config.py +0 -0
  79. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_list.py +0 -0
  80. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_main.py +0 -0
  81. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_notebooks.py +0 -0
  82. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/cli/test_overleaf.py +0 -0
  83. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/models/__init__.py +0 -0
  84. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/models/test_iteration.py +0 -0
  85. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/models/test_pipeline.py +0 -0
  86. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_calc.py +0 -0
  87. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_check.py +0 -0
  88. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_conda.py +0 -0
  89. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_core.py +0 -0
  90. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_dvc.py +0 -0
  91. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_invenio.py +0 -0
  92. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_jupyter.py +0 -0
  93. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_magics.py +0 -0
  94. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_notebooks.py +0 -0
  95. {calkit_python-0.31.2 → calkit_python-0.31.4}/calkit/tests/test_templates.py +0 -0
  96. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/CNAME +0 -0
  97. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/apps.md +0 -0
  98. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/calculations.md +0 -0
  99. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/calkit-yaml.md +0 -0
  100. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/cli-reference.md +0 -0
  101. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/cloud-integration.md +0 -0
  102. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/datasets.md +0 -0
  103. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/dependencies.md +0 -0
  104. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/environments.md +0 -0
  105. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/examples.md +0 -0
  106. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/help.md +0 -0
  107. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/img/c-to-the-k-white.svg +0 -0
  108. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/img/calkit-no-bg.png +0 -0
  109. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/img/connect-zenodo.png +0 -0
  110. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/img/jupyterlab-params.png +0 -0
  111. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/img/vscode-nb-params.png +0 -0
  112. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/index.md +0 -0
  113. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/installation.md +0 -0
  114. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/local-server.md +0 -0
  115. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/notebooks.md +0 -0
  116. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/overleaf.md +0 -0
  117. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/pipeline/index.md +0 -0
  118. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/pipeline/manual-steps.md +0 -0
  119. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/pipeline/running-and-logging.md +0 -0
  120. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/pipeline/slurm.md +0 -0
  121. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/quickstart.md +0 -0
  122. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/references.md +0 -0
  123. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/releases.md +0 -0
  124. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/adding-latex-pub-docker.md +0 -0
  125. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/conda-envs.md +0 -0
  126. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/existing-project.md +0 -0
  127. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/first-project.md +0 -0
  128. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/github-actions.md +0 -0
  129. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/actions-repo-secrets.png +0 -0
  130. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/building-codespace.png +0 -0
  131. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/codespaces-secrets-2.png +0 -0
  132. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/editor-split.png +0 -0
  133. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/go-to-linked-code.png +0 -0
  134. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/issue-from-selection.png +0 -0
  135. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/new-project.png +0 -0
  136. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/new-pub-2.png +0 -0
  137. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/new-token.png +0 -0
  138. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/paper.tex.png +0 -0
  139. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/project-home-3.png +0 -0
  140. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/push.png +0 -0
  141. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/latex-codespaces/stage.png +0 -0
  142. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/anakin-excel.jpg +0 -0
  143. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/chart-more-rows.png +0 -0
  144. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/create-project.png +0 -0
  145. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/elsevier-research-data-guidelines.png +0 -0
  146. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/excel-chart.png +0 -0
  147. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/excel-data.png +0 -0
  148. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/insert-link-to-file.png +0 -0
  149. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/needs-clone.png +0 -0
  150. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/new-stage.png +0 -0
  151. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/phd-comics-version-control.webp +0 -0
  152. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/pipeline-out-of-date.png +0 -0
  153. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/status-more-rows.png +0 -0
  154. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/uncommitted-changes.png +0 -0
  155. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/untracked-data.png +0 -0
  156. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/updated-publication.png +0 -0
  157. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/word-to-pdf-stage-2.png +0 -0
  158. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/office/workflow-page.png +0 -0
  159. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/clone.png +0 -0
  160. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/create-project.png +0 -0
  161. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/datasets-page.png +0 -0
  162. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/figure-on-website-updated.png +0 -0
  163. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/figure-on-website.png +0 -0
  164. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/new-token.png +0 -0
  165. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/reclone.png +0 -0
  166. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/openfoam/status-after-import-dataset.png +0 -0
  167. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/quick-actions.png +0 -0
  168. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/img/run-proc.png +0 -0
  169. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/index.md +0 -0
  170. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/latex-codespaces.md +0 -0
  171. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/matlab.md +0 -0
  172. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/notebook-pipeline.md +0 -0
  173. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/office.md +0 -0
  174. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/openfoam.md +0 -0
  175. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/tutorials/procedures.md +0 -0
  176. {calkit_python-0.31.2 → calkit_python-0.31.4}/docs/version-control.md +0 -0
  177. {calkit_python-0.31.2 → calkit_python-0.31.4}/mkdocs.yml +0 -0
  178. {calkit_python-0.31.2 → calkit_python-0.31.4}/pyproject.toml +0 -0
  179. {calkit_python-0.31.2 → calkit_python-0.31.4}/scripts/install.ps1 +0 -0
  180. {calkit_python-0.31.2 → calkit_python-0.31.4}/scripts/install.sh +0 -0
  181. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/nb-julia.ipynb +0 -0
  182. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/nb-params.ipynb +0 -0
  183. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/nb-subdir.ipynb +0 -0
  184. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/pipeline.ipynb +0 -0
  185. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/script.py +0 -0
  186. {calkit_python-0.31.2 → calkit_python-0.31.4}/test/test-log.log +0 -0
  187. {calkit_python-0.31.2 → calkit_python-0.31.4}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: calkit-python
3
- Version: 0.31.2
3
+ Version: 0.31.4
4
4
  Summary: Reproducibility simplified.
5
5
  Project-URL: Homepage, https://calkit.org
6
6
  Project-URL: Issues, https://github.com/calkit/calkit/issues
@@ -1,4 +1,4 @@
1
- __version__ = "0.31.2"
1
+ __version__ = "0.31.4"
2
2
 
3
3
  from .core import * # noqa: F403, I001
4
4
  from . import git # noqa: F401
@@ -307,10 +307,10 @@ def check_docker_env(
307
307
  "Lock file output path must be provided if input Dockerfile is not"
308
308
  )
309
309
 
310
- def get_docker_inspect() -> dict:
310
+ def get_docker_inspect(obj_id: str = tag) -> dict:
311
311
  # This command returns a list, of which we want the first object
312
312
  out = json.loads(
313
- subprocess.check_output(["docker", "inspect", tag]).decode()
313
+ subprocess.check_output(["docker", "inspect", obj_id]).decode()
314
314
  )
315
315
  # Remove some keys that can change without the important aspects of
316
316
  # the image changing
@@ -411,15 +411,18 @@ def check_docker_env(
411
411
  if lock and "RepoDigests" in lock:
412
412
  repo_digests = lock["RepoDigests"]
413
413
  if repo_digests:
414
- tag_with_digest = repo_digests[0]
415
- typer.echo(f"Pulling image by digest: {tag_with_digest}")
416
- cmd = ["docker", "pull", tag_with_digest]
414
+ image_with_digest = repo_digests[0]
415
+ typer.echo(f"Pulling image by digest: {image_with_digest}")
416
+ cmd = ["docker", "pull", image_with_digest]
417
+ tag_cmd = ["docker", "tag", image_with_digest, tag]
417
418
  try:
418
419
  subprocess.check_output(cmd)
420
+ # Now tag the pulled image
421
+ subprocess.check_output(tag_cmd)
419
422
  pulled = True
420
423
  except subprocess.CalledProcessError:
421
424
  warn(
422
- f"Failed to pull image by digest: {tag_with_digest}; "
425
+ f"Failed to pull image by digest: {image_with_digest}; "
423
426
  "falling back to pulling by tag"
424
427
  )
425
428
  pulled = False
@@ -432,6 +435,9 @@ def check_docker_env(
432
435
  raise_error(f"Failed to pull image: {tag}")
433
436
  # Write the lock file
434
437
  inspect = get_docker_inspect()
438
+ # Ensure repo tags only have the tag we wanted, not the digest, so we
439
+ # don't cause stages to rerun from lock file change
440
+ inspect["RepoTags"] = [tag]
435
441
  inspect["DockerfileMD5"] = dockerfile_md5
436
442
  inspect["DepsMD5s"] = deps_md5s
437
443
  if platform is not None:
@@ -259,6 +259,11 @@ def clone(
259
259
  @app.command(name="status")
260
260
  def get_status():
261
261
  """Get a unified Git and DVC status."""
262
+ ck_info = calkit.load_calkit_info()
263
+ try:
264
+ calkit.pipeline.to_dvc(ck_info=ck_info, write=True)
265
+ except Exception as e:
266
+ warn(f"Failed to compile pipeline: {e.__class__.__name__}: {e}")
262
267
  print_sep("Project")
263
268
  # Print latest status
264
269
  status = calkit.get_latest_project_status()
@@ -31,7 +31,7 @@ def get_env_lock_dir(wdir: str | None = None) -> str:
31
31
  return env_lock_dir
32
32
 
33
33
 
34
- def _conda_venv_subdir() -> str:
34
+ def _conda_venv_platform() -> str:
35
35
  sys = platform.system().lower()
36
36
  mach = platform.machine().lower()
37
37
  if sys == "darwin":
@@ -85,10 +85,9 @@ def get_all_docker_lock_fpaths(
85
85
  legacy handling is performed separately.
86
86
  """
87
87
  env_lock_dir = get_env_lock_dir(wdir=wdir)
88
- docker_dir = os.path.join(env_lock_dir, "docker")
88
+ docker_dir = os.path.join(env_lock_dir, env_name)
89
89
  fpaths = [
90
- os.path.join(docker_dir, arch, env_name + ".json")
91
- for arch in DOCKER_ARCHS
90
+ os.path.join(docker_dir, arch + ".json") for arch in DOCKER_ARCHS
92
91
  ]
93
92
  if as_posix:
94
93
  fpaths = [PurePosixPath(p).as_posix() for p in fpaths]
@@ -104,10 +103,9 @@ def get_all_conda_lock_fpaths(
104
103
  architecture.
105
104
  """
106
105
  env_lock_dir = get_env_lock_dir(wdir=wdir)
107
- conda_dir = os.path.join(env_lock_dir, "conda")
106
+ env_lock_dir = os.path.join(env_lock_dir, env_name)
108
107
  fpaths = [
109
- os.path.join(conda_dir, arch, env_name + ".yml")
110
- for arch in CONDA_VENV_ARCHS
108
+ os.path.join(env_lock_dir, arch + ".yml") for arch in CONDA_VENV_ARCHS
111
109
  ]
112
110
  if as_posix:
113
111
  fpaths = [PurePosixPath(p).as_posix() for p in fpaths]
@@ -123,10 +121,9 @@ def get_all_venv_lock_fpaths(
123
121
  architecture.
124
122
  """
125
123
  env_lock_dir = get_env_lock_dir(wdir=wdir)
126
- venv_dir = os.path.join(env_lock_dir, "venvs")
124
+ venv_dir = os.path.join(env_lock_dir, env_name)
127
125
  fpaths = [
128
- os.path.join(venv_dir, arch, env_name + ".txt")
129
- for arch in CONDA_VENV_ARCHS
126
+ os.path.join(venv_dir, arch + ".txt") for arch in CONDA_VENV_ARCHS
130
127
  ]
131
128
  if as_posix:
132
129
  fpaths = [PurePosixPath(p).as_posix() for p in fpaths]
@@ -139,8 +136,14 @@ def get_env_lock_fpath(
139
136
  wdir: str | None = None,
140
137
  as_posix: bool = True,
141
138
  legacy: bool = False,
139
+ for_dvc: bool = False,
142
140
  ) -> str | None:
143
- """Create the environment lock file path."""
141
+ """Create the environment lock file path.
142
+
143
+ If `for_dvc` is True, return the directory containing the lock file
144
+ instead of the lock file itself for Docker, venv, and conda environments,
145
+ which store a separate lock file for each platform/architecture.
146
+ """
144
147
  env_lock_dir = get_env_lock_dir(wdir=wdir)
145
148
  env_kind = env.get("kind")
146
149
  lock_fpath = os.path.join(env_lock_dir, env_name)
@@ -149,8 +152,10 @@ def get_env_lock_fpath(
149
152
  lock_fpath += ".json"
150
153
  else:
151
154
  lock_fpath = os.path.join(
152
- env_lock_dir, "docker", _docker_platform(), env_name + ".json"
155
+ env_lock_dir, env_name, _docker_platform() + ".json"
153
156
  )
157
+ if for_dvc:
158
+ lock_fpath = os.path.dirname(lock_fpath)
154
159
  elif env_kind == "uv":
155
160
  env_dir = os.path.dirname(env.get("path", ""))
156
161
  if env_dir:
@@ -163,20 +168,22 @@ def get_env_lock_fpath(
163
168
  else:
164
169
  lock_fpath = os.path.join(
165
170
  env_lock_dir,
166
- "venvs",
167
- _conda_venv_subdir(),
168
- env_name + ".txt",
171
+ env_name,
172
+ _conda_venv_platform() + ".txt",
169
173
  )
174
+ if for_dvc:
175
+ lock_fpath = os.path.dirname(lock_fpath)
170
176
  elif env_kind == "conda":
171
177
  if legacy:
172
178
  lock_fpath += ".yml"
173
179
  else:
174
180
  lock_fpath = os.path.join(
175
181
  env_lock_dir,
176
- "conda",
177
- _conda_venv_subdir(),
178
- env_name + ".yml",
182
+ env_name,
183
+ _conda_venv_platform() + ".yml",
179
184
  )
185
+ if for_dvc:
186
+ lock_fpath = os.path.dirname(lock_fpath)
180
187
  elif env_kind == "matlab":
181
188
  lock_fpath += ".json"
182
189
  elif env_kind == "julia":
@@ -73,11 +73,11 @@ def to_dvc(
73
73
  continue
74
74
  env_fpath = env.get("path")
75
75
  lock_fpath = get_env_lock_fpath(
76
- env=env, env_name=env_name, as_posix=True
76
+ env=env, env_name=env_name, as_posix=True, for_dvc=True
77
77
  )
78
- cmd = f"calkit check environment --name {env_name}"
79
78
  if lock_fpath is None:
80
79
  continue
80
+ cmd = f"calkit check environment --name {env_name}"
81
81
  deps = []
82
82
  outs = []
83
83
  if env_fpath is not None:
@@ -507,7 +507,7 @@ def test_new_python_script_stage(tmp_dir):
507
507
  "calkit xenv -n py --no-check -- python script.py"
508
508
  )
509
509
  env_lock_fpath = get_env_lock_fpath(
510
- calkit.load_calkit_info()["environments"]["py"], "py"
510
+ calkit.load_calkit_info()["environments"]["py"], "py", for_dvc=True
511
511
  )
512
512
  assert set(pipeline["stages"]["run-script"]["deps"]) == set(
513
513
  ["script.py", env_lock_fpath]
@@ -588,7 +588,7 @@ def test_new_latex_stage(tmp_dir):
588
588
  )
589
589
  ck_info = calkit.load_calkit_info()
590
590
  env = ck_info["environments"]["tex"]
591
- env_lock_fpath = get_env_lock_fpath(env, "tex")
591
+ env_lock_fpath = get_env_lock_fpath(env, "tex", for_dvc=True)
592
592
  assert set(pipeline["stages"]["build-paper"]["deps"]) == set(
593
593
  ["paper.tex", env_lock_fpath]
594
594
  )
@@ -635,7 +635,9 @@ def test_new_matlab_script_stage(tmp_dir):
635
635
  "calkit xenv -n matlab1 --no-check -- \"run('scripts/script.m');\""
636
636
  )
637
637
  env_lock_fpath = get_env_lock_fpath(
638
- calkit.load_calkit_info()["environments"]["matlab1"], "matlab1"
638
+ calkit.load_calkit_info()["environments"]["matlab1"],
639
+ "matlab1",
640
+ for_dvc=True,
639
641
  )
640
642
  assert set(pipeline["stages"]["run-script1"]["deps"]) == set(
641
643
  ["scripts/script.m", env_lock_fpath]
@@ -45,7 +45,9 @@ def test_to_dvc():
45
45
  assert stage["desc"].startswith("Automatically generated")
46
46
  out = stage["outs"][0]
47
47
  out_path = list(out.keys())[0]
48
- env_lock_fpath = get_env_lock_fpath(ck_info["environments"]["py"], "py")
48
+ env_lock_fpath = get_env_lock_fpath(
49
+ ck_info["environments"]["py"], "py", for_dvc=True
50
+ )
49
51
  assert out_path == env_lock_fpath
50
52
  assert not out[out_path]["cache"]
51
53
  # TODO: Test other stage types
File without changes
File without changes
File without changes
File without changes