calkit-python 0.31.4__tar.gz → 0.31.5__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.4 → calkit_python-0.31.5}/PKG-INFO +1 -1
  2. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/__init__.py +1 -1
  3. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/check.py +29 -0
  4. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/update.py +110 -0
  5. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/core.py +2 -0
  6. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/FUNDING.yml +0 -0
  7. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/workflows/docs.yml +0 -0
  8. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/workflows/format.yml +0 -0
  9. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/workflows/publish-test.yml +0 -0
  10. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/workflows/publish.yml +0 -0
  11. {calkit_python-0.31.4 → calkit_python-0.31.5}/.github/workflows/test.yml +0 -0
  12. {calkit_python-0.31.4 → calkit_python-0.31.5}/.gitignore +0 -0
  13. {calkit_python-0.31.4 → calkit_python-0.31.5}/.pre-commit-config.yaml +0 -0
  14. {calkit_python-0.31.4 → calkit_python-0.31.5}/.python-version +0 -0
  15. {calkit_python-0.31.4 → calkit_python-0.31.5}/CITATION.cff +0 -0
  16. {calkit_python-0.31.4 → calkit_python-0.31.5}/CONTRIBUTING.md +0 -0
  17. {calkit_python-0.31.4 → calkit_python-0.31.5}/LICENSE +0 -0
  18. {calkit_python-0.31.4 → calkit_python-0.31.5}/Makefile +0 -0
  19. {calkit_python-0.31.4 → calkit_python-0.31.5}/README.md +0 -0
  20. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/__main__.py +0 -0
  21. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/calc.py +0 -0
  22. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/check.py +0 -0
  23. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/__init__.py +0 -0
  24. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/cloud.py +0 -0
  25. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/config.py +0 -0
  26. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/core.py +0 -0
  27. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/describe.py +0 -0
  28. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/import_.py +0 -0
  29. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/list.py +0 -0
  30. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/main.py +0 -0
  31. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/new.py +0 -0
  32. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/notebooks.py +0 -0
  33. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/office.py +0 -0
  34. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/overleaf.py +0 -0
  35. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cli/slurm.py +0 -0
  36. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/cloud.py +0 -0
  37. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/conda.py +0 -0
  38. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/config.py +0 -0
  39. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/datasets.py +0 -0
  40. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/docker.py +0 -0
  41. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/dvc.py +0 -0
  42. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/environments.py +0 -0
  43. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/git.py +0 -0
  44. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/github.py +0 -0
  45. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/gui.py +0 -0
  46. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/invenio.py +0 -0
  47. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/jupyter.py +0 -0
  48. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/licenses.py +0 -0
  49. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/magics.py +0 -0
  50. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/matlab.py +0 -0
  51. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/models/__init__.py +0 -0
  52. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/models/core.py +0 -0
  53. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/models/io.py +0 -0
  54. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/models/iteration.py +0 -0
  55. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/models/pipeline.py +0 -0
  56. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/notebooks.py +0 -0
  57. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/office.py +0 -0
  58. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/ops.py +0 -0
  59. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/overleaf.py +0 -0
  60. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/pipeline.py +0 -0
  61. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/releases.py +0 -0
  62. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/server.py +0 -0
  63. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/__init__.py +0 -0
  64. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/core.py +0 -0
  65. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/__init__.py +0 -0
  66. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/article/paper.tex +0 -0
  67. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/core.py +0 -0
  68. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/jfm/jfm.bst +0 -0
  69. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/jfm/jfm.cls +0 -0
  70. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/jfm/lineno-FLM.sty +0 -0
  71. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/jfm/paper.tex +0 -0
  72. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/templates/latex/jfm/upmath.sty +0 -0
  73. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/__init__.py +0 -0
  74. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/__init__.py +0 -0
  75. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_check.py +0 -0
  76. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_config.py +0 -0
  77. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_list.py +0 -0
  78. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_main.py +0 -0
  79. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_new.py +0 -0
  80. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_notebooks.py +0 -0
  81. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/cli/test_overleaf.py +0 -0
  82. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/models/__init__.py +0 -0
  83. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/models/test_iteration.py +0 -0
  84. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/models/test_pipeline.py +0 -0
  85. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_calc.py +0 -0
  86. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_check.py +0 -0
  87. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_conda.py +0 -0
  88. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_core.py +0 -0
  89. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_dvc.py +0 -0
  90. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_invenio.py +0 -0
  91. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_jupyter.py +0 -0
  92. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_magics.py +0 -0
  93. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_notebooks.py +0 -0
  94. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_pipeline.py +0 -0
  95. {calkit_python-0.31.4 → calkit_python-0.31.5}/calkit/tests/test_templates.py +0 -0
  96. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/CNAME +0 -0
  97. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/apps.md +0 -0
  98. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/calculations.md +0 -0
  99. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/calkit-yaml.md +0 -0
  100. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/cli-reference.md +0 -0
  101. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/cloud-integration.md +0 -0
  102. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/datasets.md +0 -0
  103. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/dependencies.md +0 -0
  104. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/environments.md +0 -0
  105. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/examples.md +0 -0
  106. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/help.md +0 -0
  107. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/img/c-to-the-k-white.svg +0 -0
  108. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/img/calkit-no-bg.png +0 -0
  109. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/img/connect-zenodo.png +0 -0
  110. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/img/jupyterlab-params.png +0 -0
  111. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/img/vscode-nb-params.png +0 -0
  112. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/index.md +0 -0
  113. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/installation.md +0 -0
  114. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/local-server.md +0 -0
  115. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/notebooks.md +0 -0
  116. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/overleaf.md +0 -0
  117. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/pipeline/index.md +0 -0
  118. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/pipeline/manual-steps.md +0 -0
  119. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/pipeline/running-and-logging.md +0 -0
  120. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/pipeline/slurm.md +0 -0
  121. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/quickstart.md +0 -0
  122. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/references.md +0 -0
  123. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/releases.md +0 -0
  124. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/adding-latex-pub-docker.md +0 -0
  125. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/conda-envs.md +0 -0
  126. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/existing-project.md +0 -0
  127. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/first-project.md +0 -0
  128. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/github-actions.md +0 -0
  129. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/actions-repo-secrets.png +0 -0
  130. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/building-codespace.png +0 -0
  131. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/codespaces-secrets-2.png +0 -0
  132. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/editor-split.png +0 -0
  133. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/go-to-linked-code.png +0 -0
  134. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/issue-from-selection.png +0 -0
  135. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/new-project.png +0 -0
  136. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/new-pub-2.png +0 -0
  137. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/new-token.png +0 -0
  138. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/paper.tex.png +0 -0
  139. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/project-home-3.png +0 -0
  140. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/push.png +0 -0
  141. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/latex-codespaces/stage.png +0 -0
  142. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/anakin-excel.jpg +0 -0
  143. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/chart-more-rows.png +0 -0
  144. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/create-project.png +0 -0
  145. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/elsevier-research-data-guidelines.png +0 -0
  146. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/excel-chart.png +0 -0
  147. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/excel-data.png +0 -0
  148. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/insert-link-to-file.png +0 -0
  149. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/needs-clone.png +0 -0
  150. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/new-stage.png +0 -0
  151. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/phd-comics-version-control.webp +0 -0
  152. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/pipeline-out-of-date.png +0 -0
  153. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/status-more-rows.png +0 -0
  154. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/uncommitted-changes.png +0 -0
  155. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/untracked-data.png +0 -0
  156. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/updated-publication.png +0 -0
  157. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/word-to-pdf-stage-2.png +0 -0
  158. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/office/workflow-page.png +0 -0
  159. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/clone.png +0 -0
  160. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/create-project.png +0 -0
  161. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/datasets-page.png +0 -0
  162. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/figure-on-website-updated.png +0 -0
  163. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/figure-on-website.png +0 -0
  164. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/new-token.png +0 -0
  165. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/reclone.png +0 -0
  166. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/openfoam/status-after-import-dataset.png +0 -0
  167. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/quick-actions.png +0 -0
  168. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/img/run-proc.png +0 -0
  169. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/index.md +0 -0
  170. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/latex-codespaces.md +0 -0
  171. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/matlab.md +0 -0
  172. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/notebook-pipeline.md +0 -0
  173. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/office.md +0 -0
  174. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/openfoam.md +0 -0
  175. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/tutorials/procedures.md +0 -0
  176. {calkit_python-0.31.4 → calkit_python-0.31.5}/docs/version-control.md +0 -0
  177. {calkit_python-0.31.4 → calkit_python-0.31.5}/mkdocs.yml +0 -0
  178. {calkit_python-0.31.4 → calkit_python-0.31.5}/pyproject.toml +0 -0
  179. {calkit_python-0.31.4 → calkit_python-0.31.5}/scripts/install.ps1 +0 -0
  180. {calkit_python-0.31.4 → calkit_python-0.31.5}/scripts/install.sh +0 -0
  181. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/nb-julia.ipynb +0 -0
  182. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/nb-params.ipynb +0 -0
  183. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/nb-subdir.ipynb +0 -0
  184. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/pipeline.ipynb +0 -0
  185. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/script.py +0 -0
  186. {calkit_python-0.31.4 → calkit_python-0.31.5}/test/test-log.log +0 -0
  187. {calkit_python-0.31.4 → calkit_python-0.31.5}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: calkit-python
