simrun 0.1.0__tar.gz → 0.2.0__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 (293) hide show
  1. {simrun-0.1.0 → simrun-0.2.0}/.bumpversion.toml +1 -1
  2. {simrun-0.1.0 → simrun-0.2.0}/.github/workflows/ci-cd.yml +21 -4
  3. {simrun-0.1.0 → simrun-0.2.0}/.gitignore +6 -1
  4. {simrun-0.1.0 → simrun-0.2.0}/CITATION.cff +1 -1
  5. {simrun-0.1.0 → simrun-0.2.0}/CLAUDE.md +5 -3
  6. {simrun-0.1.0 → simrun-0.2.0}/PKG-INFO +11 -2
  7. {simrun-0.1.0 → simrun-0.2.0}/README.md +9 -1
  8. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/argo/kustomization.yaml +3 -1
  9. simrun-0.2.0/deploy/cluster/argo/requeue.yaml +15 -0
  10. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/store.yaml +4 -0
  11. {simrun-0.1.0 → simrun-0.2.0}/docs/api/index.md +3 -0
  12. simrun-0.2.0/docs/api/local.md +3 -0
  13. simrun-0.2.0/docs/api/service.local_backend.md +3 -0
  14. simrun-0.2.0/docs/api/service.local_env.md +3 -0
  15. {simrun-0.1.0 → simrun-0.2.0}/docs/command-line.md +35 -4
  16. {simrun-0.1.0 → simrun-0.2.0}/docs/concepts.md +6 -5
  17. {simrun-0.1.0 → simrun-0.2.0}/docs/deployment.md +7 -3
  18. {simrun-0.1.0 → simrun-0.2.0}/docs/development.md +8 -0
  19. simrun-0.2.0/docs/images/editor-command.png +0 -0
  20. simrun-0.2.0/docs/images/editor.png +0 -0
  21. simrun-0.2.0/docs/images/executions-failed.png +0 -0
  22. simrun-0.2.0/docs/images/executions-outputs.png +0 -0
  23. simrun-0.2.0/docs/images/executions-running.png +0 -0
  24. {simrun-0.1.0 → simrun-0.2.0}/docs/installation.md +1 -1
  25. simrun-0.2.0/docs/local.md +61 -0
  26. {simrun-0.1.0 → simrun-0.2.0}/docs/mcp.md +1 -1
  27. {simrun-0.1.0 → simrun-0.2.0}/docs/plugins.md +1 -1
  28. {simrun-0.1.0 → simrun-0.2.0}/docs/release-notes.md +2 -0
  29. {simrun-0.1.0 → simrun-0.2.0}/docs/service.md +6 -3
  30. {simrun-0.1.0 → simrun-0.2.0}/docs/testing.md +2 -0
  31. {simrun-0.1.0 → simrun-0.2.0}/docs/web-app.md +16 -6
  32. {simrun-0.1.0 → simrun-0.2.0}/docs/workflows.md +2 -2
  33. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/openapi.json +333 -4
  34. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/schema.d.ts +274 -1
  35. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditBar.vue +10 -9
  36. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditCanvas.vue +16 -0
  37. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditInspector.test.ts +16 -2
  38. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditNode.vue +12 -7
  39. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditTaskPanel.vue +9 -6
  40. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/Inspector.test.ts +33 -2
  41. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/InspectorLogs.vue +43 -18
  42. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/InspectorOutputs.vue +1 -1
  43. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/InspectorOverview.vue +27 -4
  44. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunBar.test.ts +2 -1
  45. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunBar.vue +4 -3
  46. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/SchemaForm.test.ts +16 -0
  47. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/SchemaForm.vue +8 -2
  48. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/ServerStrip.vue +5 -5
  49. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TaskNode.vue +7 -4
  50. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/edit-graph.test.ts +26 -1
  51. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/edit-graph.ts +21 -1
  52. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/format.test.ts +10 -1
  53. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/format.ts +9 -0
  54. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/EditSessions.test.ts +17 -0
  55. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/EditSessions.vue +21 -3
  56. {simrun-0.1.0 → simrun-0.2.0}/pyproject.toml +9 -0
  57. simrun-0.2.0/release-notes/0.2.0.md +26 -0
  58. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/__init__.py +1 -1
  59. simrun-0.2.0/src/simrun/__main__.py +6 -0
  60. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/argo.py +26 -17
  61. simrun-0.2.0/src/simrun/cli.py +665 -0
  62. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/client.py +295 -12
  63. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/edit.py +1 -3
  64. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/environment.py +4 -2
  65. simrun-0.2.0/src/simrun/local.py +777 -0
  66. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/mcp.py +9 -3
  67. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/planner.py +8 -2
  68. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/plugins_builtin.py +11 -8
  69. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/podspec.py +28 -15
  70. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/app.py +321 -15
  71. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/argo_backend.py +23 -4
  72. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/backend.py +44 -4
  73. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/controller.py +266 -22
  74. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/index.py +10 -0
  75. simrun-0.2.0/src/simrun/service/local_backend.py +863 -0
  76. simrun-0.2.0/src/simrun/service/local_env.py +157 -0
  77. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/submission.py +28 -19
  78. simrun-0.2.0/src/simrun/snapshot.py +727 -0
  79. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/store.py +10 -1
  80. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/testing.py +56 -5
  81. simrun-0.2.0/src/simrun/web/assets/EditSessions-CXPjGP--.js +1 -0
  82. simrun-0.2.0/src/simrun/web/assets/EditorView-CSEPd5zO.css +1 -0
  83. simrun-0.2.0/src/simrun/web/assets/EditorView-PGWyjvIn.js +6 -0
  84. simrun-0.2.0/src/simrun/web/assets/ExecutionsView-CBvSXfM4.js +3 -0
  85. simrun-0.2.0/src/simrun/web/assets/ExecutionsView-CGILwumK.css +1 -0
  86. simrun-0.2.0/src/simrun/web/assets/index-D5N3WTgj.js +3 -0
  87. simrun-0.2.0/src/simrun/web/assets/index-y_ImNT_d.css +2 -0
  88. simrun-0.2.0/src/simrun/web/assets/live-B_WlS5vn.js +2 -0
  89. simrun-0.2.0/src/simrun/web/assets/style-JTLlRkS0.js +39 -0
  90. simrun-0.2.0/src/simrun/web/assets/style-_6XKS09t.css +1 -0
  91. simrun-0.2.0/src/simrun/web/favicon.svg +1 -0
  92. simrun-0.2.0/src/simrun/web/index.html +14 -0
  93. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/worker.py +227 -23
  94. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/test_cluster.py +6 -2
  95. {simrun-0.1.0 → simrun-0.2.0}/tests/conftest.py +16 -3
  96. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_api.py +540 -3
  97. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_argo_backend.py +20 -5
  98. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_controller.py +221 -12
  99. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_editor_api.py +1 -1
  100. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_index.py +10 -0
  101. simrun-0.2.0/tests/service/test_local_backend.py +704 -0
  102. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_web_api.py +13 -0
  103. {simrun-0.1.0 → simrun-0.2.0}/tests/test_argo.py +64 -1
  104. {simrun-0.1.0 → simrun-0.2.0}/tests/test_cli.py +88 -0
  105. simrun-0.2.0/tests/test_cli_local.py +250 -0
  106. {simrun-0.1.0 → simrun-0.2.0}/tests/test_client.py +133 -1
  107. {simrun-0.1.0 → simrun-0.2.0}/tests/test_exec.py +59 -2
  108. simrun-0.2.0/tests/test_local.py +508 -0
  109. {simrun-0.1.0 → simrun-0.2.0}/tests/test_snapshot.py +205 -2
  110. {simrun-0.1.0 → simrun-0.2.0}/tests/test_worker.py +189 -0
  111. {simrun-0.1.0 → simrun-0.2.0}/uv.lock +2 -0
  112. {simrun-0.1.0 → simrun-0.2.0}/zensical.toml +4 -0
  113. simrun-0.1.0/src/simrun/cli.py +0 -350
  114. simrun-0.1.0/src/simrun/snapshot.py +0 -196
  115. {simrun-0.1.0 → simrun-0.2.0}/.github/CODEOWNERS +0 -0
  116. {simrun-0.1.0 → simrun-0.2.0}/.github/actions/setup/action.yml +0 -0
  117. {simrun-0.1.0 → simrun-0.2.0}/.github/dependabot.yml +0 -0
  118. {simrun-0.1.0 → simrun-0.2.0}/.github/pull_request_template.md +0 -0
  119. {simrun-0.1.0 → simrun-0.2.0}/.github/rulesets/apply.sh +0 -0
  120. {simrun-0.1.0 → simrun-0.2.0}/.github/rulesets/develop.json +0 -0
  121. {simrun-0.1.0 → simrun-0.2.0}/.github/rulesets/main.json +0 -0
  122. {simrun-0.1.0 → simrun-0.2.0}/.github/rulesets/tags.json +0 -0
  123. {simrun-0.1.0 → simrun-0.2.0}/.github/workflows/cluster.yml +0 -0
  124. {simrun-0.1.0 → simrun-0.2.0}/.github/workflows/docs.yml +0 -0
  125. {simrun-0.1.0 → simrun-0.2.0}/.github/workflows/lint.yml +0 -0
  126. {simrun-0.1.0 → simrun-0.2.0}/.pre-commit-config.yaml +0 -0
  127. {simrun-0.1.0 → simrun-0.2.0}/.python-version +0 -0
  128. {simrun-0.1.0 → simrun-0.2.0}/.ruff.toml +0 -0
  129. {simrun-0.1.0 → simrun-0.2.0}/.zenodo.json +0 -0
  130. {simrun-0.1.0 → simrun-0.2.0}/LICENSE +0 -0
  131. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/argo/controller-config.yaml +0 -0
  132. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/argo/namespace-install.yaml +0 -0
  133. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/argo/workflow-rbac.yaml +0 -0
  134. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/buildkit.yaml +0 -0
  135. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/kueue/config.yaml +0 -0
  136. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/kueue/kustomization.yaml +0 -0
  137. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/kueue/manifests.yaml +0 -0
  138. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/kueue/queues.yaml +0 -0
  139. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/kustomization.yaml +0 -0
  140. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/namespace.yaml +0 -0
  141. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/off-workers.yaml +0 -0
  142. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/priority-classes.yaml +0 -0
  143. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/simrun.yaml +0 -0
  144. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/store-settings.yaml +0 -0
  145. {simrun-0.1.0 → simrun-0.2.0}/deploy/cluster/zot.yaml +0 -0
  146. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/buildkit.yaml +0 -0
  147. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/kustomization.yaml +0 -0
  148. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/on-server.yaml +0 -0
  149. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/quotas.yaml +0 -0
  150. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/store-claim.yaml +0 -0
  151. {simrun-0.1.0 → simrun-0.2.0}/deploy/k3d/store.yaml +0 -0
  152. {simrun-0.1.0 → simrun-0.2.0}/deploy/service/Dockerfile +0 -0
  153. {simrun-0.1.0 → simrun-0.2.0}/docs/api/argo.md +0 -0
  154. {simrun-0.1.0 → simrun-0.2.0}/docs/api/cgroup.md +0 -0
  155. {simrun-0.1.0 → simrun-0.2.0}/docs/api/cli.md +0 -0
  156. {simrun-0.1.0 → simrun-0.2.0}/docs/api/client.md +0 -0
  157. {simrun-0.1.0 → simrun-0.2.0}/docs/api/config.md +0 -0
  158. {simrun-0.1.0 → simrun-0.2.0}/docs/api/cwl.md +0 -0
  159. {simrun-0.1.0 → simrun-0.2.0}/docs/api/demo.md +0 -0
  160. {simrun-0.1.0 → simrun-0.2.0}/docs/api/environment.md +0 -0
  161. {simrun-0.1.0 → simrun-0.2.0}/docs/api/ledger.md +0 -0
  162. {simrun-0.1.0 → simrun-0.2.0}/docs/api/mcp.md +0 -0
  163. {simrun-0.1.0 → simrun-0.2.0}/docs/api/planner.md +0 -0
  164. {simrun-0.1.0 → simrun-0.2.0}/docs/api/plugins.md +0 -0
  165. {simrun-0.1.0 → simrun-0.2.0}/docs/api/plugins_builtin.md +0 -0
  166. {simrun-0.1.0 → simrun-0.2.0}/docs/api/podspec.md +0 -0
  167. {simrun-0.1.0 → simrun-0.2.0}/docs/api/resources.md +0 -0
  168. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.app.md +0 -0
  169. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.argo_backend.md +0 -0
  170. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.auth.md +0 -0
  171. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.backend.md +0 -0
  172. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.compare.md +0 -0
  173. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.controller.md +0 -0
  174. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.index.md +0 -0
  175. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.logs.md +0 -0
  176. {simrun-0.1.0 → simrun-0.2.0}/docs/api/service.submission.md +0 -0
  177. {simrun-0.1.0 → simrun-0.2.0}/docs/api/snapshot.md +0 -0
  178. {simrun-0.1.0 → simrun-0.2.0}/docs/api/store.md +0 -0
  179. {simrun-0.1.0 → simrun-0.2.0}/docs/api/testing.md +0 -0
  180. {simrun-0.1.0 → simrun-0.2.0}/docs/api/worker.md +0 -0
  181. {simrun-0.1.0 → simrun-0.2.0}/docs/api/workflow.md +0 -0
  182. {simrun-0.1.0 → simrun-0.2.0}/docs/index.md +0 -0
  183. {simrun-0.1.0 → simrun-0.2.0}/docs/robots.txt +0 -0
  184. {simrun-0.1.0 → simrun-0.2.0}/examples/squares.yaml +0 -0
  185. {simrun-0.1.0 → simrun-0.2.0}/frontend/README.md +0 -0
  186. {simrun-0.1.0 → simrun-0.2.0}/frontend/index.html +0 -0
  187. {simrun-0.1.0 → simrun-0.2.0}/frontend/mockup/workflow-icons.js +0 -0
  188. {simrun-0.1.0 → simrun-0.2.0}/frontend/mockup/workflow-studio.html +0 -0
  189. {simrun-0.1.0 → simrun-0.2.0}/frontend/package-lock.json +0 -0
  190. {simrun-0.1.0 → simrun-0.2.0}/frontend/package.json +0 -0
  191. {simrun-0.1.0 → simrun-0.2.0}/frontend/public/favicon.svg +0 -0
  192. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/App.vue +0 -0
  193. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/client.test.ts +0 -0
  194. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/client.ts +0 -0
  195. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/http.ts +0 -0
  196. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/sse.test.ts +0 -0
  197. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/api/sse.ts +0 -0
  198. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/auth.ts +0 -0
  199. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/AppIcon.vue +0 -0
  200. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditBar.test.ts +0 -0
  201. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditCanvas.fit.test.ts +0 -0
  202. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditCanvas.test.ts +0 -0
  203. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditInspector.vue +0 -0
  204. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/EditWorkflowPanel.vue +0 -0
  205. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/Inspector.vue +0 -0
  206. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/InspectorRun.vue +0 -0
  207. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/LogoMark.vue +0 -0
  208. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunCanvas.vue +0 -0
  209. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunCard.vue +0 -0
  210. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunList.test.ts +0 -0
  211. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/RunList.vue +0 -0
  212. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/ServerStrip.test.ts +0 -0
  213. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/StatusPill.vue +0 -0
  214. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TaskNode.test.ts +0 -0
  215. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TaskPalette.test.ts +0 -0
  216. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TaskPalette.vue +0 -0
  217. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TopBar.test.ts +0 -0
  218. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/components/TopBar.vue +0 -0
  219. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/filters.test.ts +0 -0
  220. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/filters.ts +0 -0
  221. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/graph.test.ts +0 -0
  222. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/graph.ts +0 -0
  223. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/icons.ts +0 -0
  224. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/inspect.test.ts +0 -0
  225. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/inspect.ts +0 -0
  226. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/kinds.ts +0 -0
  227. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/progress.test.ts +0 -0
  228. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/progress.ts +0 -0
  229. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/schema-form.test.ts +0 -0
  230. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/schema-form.ts +0 -0
  231. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/status.ts +0 -0
  232. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/lib/workers.ts +0 -0
  233. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/main.ts +0 -0
  234. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/router.test.ts +0 -0
  235. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/router.ts +0 -0
  236. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/edit.test.ts +0 -0
  237. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/edit.ts +0 -0
  238. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/live.test.ts +0 -0
  239. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/live.ts +0 -0
  240. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/run.test.ts +0 -0
  241. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/stores/run.ts +0 -0
  242. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/style.css +0 -0
  243. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/test/fixtures.ts +0 -0
  244. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/EditorView.test.ts +0 -0
  245. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/EditorView.vue +0 -0
  246. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/ExecutionsView.vue +0 -0
  247. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/LoginView.test.ts +0 -0
  248. {simrun-0.1.0 → simrun-0.2.0}/frontend/src/views/LoginView.vue +0 -0
  249. {simrun-0.1.0 → simrun-0.2.0}/frontend/tsconfig.json +0 -0
  250. {simrun-0.1.0 → simrun-0.2.0}/frontend/tsconfig.node.json +0 -0
  251. {simrun-0.1.0 → simrun-0.2.0}/frontend/vite.config.ts +0 -0
  252. {simrun-0.1.0 → simrun-0.2.0}/release-notes/0.1.0.md +0 -0
  253. {simrun-0.1.0 → simrun-0.2.0}/scripts/llms_txt.py +0 -0
  254. {simrun-0.1.0 → simrun-0.2.0}/scripts/openapi.py +0 -0
  255. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/build_constraints.txt +0 -0
  256. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/cgroup.py +0 -0
  257. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/config.py +0 -0
  258. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/cwl.py +0 -0
  259. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/demo.py +0 -0
  260. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/ledger.py +0 -0
  261. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/plugins.py +0 -0
  262. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/resources.py +0 -0
  263. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/__init__.py +0 -0
  264. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/auth.py +0 -0
  265. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/compare.py +0 -0
  266. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/edits.py +0 -0
  267. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/service/logs.py +0 -0
  268. {simrun-0.1.0 → simrun-0.2.0}/src/simrun/workflow.py +0 -0
  269. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/Dockerfile +0 -0
  270. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/conftest.py +0 -0
  271. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/k3d_cluster.py +0 -0
  272. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/local.py +0 -0
  273. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/test_capacity.py +0 -0
  274. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/test_service_image.py +0 -0
  275. {simrun-0.1.0 → simrun-0.2.0}/tests/cluster/test_sources.py +0 -0
  276. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_compare.py +0 -0
  277. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_edits.py +0 -0
  278. {simrun-0.1.0 → simrun-0.2.0}/tests/service/test_events.py +0 -0
  279. {simrun-0.1.0 → simrun-0.2.0}/tests/test_cgroup.py +0 -0
  280. {simrun-0.1.0 → simrun-0.2.0}/tests/test_config.py +0 -0
  281. {simrun-0.1.0 → simrun-0.2.0}/tests/test_cwl.py +0 -0
  282. {simrun-0.1.0 → simrun-0.2.0}/tests/test_deploy.py +0 -0
  283. {simrun-0.1.0 → simrun-0.2.0}/tests/test_edit.py +0 -0
  284. {simrun-0.1.0 → simrun-0.2.0}/tests/test_environment.py +0 -0
  285. {simrun-0.1.0 → simrun-0.2.0}/tests/test_ledger.py +0 -0
  286. {simrun-0.1.0 → simrun-0.2.0}/tests/test_mcp.py +0 -0
  287. {simrun-0.1.0 → simrun-0.2.0}/tests/test_planner.py +0 -0
  288. {simrun-0.1.0 → simrun-0.2.0}/tests/test_plugins.py +0 -0
  289. {simrun-0.1.0 → simrun-0.2.0}/tests/test_ports.py +0 -0
  290. {simrun-0.1.0 → simrun-0.2.0}/tests/test_resources.py +0 -0
  291. {simrun-0.1.0 → simrun-0.2.0}/tests/test_store.py +0 -0
  292. {simrun-0.1.0 → simrun-0.2.0}/tests/test_workflow.py +0 -0
  293. {simrun-0.1.0 → simrun-0.2.0}/tox.ini +0 -0
@@ -1,5 +1,5 @@
1
1
  [tool.bumpversion]
2
- current_version = "0.1.0"
2
+ current_version = "0.2.0"
3
3
  commit = true
4
4
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
5
5
  serialize = ["{major}.{minor}.{patch}"]
@@ -239,9 +239,25 @@ jobs:
239
239
  echo "::error::the tag $GITHUB_REF_NAME is not the version $version of src/simrun/__init__.py"
240
240
  exit 1
241
241
  fi
242
+ - name: Set up node
243
+ uses: actions/setup-node@v7
244
+ with:
245
+ node-version: 24
246
+ cache: npm
247
+ cache-dependency-path: frontend/package-lock.json
248
+ - name: Build the web app into the package
249
+ # src/simrun/web is gitignored and an artifact of the build (pyproject.toml),
250
+ # so an installation from PyPI serves the web app of `simrun serve --local`
251
+ run: |
252
+ (cd frontend && npm ci && npm run build)
253
+ rm -rf src/simrun/web
254
+ cp -r frontend/dist src/simrun/web
242
255
  - name: Build package
243
- # the sdist and the wheel
244
- run: uvx hatch build
256
+ # the sdist and the wheel, both with the web app
257
+ run: |
258
+ uvx hatch build
259
+ unzip -l dist/*.whl | grep 'simrun/web/index.html' > /dev/null
260
+ tar tzf dist/*.tar.gz | grep 'src/simrun/web/index.html' > /dev/null
245
261
  - name: Check the package
246
262
  run: uvx twine check --strict dist/*
247
263
  - name: Publish to PyPI
@@ -273,5 +289,6 @@ jobs:
273
289
  # a shallow clone cannot be pushed to another branch
274
290
  fetch-depth: 0
275
291
  - name: Fast-forward main to the release
276
- # no --force: the push fails loudly if it would not be a fast-forward
277
- run: git push origin HEAD:main
292
+ # no --force: the push fails loudly if it would not be a fast-forward; the full
293
+ # ref name creates main at the first release, where `HEAD:main` is refused
294
+ run: git push origin HEAD:refs/heads/main
@@ -35,6 +35,11 @@ docs/superpowers/
35
35
  *~
36
36
  .DS_Store
37
37
 
38
- # the dependencies and the build of the web app
38
+ # the dependencies and the build of the web app, and its copy in the package of a
39
+ # release
39
40
  frontend/node_modules/
40
41
  frontend/dist/
42
+ src/simrun/web/
43
+
44
+ # the local service of a project (`simrun serve --local`), in this checkout
45
+ .simrun/
@@ -8,7 +8,7 @@ authors:
8
8
  given-names: "Matthias"
9
9
  orcid: "https://orcid.org/0000-0003-1725-179X"
10
10
  affiliation: "Humboldt-University Berlin, Faculty of Life Science, Institute for Biology, Biology, Berlin; University Lübeck; University Hospital Schleswig-Holstein, Campus Lübeck, First Department of Medicine, Germany"
11
- version: "0.1.0"
11
+ version: "0.2.0"
12
12
  license: MIT
13
13
  repository-code: "https://github.com/matthiaskoenig/simrun"
14
14
  url: "https://matthiaskoenig.github.io/simrun"
@@ -20,6 +20,7 @@ pytest -n 0 # in one process, e.g. for --
20
20
  SIMRUN_K3D=1 uv run pytest -m cluster tests/cluster # the tests on a k3d cluster (docker, ~20 GiB disk)
21
21
  SIMRUN_K3D=1 SIMRUN_K3D_KEEP=1 uv run pytest -m cluster tests/cluster # keep the cluster for the next session
22
22
  uv run python tests/cluster/local.py up # the k3d cluster as a local test system, service on the host (docs/testing.md); `down` deletes it
23
+ uv run simrun submit examples/squares.yaml --local # on this machine without a cluster, state in .simrun/ (docs/local.md)
23
24
  uv run simrun edit /tmp/squares.yaml # a copy of examples/squares.yaml in the Editor of the local test system (docs/web-app.md)
24
25
  tox r -e py3.15 # single tox env (py3.14, py3.15)
25
26
  tox run-parallel # every supported python, before opening a pull request
@@ -48,13 +49,14 @@ uv run python scripts/openapi.py && (cd frontend && npm run types) # after a c
48
49
 
49
50
  - **`workflow.py`** the model of a workflow (`Workflow`, `TaskSpec`, `SplitMode` `fastest`/`single-server`, `Priority` `owner`/`standard`/`agent`, `ResourceOverride`), inputs `<task>.<port>`, order by inputs, cycles refused.
50
51
  - **`plugins.py`** `TaskType` (settings model, ports, `ResourceHint`, `count_units`/`setup`/`compute_unit`/`merge`/`plan` as `"module:function"` strings, `command` (an argv template with `{settings}`, `{out}` and `{input}`, a part repeated per input port as `<port>=<path>`, the scratch copy of a staged port), `uses_cores`, `image`, `cost_setting`), `TaskPaths`, discovery from the entry points; `plugins_builtin.py` the type `command`; `demo.py` the split demo `demo.squares`.
51
- - **`client.py`, `cli.py`, `mcp.py`** the client (`Client.from_env`: `SIMRUN_URL`, `SIMRUN_TOKEN`, `SIMRUN_STORE`; plans the tasks of the types installed locally which have a `plan` for `submit`, `estimate` and `validate`, `plan_tasks`, sending the fields given or set by the plan, snapshots the sources, then calls the API), the typer CLI on it (every command but `edit` `--json`, a refusal to stderr with exit 1, `wait` exits 2 on timeout) and the FastMCP server on it (answers carry `store`, a refusal is `{"error", "status"}`).
52
+ - **`client.py`, `cli.py`, `mcp.py`** the client (`Client.from_env`: `SIMRUN_URL`, `SIMRUN_TOKEN`, `SIMRUN_STORE` optional, without it the snapshots are uploaded; plans the tasks of the types installed locally which have a `plan` for `submit`, `estimate` and `validate`, `plan_tasks`, sending the fields given or set by the plan, snapshots the sources, then calls the API), the typer CLI on it (every command but `edit` `--json`, a refusal to stderr with exit 1, `wait` exits 2 on timeout) and the FastMCP server on it (answers carry `store`, a refusal is `{"error", "status"}`).
53
+ - **`local.py`** the local service of a project (`simrun serve --local`): `.simrun/` with the store, the index and a generated token, `service.json` (instance, pid, port, token, url; the token is sent only to a server answering the instance at `/local/instance`) while it listens on `127.0.0.1`, `ensure_local` which starts it in the background (`python -m simrun`, `__main__.py`) under a lock and finds it again, the idle exit, `environment` in `service.json` (a service in the background with another python, simrun or task types is restarted when idle), `stop_local` (`serve --local --stop`, `/local/stop`), its end cancels the runs of the `LocalBackend`; `web_dir` the built web app, `simrun/web` of the wheel (copied by the release) or `frontend/dist` of a checkout.
52
54
  - **`edit.py`** the command `simrun edit`: opens an edit session, long-polls its requests, writes a save into the workflow file atomically after the hash check of a conflict, runs with fresh snapshots through `Client.submit`, sends the file and the git state of the trees every `EDIT_WATCH_S` when they changed, closes the session on Ctrl-C.
53
- - **`snapshot.py`** the copy of the files git knows of a working tree into `snapshots/<name>/` of the store, hard links to the last snapshot, read-only, named by content, with provenance; **`environment.py`** the lock of a run (`uv lock` in a writable shadow tree against the snapshots) with the build backends at the pins of `build_constraints.txt`, the Dockerfile of the image, named by the hash of the lock, the python and the simrun version.
55
+ - **`snapshot.py`** the copy of the files git knows of a working tree into `snapshots/<name>/` of the store (`scan`, then `assemble`; `upload` for the routes `/snapshots/{name}`), hard links to the last snapshot by the hashes of its manifest `<dir>.files.json`, read-only, named by content, with provenance; **`environment.py`** the lock of a run (`uv lock` in a writable shadow tree against the snapshots) with the build backends at the pins of `build_constraints.txt`, the Dockerfile of the image, named by the hash of the lock, the python and the simrun version.
54
56
  - **`planner.py`** the pod shape (processes the cores and memory of the most common node allow, the retry shape with `RETRY_FACTOR`) and the number of pods (`fastest`: min of `MAX_PIECES` 8, units, slots), the six priority classes (`PRIORITY_VALUES`); **`resources.py`** learned resources in SQLite (95th percentile of the last 20 observations times 1.1, floor after a kill for memory), keyed by type, model and `cost_setting`.
55
57
  - **`ledger.py`** the unit ledger (`pending/`, `claimed/<i>@<worker>`, `done/`, heartbeats), one `os.rename` per transition (NFS >= 4.1); **`worker.py`** the harness: `simrun-worker` (coordinator `SIMRUN_ROLE=base` waits for the whole ledger and releases stale claims, extra workers exit when nothing is pending, a pool of processes, memory sampling of the cgroup, reports), `simrun-merge`, `simrun-exec` (exit codes 0, 3, 4, 137, 143); **`cgroup.py`** the limits and usage of the cgroup v2.
56
58
  - **`store.py`** the run record (`RunRecord`, `RunState`, `TaskState`) and the layout `runs/<id>/` (`run.json`, `tasks/<task>/{settings.json,provenance.json,out/,units/,workers/,logs/,progress.jsonl}`); **`config.py`** `ClusterConfig`; **`podspec.py`** what every backend shares (image, shapes, command, environment `SIMRUN_*`, `SIMRUN_PROVENANCE` the `provenance.json` of the task); **`argo.py`** the Argo workflow of a run (Hera: `<task>-w0`, `<task>-extra`, `<task>-merge`, retry strategy and `podSpecPatch` for the retry memory, Kueue labels); **`cwl.py`** the same run as CWL; **`testing.py`** `FakeBackend`, the backend in memory of the tests.
57
- - **`service/`** `app.py` the FastAPI app (`ServiceSettings` from `SIMRUN_CONFIG`, `uvicorn --factory simrun.service.app:serve`, every route needs a bearer token), `auth.py` identities and priorities, `backend.py` the backend protocol, `argo_backend.py` Argo, Kueue, node capacity, reservations (taint and label `simrun/reserved`) and BuildKit jobs, `submission.py` the background submission (environment, image, workflow), `controller.py` the stateless reconciliation (task states, OOM evidence, observations, logs, release, cancel), `index.py` the SQLite index of the runs rebuilt from the store, `logs.py` the kept logs, `compare.py` the comparison of runs, `edits.py` the edit sessions of the Editor (`EditSession`, the requests of the browser and the results of the command in `edits/<id>/` of the store, connected while polled within `EDIT_CONNECTED_S`); the read models of the web app (`/me`, `/servers`, the workers of a task, `/task-types`, `/workflows/yaml`), the routes of the edit sessions (`/edits`, a save or run waits up to `EDIT_WAIT_S` for the command) and the event streams (`/events`, `/runs/{id}/events`), and the built app at `/ui/` from the setting `web`.
59
+ - **`service/`** `app.py` the FastAPI app (`ServiceSettings` from `SIMRUN_CONFIG`, `uvicorn --factory simrun.service.app:serve`, every route needs a bearer token), `auth.py` identities and priorities, `backend.py` the backend protocol, `argo_backend.py` Argo, Kueue, node capacity, reservations (taint and label `simrun/reserved`) and BuildKit jobs, `local_backend.py` the `LocalBackend` (the tasks of a run as processes, cores shared across runs, `--docker` for `command` tasks, retries of a stop, `SIMRUN_CORES`, `SIMRUN_MEMORY_LIMIT_GB` and `SIMRUN_MEMORY_SOURCE=process`, the coordinator of a split task merges, so no merge pod and one pod per split task (`extra_workers`), pid files beside the logs and `kill_orphans`), `local_env.py` the venv of a local run with snapshots in `.simrun/envs/<run>`, `submission.py` the background submission (environment, image, workflow), `controller.py` the stateless reconciliation (task states, OOM evidence, observations, logs, release, cancel), `index.py` the SQLite index of the runs rebuilt from the store, `logs.py` the kept logs, `compare.py` the comparison of runs, `edits.py` the edit sessions of the Editor (`EditSession`, the requests of the browser and the results of the command in `edits/<id>/` of the store, connected while polled within `EDIT_CONNECTED_S`); the read models of the web app (`/me`, `/servers`, the workers of a task, `/task-types`, `/workflows/yaml`), the routes of the edit sessions (`/edits`, a save or run waits up to `EDIT_WAIT_S` for the command) and the event streams (`/events`, `/runs/{id}/events`), and the built app at `/ui/` from the setting `web`.
58
60
  - **`frontend/`** the web app (Vite, Vue 3, TypeScript, Vue Flow, Tailwind v4), served at `/ui/` with hash routing, talking only to the API with the token of the login: `src/api/` the client, the event streams read with `fetch` and the types generated from `openapi.json`, `src/views/` the login, the Executions (runs, run bar, canvas, servers strip, inspector) and the Editor (sessions, palette, canvas, inspector with the settings form of the JSON Schema, bar; the draft in `src/stores/edit.ts`), `mockup/` the approved mockup; the service image has the build at `/opt/simrun/web` (`docs/web-app.md`).
59
61
  - **`deploy/`** `cluster/` the kustomization of the cluster (Kueue v0.20.5 and Argo v4.1.6 release manifests committed unchanged, priorities, queue, NFS store, Zot, BuildKit, service), `k3d/` the overlay of the tests, `service/Dockerfile` the service image (with the built web app). **`tests/cluster/`** the k3d tests (`k3d_cluster.py` creates the cluster, `.tools/` holds k3d, kubectl, the kubeconfig and the store).
60
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simrun
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Runner of simulation workflows on a k3s cluster with Argo Workflows and Kueue.
5
5
  Project-URL: Homepage, https://matthiaskoenig.github.io/simrun
6
6
  Project-URL: Documentation, https://matthiaskoenig.github.io/simrun
@@ -32,6 +32,7 @@ Requires-Dist: hera>=7.2
32
32
  Requires-Dist: httpx>=0.28.1
33
33
  Requires-Dist: kubernetes>=37
34
34
  Requires-Dist: pydantic>=2.14
35
+ Requires-Dist: python-multipart>=0.0.33
35
36
  Requires-Dist: pyyaml>=6.0.3
36
37
  Requires-Dist: rich>=14
37
38
  Requires-Dist: tomlkit>=0.15.2
@@ -80,7 +81,15 @@ simrun wait <run>
80
81
  simrun compare <run> <run>
81
82
  ```
82
83
 
83
- The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
84
+ Without a cluster the same workflow runs on this machine, with the web app, see [local mode](https://matthiaskoenig.github.io/simrun/local/):
85
+
86
+ ```bash
87
+ pip install simrun
88
+ simrun submit fit.yaml --source model=. --local
89
+ simrun outputs <run> <task> --to results
90
+ ```
91
+
92
+ The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [local mode](https://matthiaskoenig.github.io/simrun/local/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
84
93
 
85
94
  If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/simrun/issues).
86
95
 
@@ -23,7 +23,15 @@ simrun wait <run>
23
23
  simrun compare <run> <run>
24
24
  ```
25
25
 
26
- The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
26
+ Without a cluster the same workflow runs on this machine, with the web app, see [local mode](https://matthiaskoenig.github.io/simrun/local/):
27
+
28
+ ```bash
29
+ pip install simrun
30
+ simrun submit fit.yaml --source model=. --local
31
+ simrun outputs <run> <task> --to results
32
+ ```
33
+
34
+ The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [local mode](https://matthiaskoenig.github.io/simrun/local/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
27
35
 
28
36
  If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/simrun/issues).
29
37
 
@@ -1,7 +1,8 @@
1
1
  # Argo Workflows v4.1.6, the namespaced install (`namespace-install.yaml`, the release
2
2
  # manifest, unchanged) in the namespace `simrun`, without an archive; the executor
3
3
  # containers request what they limit, since Kueue counts every container of a pod;
4
- # the service account of the workflows (`ClusterConfig.service_account`).
4
+ # the service account of the workflows (`ClusterConfig.service_account`); the requeue
5
+ # time of the controller (`requeue.yaml`).
5
6
  apiVersion: kustomize.config.k8s.io/v1beta1
6
7
  kind: Kustomization
7
8
  namespace: simrun
@@ -10,3 +11,4 @@ resources:
10
11
  - workflow-rbac.yaml
11
12
  patches:
12
13
  - path: controller-config.yaml
14
+ - path: requeue.yaml
@@ -0,0 +1,15 @@
1
+ # the controller looks at a workflow again 2 s after a change of its pods instead of
2
+ # 10 s (`DEFAULT_REQUEUE_TIME`, docs/environment-variables.md of Argo), so a run and
3
+ # its tasks show running soon after their pods started
4
+ apiVersion: apps/v1
5
+ kind: Deployment
6
+ metadata:
7
+ name: workflow-controller
8
+ spec:
9
+ template:
10
+ spec:
11
+ containers:
12
+ - name: workflow-controller
13
+ env:
14
+ - name: DEFAULT_REQUEUE_TIME
15
+ value: 2s
@@ -14,6 +14,10 @@ reclaimPolicy: Retain
14
14
  volumeBindingMode: Immediate
15
15
  mountOptions:
16
16
  - nfsvers=4.2
17
+ # negative lookups are not cached, so a file a pod wrote (e.g. the marker of a
18
+ # merge) is seen at once by the service and the other pods; a PersistentVolume
19
+ # provisioned before keeps the options it was created with
20
+ - lookupcache=positive
17
21
  ---
18
22
  apiVersion: v1
19
23
  kind: PersistentVolumeClaim
@@ -14,6 +14,7 @@ The workflows, the plugins, the clients, the planning and the harness of the pod
14
14
  | [demo](demo.md) | the demo plugin: sums of squares, split into one unit per number |
15
15
  | [client](client.md) | the client of the service: snapshots working trees, then calls the API |
16
16
  | [cli](cli.md) | the command line of simrun: submit, follow and compare runs |
17
+ | [local](local.md) | the local service of a project in `.simrun/`, started on demand |
17
18
  | [mcp](mcp.md) | the MCP server of simrun, a local stdio process of an agent |
18
19
  | [planner](planner.md) | the planner: the shape of a worker pod and the number of pieces of a task |
19
20
  | [resources](resources.md) | resources learned from the reports of workers |
@@ -39,6 +40,8 @@ The service: the API, the controller and the backends, see [Service](../service.
39
40
  | [service.auth](service.auth.md) | identities of the callers of the service and the priorities of their runs |
40
41
  | [service.backend](service.backend.md) | the backend the service runs workflows on: Argo Workflows, or a fake in tests |
41
42
  | [service.argo_backend](service.argo_backend.md) | the backend of the service on a cluster: Argo Workflows, Kueue and BuildKit |
43
+ | [service.local_backend](service.local_backend.md) | the backend of the local mode: the tasks of a run as processes on this machine |
44
+ | [service.local_env](service.local_env.md) | the venv of a local run with snapshots, never the environment of the service |
42
45
  | [service.controller](service.controller.md) | the controller: follows the workflows of the runs and records their end |
43
46
  | [service.submission](service.submission.md) | the submission of a run in the background: its environment, image and workflow |
44
47
  | [service.index](service.index.md) | the index of the runs in SQLite, beside the run store |
@@ -0,0 +1,3 @@
1
+ # local
2
+
3
+ ::: simrun.local
@@ -0,0 +1,3 @@
1
+ # local_backend
2
+
3
+ ::: simrun.service.local_backend
@@ -0,0 +1,3 @@
1
+ # local_env
2
+
3
+ ::: simrun.service.local_env
@@ -1,12 +1,12 @@
1
1
  # Command line
2
2
 
3
- `simrun` is the command line of people and scripts: it submits, follows, compares, cancels and cleans up runs, and `simrun edit` opens a workflow file in the [Editor](web-app.md#the-editor) of the web app. It runs on the machine of the working trees, e.g. the development server, which mounts the run store, and reads three environment variables, which the [MCP server](mcp.md) reads alike:
3
+ `simrun` is the command line of people and scripts: it submits, follows, compares, cancels and cleans up runs, and `simrun edit` opens a workflow file in the [Editor](web-app.md#the-editor) of the web app. On a cluster it runs on the machine of the working trees and reads three environment variables, which the [MCP server](mcp.md) reads alike:
4
4
 
5
5
  | variable | meaning |
6
6
  | --- | --- |
7
7
  | `SIMRUN_URL` | the address of the service, e.g. `http://simrun.cluster.internal` |
8
8
  | `SIMRUN_TOKEN` | a token of the tokens file of the service, which names the person or the agent |
9
- | `SIMRUN_STORE` | the run store as it is mounted on this machine, e.g. `/mnt/cluster` |
9
+ | `SIMRUN_STORE` | optional: the run store as it is mounted on this machine, e.g. `/mnt/cluster`, where the client writes the snapshots itself; without it the client uploads them to the service |
10
10
 
11
11
  ```bash
12
12
  export SIMRUN_URL=http://simrun.cluster.internal
@@ -16,21 +16,25 @@ export SIMRUN_STORE=/mnt/cluster
16
16
 
17
17
  Every command takes `--json` (except `logs`, which prints the logs as text, and `edit`, which runs until it is stopped) and prints machine-readable JSON instead of tables. A refusal of the service is printed to stderr with exit code 1.
18
18
 
19
+ With `--local` on a command, no variable is needed: it talks to the local service of the current directory, see [Local mode](local.md).
20
+
19
21
  ## Commands
20
22
 
21
23
  | command | what it does |
22
24
  | --- | --- |
23
- | `simrun submit WORKFLOW` | snapshot the sources and submit a workflow; prints the run in the state `submitting` |
25
+ | `simrun submit WORKFLOW` | snapshot the sources and submit a workflow; prints the run in the state `submitting`, or with `--wait` follows it to its end |
24
26
  | `simrun wait RUN` | wait for a run to end; exit 0 if it succeeded, 1 if it failed or was cancelled, 2 on timeout |
25
27
  | `simrun status RUN` | the state of a run and its tasks with their progress |
26
28
  | `simrun list` | the runs, filtered by group, agent, state and owner |
27
29
  | `simrun logs RUN TASK` | the logs of the pods of a task |
30
+ | `simrun outputs RUN TASK` | list the output files of a task, or download them with `--to DIR` |
28
31
  | `simrun edit WORKFLOW` | serve the Editor of the web app for a workflow file: saves go into the file, runs use the working trees |
29
32
  | `simrun estimate WORKFLOW` | the plan and the expected duration of every task of a submission |
30
33
  | `simrun compare RUN RUN...` | the provenance and the summaries of the tasks of runs side by side |
31
34
  | `simrun cancel RUN` | cancel a run |
32
35
  | `simrun cleanup` | remove ended runs and the snapshots nothing refers to |
33
36
  | `simrun usage` | the bytes of the store per group and run |
37
+ | `simrun serve` | run the service in the foreground: `--local` the local service of the current directory, else the service of `SIMRUN_CONFIG` |
34
38
 
35
39
  ### submit
36
40
 
@@ -44,8 +48,13 @@ simrun submit fit.yaml --source model=~/git/pkdb_models --source sbmlsim=~/git/s
44
48
  | `--group GROUP` | the group of the run, e.g. a study |
45
49
  | `--single-server` | place the pieces of every task on one server |
46
50
  | `--reserve NODE` | reserve a node for the run |
51
+ | `--local` | use the local service of the current directory, see [Local mode](local.md) |
52
+ | `--docker` | with `--local`: run a `command` task in its image with docker instead of directly |
53
+ | `--snapshot` | with `--local`: copy and install the sources as on the cluster instead of recording their provenance only |
54
+ | `--wait` / `--no-wait` | follow the run to its end (a live line per task on a terminal, plain lines otherwise) and exit like `wait`; the default with `--local`, else `--no-wait` |
55
+ | `--timeout SECONDS` | with `--wait`: give up after this long, exit 2; refused without waiting |
47
56
 
48
- The client copies every working tree with its uncommitted changes into `snapshots/<name>/` of the store and sends its provenance, see [Snapshots and environments](concepts.md#snapshots-and-environments).
57
+ The client copies every working tree with its uncommitted changes into `snapshots/<name>/` of the store, or without `SIMRUN_STORE` uploads the files the store lacks to the service which writes the snapshot, and sends its provenance, see [Snapshots and environments](concepts.md#snapshots-and-environments).
49
58
 
50
59
  ### edit
51
60
 
@@ -57,6 +66,8 @@ simrun edit fit.yaml --source model=~/git/pkdb_models --source sbmlsim=~/git/sbm
57
66
  | --- | --- |
58
67
  | `--source NAME=PATH` | a source, as for `submit`; snapshotted when the session opens and at every run |
59
68
  | `--group GROUP` | the group of the runs started from the Editor which name none |
69
+ | `--local` | use the local service of the current directory |
70
+ | `--snapshot` | with `--local`: copy and install the sources at every run |
60
71
 
61
72
  The command opens an edit session in the service, prints the link of the [Editor](web-app.md#the-editor) and runs until Ctrl-C, which closes the session and exits 0 (a second Ctrl-C exits without waiting for the close): it writes the saves of the browser into the file, runs the workflow of the browser as `submit` does, and sends a change of the file or of the working trees to the browser. A file which does not exist is a new workflow.
62
73
 
@@ -68,6 +79,15 @@ simrun wait <run> --timeout 3600
68
79
 
69
80
  `--timeout` is in seconds, without it the command waits for the end of the run. The service answers a long poll which the client repeats, so no connection is held for hours.
70
81
 
82
+ ### outputs
83
+
84
+ ```bash
85
+ simrun outputs <run> <task> # the files and their sizes
86
+ simrun outputs <run> <task> --to results # download them into results/
87
+ ```
88
+
89
+ The files come through the API, so no mount of the store is needed. With `--json` the list is `[{"path", "bytes"}]`, or with `--to` the paths written.
90
+
71
91
  ### status, list and logs
72
92
 
73
93
  ```bash
@@ -96,3 +116,14 @@ simrun usage
96
116
  ```
97
117
 
98
118
  `cleanup` removes the runs which ended more than `--older-than` days ago (30 by default), only the ones of `--group` or only `--failed` runs, and the snapshots no remaining run refers to; `--dry-run` lists what it would remove.
119
+
120
+ ### serve
121
+
122
+ ```bash
123
+ simrun serve --local # the local service of the current directory
124
+ simrun serve --local --idle-exit 1800 # exits after 30 min without a request and without a live run
125
+ simrun serve --local --stop # stops the local service of the current directory, cancelling its runs
126
+ simrun serve --port 8000 # the service of SIMRUN_CONFIG, as uvicorn --factory simrun.service.app:serve
127
+ ```
128
+
129
+ `serve --local` runs the service of the current directory with the local backend, which runs the tasks as processes on this machine: its store is `.simrun/store/`, its scratch `.simrun/scratch/`, its index `.simrun/simrun.sqlite` and its tokens `.simrun/tokens.yaml` (with a `.gitignore` of everything, so none of it lands in git), it listens on `127.0.0.1` only, on a free port unless `--port` names one, and serves the [web app](web-app.md) at `/ui/`. It prints `simrun at http://127.0.0.1:<port>/ui/ (token in .simrun/service.json)`; `.simrun/service.json` (mode 0600) holds the pid, the port, the token, the URL, a random instance of this start and the environment of the service (its python, its simrun version, a hash of the task types it found, whether it runs in the background) while it runs; a client sends the token only to a server which answers that instance at `/local/instance`. Ctrl-C, SIGTERM or SIGHUP (the terminal closed) cancels the runs and waits for their processes, printing what it waits for, so no process of a run outlives a graceful stop; a service which starts after one which was killed (SIGKILL, out of memory) kills the processes that one left running. `--stop` stops the service of the current directory the same way and waits for its end. One service runs per directory; a second one is refused with exit code 3. A command which needs the local service starts it in the background when none runs (`python -m simrun serve --local --idle-exit 1800`, its output in `.simrun/service.log`); a service in the background which runs with another environment than the command is restarted when it has no live run and no open request, else the command warns and uses it.
@@ -32,7 +32,7 @@ A run lives in `runs/<id>/` of the store:
32
32
  | `tasks/<task>/logs/` | the logs of the pods, kept once the task is final |
33
33
  | `tasks/<task>/progress.jsonl` | the progress of the task, one line per completed unit |
34
34
 
35
- The store is the source of truth. The service keeps an index of the runs in SQLite beside it (id, owner, agent, group, workflow, state, times, pending release and cancellation, snapshots and summary), rebuilt from the records at its start, so a restarted service continues where the one before stopped. The state of a run is the one of the service, not the one of Argo: a split task is done when its merge succeeded, an unsplit task when its pod succeeded; when every task is done the run succeeded, when a task failed the run failed, and in both cases the service stops the workflow.
35
+ The store is the source of truth. The service keeps an index of the runs in SQLite beside it (id, owner, agent, group, workflow, state, times, pending release and cancellation, snapshots and summary), rebuilt from the records at its start, so a restarted service continues where the one before stopped. The state of a run is the one of the service, not the one of Argo: a split task is done when its merge succeeded (its coordinator, which merges, succeeded and its output has the marker of the merge, which the service awaits up to two minutes for the attribute cache of NFS), an unsplit task when its pod succeeded; when every task is done the run succeeded, when a task failed the run failed, and in both cases the service stops the workflow.
36
36
 
37
37
  A run belongs to a group, e.g. a study or the subagents of one main agent, which lists and compares the runs of the group (`simrun list --group`, `simrun compare`).
38
38
 
@@ -50,9 +50,10 @@ A unit may be computed more than once: by a worker which is evicted before it co
50
50
 
51
51
  A split task of `pods` pods is three nodes of its Argo DAG:
52
52
 
53
- - `<task>-w0`, the coordinator, a worker which claims units like the others and returns only once the ledger is complete. It releases the claims of workers whose heartbeat is older than the grace period plus a minute and computes them itself.
53
+ - `<task>-w0`, the coordinator, a worker which claims units like the others and returns only once the ledger is complete and then merges the units. It releases the claims of workers whose heartbeat is older than the grace period plus a minute and computes them itself.
54
54
  - `<task>-extra`, the extra workers `<task>-w1` to `<task>-w<pods-1>`, which exit when nothing is pending. An extra worker which fails does not fail the run.
55
- - `<task>-merge`, which runs `simrun-merge` after the coordinator only, so extra workers still waiting for admission never hold up the merge.
55
+
56
+ The coordinator merges the units itself once the ledger is complete (`SIMRUN_MERGE=1`), so extra workers still waiting for admission never hold up the merge. A run recorded before that has a node `<task>-merge` running `simrun-merge` after the coordinator only.
56
57
 
57
58
  An unsplit task is one pod which runs the command of its type through `simrun-exec`.
58
59
 
@@ -70,7 +71,7 @@ The identity of the token of a submission decides the priority of its run:
70
71
  | `standard` | the other people | 500 | 400 |
71
72
  | `agent` | the agents of the other people | 200 | 100 |
72
73
 
73
- Every priority is a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same name and value (`simrun-<priority>-base`, `simrun-<priority>-extra`). The coordinator, the merge and an unsplit task have the base priority of the run, the extra workers the extra priority. Kueue admits the pods and preempts workloads of a lower priority; the scheduler itself never preempts.
74
+ Every priority is a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same name and value (`simrun-<priority>-base`, `simrun-<priority>-extra`). The coordinator (with its merge) and an unsplit task have the base priority of the run, the extra workers the extra priority. Kueue admits the pods and preempts workloads of a lower priority; the scheduler itself never preempts.
74
75
 
75
76
  ## Take-back by preemption
76
77
 
@@ -84,7 +85,7 @@ A pod killed for memory (the evidence of the out of memory killer: the reason `O
84
85
 
85
86
  ## Snapshots and environments
86
87
 
87
- A source is a git working tree, the model first. The client copies the files git knows of it (tracked and untracked, not ignored, uncommitted changes included) into `snapshots/<name>/` of the store and sends its provenance (branch, commit, changed files); files unchanged since the last snapshot of the same name are hard links to it, so a snapshot of an unchanged tree costs nearly nothing. A snapshot is named by its content and its files are read-only. The service never reads the disk of the client.
88
+ A source is a git working tree, the model first. The client copies the files git knows of it (tracked and untracked, not ignored, uncommitted changes included) into `snapshots/<name>/` of the store and sends its provenance (branch, commit, changed files); a client without the store mounted sends the list of the files with the hashes of their contents to the service, then a tar of the files whose content the store lacks, and the service writes the same snapshot. Files whose content the last snapshot of the same name has are hard links to it (`<snapshot>.files.json` beside it maps its paths to the hashes), so a snapshot of an unchanged tree costs nearly nothing and its upload sends no file. A snapshot is named by its content and its files are read-only. The service never reads the disk of the client.
88
89
 
89
90
  The image of a run whose model has a `pyproject.toml` holds the third party dependencies of the model and of its snapshotted libraries, locked with `uv lock` against the snapshots, and their build backends at the versions of the constraints file of the service, so a new release of a backend changes no lock and rebuilds no image. The code comes from the snapshots, which a pod mounts read-only and installs editable at its start without network access. The image is named by the hash of the lock, the python version and the simrun version and built with BuildKit only when the registry does not have it, so a change of the code never rebuilds an image and a change of a dependency does. A run whose model has no `pyproject.toml` runs in the `default_image` of the service.
90
91
 
@@ -7,8 +7,8 @@
7
7
  | namespace | `namespace.yaml` | the namespace `simrun` of the service, the workflows and their pods |
8
8
  | priorities | `priority-classes.yaml` | the six priority classes of simrun, each a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same value, see [Priorities and preemption](concepts.md#priorities-and-preemption) |
9
9
  | Kueue v0.20.5 | `kueue/` | the release manifests, committed unchanged, and the queue: a `Topology` by host, a `ResourceFlavor` over the nodes labelled `simrun/worker=true`, the `ClusterQueue` `simrun`, which preempts lower priorities, and the `LocalQueue` `simrun` |
10
- | Argo Workflows v4.1.6 | `argo/` | the release manifests of a namespace install, committed unchanged, the configuration of the controller and the service account `simrun-workflow` of the pods |
11
- | run store | `store-settings.yaml`, `store.yaml` | the run store on NFS (csi-driver-nfs), mounted by the service and every pod |
10
+ | Argo Workflows v4.1.6 | `argo/` | the release manifests of a namespace install, committed unchanged, the configuration of the controller, its requeue time of 2 s instead of 10 s (`requeue.yaml`, so a run shows running soon after its pods start) and the service account `simrun-workflow` of the pods |
11
+ | run store | `store-settings.yaml`, `store.yaml` | the run store on NFS (csi-driver-nfs), mounted by the service and every pod with `nfsvers=4.2` and `lookupcache=positive` |
12
12
  | registry | `zot.yaml` | [Zot](https://zotregistry.dev), the image registry inside the network |
13
13
  | builds | `buildkit.yaml` | the BuildKit daemon, which builds the images of the environments |
14
14
  | service | `simrun.yaml` | the service: its settings, its tokens, its volumes and its rights |
@@ -21,6 +21,8 @@ kubectl apply --server-side -k deploy/cluster
21
21
 
22
22
  The resources of Kueue are accepted once its CRDs and its webhook are up, so the first apply may have to be repeated.
23
23
 
24
+ The store is mounted with `lookupcache=positive`: the NFS client caches no negative lookups, so a file a pod wrote, e.g. the marker `out/.simrun-merged` of a merge, is seen by the service at once even when it looked for the file before. The mount options are the ones of the StorageClass when the volume of the claim was provisioned: an existing PersistentVolume keeps its options, so add the option to `spec.mountOptions` of that PersistentVolume (or provision it again) and restart the pods which mount it. Without the option the service waits up to two minutes for the marker of a merge before it fails the task.
25
+
24
26
  ## Nodes
25
27
 
26
28
  The nodes of the runs carry the label `simrun/worker=true`, which the `ResourceFlavor` of Kueue needs (a flavor with a topology needs node labels) and by which the backend lists the nodes:
@@ -68,6 +70,8 @@ docker push registry.cluster.internal:5000/simrun-service:0.1.0
68
70
 
69
71
  The plugins are installed with their dependencies at the versions of the lock of simrun (`constraints.txt`): a plugin which needs another version of a dependency of simrun fails the build instead of moving it. The base (`--build-arg BASE`) is the base image of the environments in the registry, which the registry mirrors with its digest (`ClusterConfig.base_image`). At runtime the service keeps the cache of uv in `/var/cache/uv`, a volume of the deployment, so a submission does not download the metadata and the build backends again.
70
72
 
73
+ A client without the store mounted (`SIMRUN_STORE`) uploads its snapshots through the API, and the service spools an upload to its temporary directory (`TMPDIR`, else `/tmp`) before it moves the files into the store: the container's `/tmp` must hold up to `max_upload_bytes` (2 GiB by default) per concurrent upload, so give the pod the ephemeral storage for it or mount a volume at `/tmp`.
74
+
71
75
  ## Builds of the images of the environments
72
76
 
73
77
  An image is built by a Job of `buildctl`, which sends the build context (a ConfigMap of its files, owned by the Job) to the BuildKit daemon of the cluster and pushes the image to the registry with the credentials of the optional Secret `simrun-registry-auth`; whether the registry has an image is asked its API.
@@ -84,7 +88,7 @@ The integration tests verified the design on k3s v1.35.5 (k3d v5.9.0) with Kueue
84
88
  - **Preemption and the retries of Argo.** Kueue preempts a workload of a lower priority by deleting its pod within the grace period: the worker stops on SIGTERM, releases its claims and writes its report. Argo marks the attempt `Error` with the message `pod deleted` and no exit code, so the retry strategy retries it; the new pod is gated again and waits. The backend reports such a node `Preempted` until its next pod runs (a node whose pod failed otherwise, a crash or a kill after its grace period, is `Retrying`). A pod preempted before Argo saw it running is created again by Argo as the same attempt, without a retry, so such a node is reported queued and not `Preempted`.
85
89
  - **Topology aware scheduling.** A `ResourceFlavor` with a topology needs node labels, hence the label `simrun/worker=true`. On admission Kueue adds the host and the flavor labels to the node selector of the pod; it honours the node selector and the toleration of a reserved run, and the taint `NoExecute` of a reservation keeps the pods of other runs off the node. Kueue preempts for the capacity of a node as well.
86
90
  - **The executor counts.** Kueue counts every container, so the init and wait containers of Argo request what they limit (`executor.resources` in the controller config). The init container copies the argoexec binary (about 150 MB) into the pod and has 256Mi; with 128Mi it was killed for memory now and then.
87
- - **Out of memory.** The kernel kills the whole container (cgroup v2, `memory.oom.group`), so the worker writes no report; Argo names the container in the message, `main: OOMKilled (exit code 137)`. A kill for memory needs this evidence or a report which counts the kills of the out of memory killer in its cgroup; an exit 137 without either is a pod killed after its grace period, an eviction. The retry limit of a pod is 100: every eviction by Kueue counts against it.
91
+ - **Out of memory.** The kernel kills the whole container (cgroup v2, `memory.oom.group`), so the worker writes no report; Argo names the container in the message, `main: OOMKilled (exit code 137)`. A kill for memory needs this evidence or a report which counts the kills of the out of memory killer in its cgroup; an exit 137 without either is a pod killed after its grace period, an eviction. Only a pod which was stopped is retried: without an exit code (a lost node, a pod deleted before it ran), killed (137) or stopped on SIGTERM (143); any other exit fails its task at once, and the message of the run names the pod and its exit. The retry limit of a pod is 100: every eviction by Kueue counts against it.
88
92
  - **The retry memory after a preemption.** Argo's expressions of a retry know only the last attempt (`lastRetry`), so an attempt after one which was preempted following a kill for memory gets the first memory again, not the retry memory. The controller does not count a kill of such an attempt toward the limit; the attempt after it has the retry memory again.
89
93
  - **Stopping a workflow.** After `shutdown: Stop` Argo fails the nodes still pending; the backend deletes their gated pods.
90
94
  - **Logs.** The logs of an attempt whose pod Kueue deleted are gone with the pod; the controller keeps the logs of the pods of a task in the store once the task is final.
@@ -183,6 +183,14 @@ A release is made from `develop`. Since `develop` only accepts pull requests, th
183
183
 
184
184
  This starts the `CI-CD` workflow, which checks that the tag is the version of the package, builds the sdist and the wheel, publishes them to [PyPI](https://pypi.org/project/simrun/), creates the GitHub release from `release-notes/x.y.z.md` and fast-forwards `main` to the tagged commit. It does not run the test matrix again: the merge into `develop` ran it on the same commit, and the job `tested on develop` waits for that run and stops the release unless it passed, so the tag can be pushed right after the merge. Next to it the tests on the k3d cluster run on the tag, and the release waits for them. Check the version before pushing, a tag cannot be moved or deleted afterwards.
185
185
 
186
+ The wheel and the sdist contain the built web app in `simrun/web`, which `simrun serve --local` serves: the job builds `frontend/` and copies `frontend/dist` to the gitignored `src/simrun/web` before the build (`artifacts` of `pyproject.toml`). A package built without it has no web app, and a checkout serves `frontend/dist` once built. To build the package with the web app locally:
187
+
188
+ ```bash
189
+ (cd frontend && npm ci && npm run build)
190
+ rm -rf src/simrun/web && cp -r frontend/dist src/simrun/web
191
+ uvx hatch build
192
+ ```
193
+
186
194
  8. test the installation from PyPI in a fresh environment:
187
195
 
188
196
  ```bash
Binary file
@@ -34,7 +34,7 @@ simrun --help
34
34
  python -c "import simrun; print(simrun.__version__)"
35
35
  ```
36
36
 
37
- The command line needs a running service, see [Command line](command-line.md); the service and the cluster are set up as described in [Cluster deployment](deployment.md).
37
+ The command line needs a running service, see [Command line](command-line.md), or runs everything on this machine with `--local`, see [Local mode](local.md); the service and the cluster are set up as described in [Cluster deployment](deployment.md).
38
38
 
39
39
  ## Optional packages
40
40
 
@@ -0,0 +1,61 @@
1
+ # Local mode
2
+
3
+ The local mode runs a workflow on this machine, without a cluster, a registry or a mounted store. It is the same service, planner, harness, records and [web app](web-app.md) as on the cluster, with a backend which runs the tasks as processes. The time of a run is the time of its processes plus a fraction of a second per task.
4
+
5
+ ```bash
6
+ pip install simrun
7
+ simrun submit fit.yaml --source model=. --local
8
+ simrun outputs <run> <task> --to results
9
+ ```
10
+
11
+ ## The switch
12
+
13
+ `--local` on a command makes it talk to the local service of the current directory instead of `SIMRUN_URL`; no environment variable is needed. It is accepted by `submit`, `estimate`, `wait`, `status`, `list`, `logs`, `outputs`, `cancel`, `compare`, `cleanup`, `usage` and `edit`. Without `--local` the same command runs on the cluster, see [Command line](command-line.md).
14
+
15
+ `submit --local` waits for the run by default and prints a live line per task on a terminal and plain lines otherwise; it exits like `wait` (0 if the run succeeded, 1 if it failed or was cancelled, 2 on `--timeout`). `--no-wait` returns at once with the run, as on the cluster.
16
+
17
+ ## The service of a project
18
+
19
+ The local service keeps everything in `.simrun/` of the current directory, like `.venv`: `store/` (`runs/`, `snapshots/`), `scratch/`, `envs/` (the environments of the runs with `--snapshot`), the index `simrun.sqlite`, the generated tokens `tokens.yaml`, `service.json`, `service.log` and a `.gitignore` of everything, so none of it lands in git. It listens on `127.0.0.1` on a free port only.
20
+
21
+ A `--local` command starts the service in the background when none runs, waits for its `service.json` and uses it. The service exits after 30 minutes without a request and without a live run, and a stopped service is started again by the next command. The service runs the python, the simrun and the task types of the command which started it; `service.json` records them, and a command whose environment differs (another venv, a new or upgraded plugin, another simrun) restarts a service in the background which has no live run and no open request, else it warns and uses the running one. `simrun serve --local --stop` stops the service of the directory (its runs are cancelled) and waits for its end.
22
+
23
+ `simrun serve --local` runs the service in the foreground instead and prints its address; Ctrl-C, SIGTERM or SIGHUP cancels the runs and waits for their processes (up to 60 s, printing what it waits for), so no process of a run outlives a graceful stop. A service killed without its cleanup (SIGKILL, the out of memory killer) leaves the processes of its runs running; the next service of the directory kills them when it starts. One service runs per directory. See [serve](command-line.md#serve) for the file `service.json` and the check of the instance before the token is sent.
24
+
25
+ ## The web app
26
+
27
+ The service serves the web app at `/ui/`: the Executions with live updates, and the Editor (`simrun edit --local`). The wheel ships the built app (`simrun/web`); a checkout serves `frontend/dist` once it is built, see [Development](development.md). The app asks for a token: the one in `.simrun/service.json`. The server strip shows this machine as the one server.
28
+
29
+ ![The web app of the local service: a run of three tasks on this machine](images/executions-running.png)
30
+
31
+ ## How tasks run
32
+
33
+ The `LocalBackend` of the service runs the pods of a run as processes of this machine:
34
+
35
+ - a split task is one coordinator process (`simrun-worker`) with as many processes as the machine has cores, which computes the units and merges them itself; there are no extra workers, and the plan (also of `estimate --local`) has one pod
36
+ - a task of a plugin type runs through `simrun-exec`
37
+ - a `command` task runs its args directly by default, or in its image with `docker run` when the run is submitted with `--docker`; the run records which. The store and the scratch directory are mounted at the same paths
38
+ - a task starts when the tasks it reads from succeeded and its cores are free; the cores are shared by all runs of the service, in the order of submission, and a waiting task is `queued`
39
+ - a process stopped from outside (no exit code, 137 or 143) is retried as on the cluster, after a kill (137) with the retry memory per process, so the harness runs fewer processes; there is no memory limit per task, a process which takes too much is killed by the out of memory killer of the machine
40
+
41
+ The backend sets `SIMRUN_CORES` (the cores of the worker), `SIMRUN_MEMORY_LIMIT_GB` (its memory, by which the harness sizes its pool of processes; nothing kills a process above it) and `SIMRUN_MEMORY_SOURCE=process` in the environment of a process: the processes share the cgroup of the machine or of the session, so the harness measures the memory of its own process tree in `/proc` instead of the one of the cgroup, and learns the resources of a task from it as on the cluster. The scratch directories are in `.simrun/scratch/`, the logs of every process are in `.simrun/store/runs/<run>/tasks/<task>/logs/`, and `simrun logs` reads them as it does on the cluster.
42
+
43
+ ## Sources
44
+
45
+ Locally the sources are recorded, not copied: the provenance (branch, commit, uncommitted files, the hash of the diff) is stored as on the cluster, and the processes run with the python environment of the command, so the code is the working tree as installed in it, e.g. editable. Nothing is snapshotted or installed, which keeps a run as fast as running the code by hand.
46
+
47
+ `--snapshot` on `submit` and `edit` copies the working trees into `snapshots/`, when a run must not see later changes of the tree. The run gets an environment of its own, a venv in `.simrun/envs/<run>/` which sees the packages of the command's python, and the snapshots are installed into it as editable packages without their dependencies, never into the environment of the command; the harness runs with its python, and a `command` task finds it first on `PATH`. The installer is `uv` (else `pip`), which builds the snapshots with their build backends from the index or its cache. The venv is removed at the end of the run.
48
+
49
+ ## What differs from the cluster
50
+
51
+ | | cluster | local |
52
+ | --- | --- | --- |
53
+ | the machines | the servers of the cluster | this machine |
54
+ | priorities and preemption | Kueue, six priority classes | none, the tasks run in the order of submission |
55
+ | reservations of nodes | yes | refused |
56
+ | images | built with BuildKit per environment | none; a `command` may use its image with `--docker` |
57
+ | sources | snapshots, installed in the image | provenance only, unless `--snapshot`: installed in a venv of the run |
58
+ | store | shared drive, or uploads through the API | `.simrun/store/` |
59
+ | extra workers of a split task | spread over idle servers | none, one worker with all cores |
60
+
61
+ The records, logs and outputs have the layout of a cluster run, see [Concepts](concepts.md).
@@ -1,6 +1,6 @@
1
1
  # Agents and MCP
2
2
 
3
- `simrun-mcp` is an [MCP](https://modelcontextprotocol.io) server on stdio, a local process of an agent: it runs on the machine of the working trees, takes the snapshots of the sources the agent names and calls the service with the token of the agent. It reads `SIMRUN_URL`, `SIMRUN_TOKEN` and `SIMRUN_STORE` like the [command line](command-line.md).
3
+ `simrun-mcp` is an [MCP](https://modelcontextprotocol.io) server on stdio, a local process of an agent: it runs on the machine of the working trees, takes the snapshots of the sources the agent names and calls the service with the token of the agent. It reads `SIMRUN_URL`, `SIMRUN_TOKEN` and the optional `SIMRUN_STORE` like the [command line](command-line.md).
4
4
 
5
5
  ## Setup
6
6
 
@@ -30,7 +30,7 @@ The functions are `"module:function"` strings, so a worker process resolves them
30
30
 
31
31
  ## The contract
32
32
 
33
- - **Split or unsplit.** A type with `count_units`, `compute_unit` and `merge` is split: its units are claimed from the ledger by the processes of its pods (`simrun-worker`), and the merge (`simrun-merge`) runs once every unit is done. Other types run their `command`, an argv template with `{settings}` (the path of `settings.json`), `{out}` (the output directory) and `{input}`, through `simrun-exec`; the command validates the settings itself with the settings model. A part of the template with `{input}` is repeated once per input port of the task, sorted by port, with `{input}` replaced by `<port>=<path>`, and dropped when the task has no inputs: the path is the absolute path of the output the port reads as the pod sees it, or `<scratch>/<port>` for a port the task stages, the local copy `simrun-exec` makes before the command starts. `--input={input}` becomes `--input=a=/store/runs/<id>/tasks/<task>/out/<port>` and, for a staged port `b`, `--input=b=/scratch/b`.
33
+ - **Split or unsplit.** A type with `count_units`, `compute_unit` and `merge` is split: its units are claimed from the ledger by the processes of its pods (`simrun-worker`), and the coordinator pod merges once every unit is done (`simrun-merge` remains for runs recorded before). Other types run their `command`, an argv template with `{settings}` (the path of `settings.json`), `{out}` (the output directory) and `{input}`, through `simrun-exec`; the command validates the settings itself with the settings model. A part of the template with `{input}` is repeated once per input port of the task, sorted by port, with `{input}` replaced by `<port>=<path>`, and dropped when the task has no inputs: the path is the absolute path of the output the port reads as the pod sees it, or `<scratch>/<port>` for a port the task stages, the local copy `simrun-exec` makes before the command starts. `--input={input}` becomes `--input=a=/store/runs/<id>/tasks/<task>/out/<port>` and, for a staged port `b`, `--input=b=/scratch/b`.
34
34
  - **Deterministic, atomic unit outputs.** A unit may be computed more than once (a worker evicted before it completed the unit, a restarted pod whose earlier incarnation still runs), so `compute_unit` writes outputs which depend on the settings and the index only, each written atomically: a temporary file in the same directory, then renamed.
35
35
  - **Ports are directories.** An output port `<port>` of a task is the directory `out/<port>` (`paths.out / port`); a downstream task reads it as the input `<task>.<port>` (`paths.inputs[<input>]`). `out/summary.json` is the summary of the task, no port, which `compare` reads.
36
36
  - **`uses_cores`.** An unsplit plugin task is sized as one process (one core, `base + per_worker`), unless its type sets `uses_cores`: then it takes the processes a node allows, like a worker, and its command runs a pool of its own.
@@ -2,4 +2,6 @@
2
2
 
3
3
  The notes of every release, newest first. They are kept in `release-notes/` of the repository and are the text of the [GitHub releases](https://github.com/matthiaskoenig/simrun/releases).
4
4
 
5
+ --8<-- "release-notes/0.2.0.md"
6
+
5
7
  --8<-- "release-notes/0.1.0.md"