3
- Version: 0.31.4
3
+ Version: 0.31.5
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.4"
1
+ __version__ = "0.31.5"
2
2
 
3
3
  from .core import * # noqa: F403, I001
4
4
  from . import git # noqa: F401
@@ -208,6 +208,35 @@ def check_environment(
208
208
  return get_env_lock_fpath(env=env, env_name=env_name, as_posix=False)
209
209
 
210
210
 
211
+ @check_app.command(
212
+ name="envs",
213
+ help="Check that all environments are up-to-date.",
214
+ )
215
+ @check_app.command(name="environments")
216
+ def check_environments(
217
+ verbose: Annotated[
218
+ bool, typer.Option("--verbose", help="Print verbose output.")
219
+ ] = False,
220
+ ) -> str | None:
221
+ ck_info = calkit.load_calkit_info(process_includes="environments")
222
+ envs = ck_info.get("environments", {})
223
+ if not envs:
224
+ typer.echo("No environments defined in calkit.yaml")
225
+ return
226
+ failures = []
227
+ for env_name in envs.keys():
228
+ typer.echo(f"Checking environment: '{env_name}'")
229
+ try:
230
+ check_environment(env_name=env_name, verbose=verbose)
231
+ except Exception as e:
232
+ warn(f"Error checking environment '{env_name}': {e}")
233
+ failures.append(env_name)
234
+ if failures:
235
+ raise_error(
236
+ f"Failed to check the following environments: {', '.join(failures)}"
237
+ )
238
+
239
+
211
240
  @check_app.command(name="docker-env")
212
241
  def check_docker_env(
213
242
  tag: Annotated[str, typer.Argument(help="Image tag.")],
@@ -29,6 +29,13 @@ def update_devcontainer(
29
29
  ),
30
30
  ),
31
31
  ] = None,
32
+ no_commit: Annotated[
33
+ bool,
34
+ typer.Option(
35
+ "--no-commit",
36
+ help="Do not create a Git commit for the updated devcontainer.",
37
+ ),
38
+ ] = False,
32
39
  ):
33
40
  """Update a project's devcontainer to match the latest Calkit spec."""
34
41
  url = (
@@ -43,6 +50,12 @@ def update_devcontainer(
43
50
  typer.echo(f"Writing to {out_fpath}")
44
51
  with open(out_fpath, "w") as f:
45
52
  f.write(resp.text)
53
+ if not no_commit:
54
+ repo = git.Repo(wdir)
55
+ rel_path = os.path.join(".devcontainer", "devcontainer.json")
56
+ repo.git.add(rel_path)
57
+ if repo.git.diff(["--staged", "--", rel_path]):
58
+ repo.git.commit([rel_path, "-m", "Update devcontainer"])
46
59
 
47
60
 
48
61
  @update_app.command(name="license")
@@ -285,3 +298,100 @@ def update_release(
285
298
  service=publisher.lower(), # type: ignore
286
299
  )
287
300
  # TODO: Add ability to update metadata
301
+
302
+
303
+ @update_app.command(name="vscode-config")
304
+ def update_vscode_config(
305
+ wdir: Annotated[
306
+ str | None,
307
+ typer.Option(
308
+ "--wdir",
309
+ help=(
310
+ "Working directory. "
311
+ "By default will run current working directory."
312
+ ),
313
+ ),
314
+ ] = None,
315
+ no_commit: Annotated[
316
+ bool,
317
+ typer.Option(
318
+ "--no-commit",
319
+ help="Do not create a Git commit for the updated VS Code config.",
320
+ ),
321
+ ] = False,
322
+ ):
323
+ """Update a project's VS Code config to match the latest Calkit
324
+ recommendations.
325
+ """
326
+ out_dir = os.path.join(wdir or ".", ".vscode")
327
+ os.makedirs(out_dir, exist_ok=True)
328
+ repo = git.Repo(wdir)
329
+ for fname in ["settings.json", "extensions.json"]:
330
+ url = (
331
+ f"https://raw.githubusercontent.com/calkit/vscode-config/"
332
+ f"refs/heads/main/{fname}"
333
+ )
334
+ typer.echo(f"Downloading {url}")
335
+ resp = requests.get(url)
336
+ out_dir = os.path.join(wdir or ".", ".vscode")
337
+ os.makedirs(out_dir, exist_ok=True)
338
+ out_fpath = os.path.join(out_dir, fname)
339
+ typer.echo(f"Writing to {out_fpath}")
340
+ with open(out_fpath, "w") as f:
341
+ f.write(resp.text)
342
+ repo.git.add(os.path.join(".vscode", fname))
343
+ if not no_commit and repo.git.diff(["--staged", "--", ".vscode"]):
344
+ repo.git.commit([".vscode", "-m", "Update VS Code config"])
345
+
346
+
347
+ @update_app.command(name="github-actions")
348
+ def update_github_actions(
349
+ wdir: Annotated[
350
+ str | None,
351
+ typer.Option(
352
+ "--wdir",
353
+ help=(
354
+ "Working directory. "
355
+ "By default will run current working directory."
356
+ ),
357
+ ),
358
+ ] = None,
359
+ no_commit: Annotated[
360
+ bool,
361
+ typer.Option(
362
+ "--no-commit",
363
+ help="Do not create a Git commit for the updated GitHub Actions.",
364
+ ),
365
+ ] = False,
366
+ ):
367
+ """Update a project's GitHub Actions to match the latest Calkit
368
+ recommendations.
369
+ """
370
+ # First look for any existing workflows that run Calkit to use as the
371
+ # output file name
372
+ fname_out = "run-calkit.yml"
373
+ out_dir = os.path.join(wdir or ".", ".github", "workflows")
374
+ os.makedirs(out_dir, exist_ok=True)
375
+ for fname in os.listdir(out_dir):
376
+ if fname.endswith(".yaml") or fname.endswith(".yml"):
377
+ fpath = os.path.join(out_dir, fname)
378
+ with open(fpath) as f:
379
+ if "calkit" in f.read().lower():
380
+ fname_out = fname
381
+ break
382
+ url = (
383
+ "https://raw.githubusercontent.com/calkit/run-action/refs/heads/main"
384
+ "/example.yml"
385
+ )
386
+ typer.echo(f"Downloading {url}")
387
+ resp = requests.get(url)
388
+ out_fpath = os.path.join(out_dir, fname_out)
389
+ typer.echo(f"Writing to {out_fpath}")
390
+ with open(out_fpath, "w") as f:
391
+ f.write(resp.text)
392
+ if not no_commit:
393
+ rel_path = os.path.join(".github", "workflows", fname_out)
394
+ repo = git.Repo(wdir)
395
+ repo.git.add(rel_path)
396
+ if repo.git.diff(["--staged", "--", rel_path]):
397
+ repo.git.commit([rel_path, "-m", "Update GitHub Actions workflow"])
@@ -102,6 +102,8 @@ def load_calkit_info(
102
102
  if os.path.isfile(fpath):
103
103
  with open(fpath) as f:
104
104
  info = ryaml.load(f)
105
+ if info is None:
106
+ info = {}
105
107
  # Check for any includes, i.e., entities with an _include key, for which
106
108
  # we should merge in another file
107
109
  default_includes_enabled = ["environments", "procedures"]
File without changes
File without changes
File without changes
File without changes