runops 2.9.0__tar.gz → 2.10.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 (126) hide show
  1. {runops-2.9.0 → runops-2.10.0}/PKG-INFO +4 -1
  2. {runops-2.9.0 → runops-2.10.0}/README.md +3 -0
  3. {runops-2.9.0 → runops-2.10.0}/SPEC.md +9 -4
  4. {runops-2.9.0 → runops-2.10.0}/docs/adapter.md +9 -0
  5. {runops-2.9.0 → runops-2.10.0}/docs/guide.md +8 -2
  6. {runops-2.9.0 → runops-2.10.0}/docs/reference.md +1 -1
  7. {runops-2.9.0 → runops-2.10.0}/pyproject.toml +1 -1
  8. {runops-2.9.0 → runops-2.10.0}/src/runops/__init__.py +1 -1
  9. {runops-2.9.0 → runops-2.10.0}/src/runops/cli.py +6 -1
  10. {runops-2.9.0 → runops-2.10.0}/src/runops/harness.py +2 -2
  11. {runops-2.9.0 → runops-2.10.0}/src/runops/legacy_adapters/emses.py +2 -2
  12. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/setup.py +58 -6
  13. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/SKILL.md +9 -3
  14. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-reference/SKILL.md +1 -1
  15. {runops-2.9.0 → runops-2.10.0}/tests/conftest.py +1 -1
  16. {runops-2.9.0 → runops-2.10.0}/tests/test_analysis_layout.py +1 -3
  17. {runops-2.9.0 → runops-2.10.0}/tests/test_legacy_adapters.py +13 -4
  18. {runops-2.9.0 → runops-2.10.0}/tests/test_setup_misc.py +48 -2
  19. {runops-2.9.0 → runops-2.10.0}/uv.lock +1 -1
  20. {runops-2.9.0 → runops-2.10.0}/.agents/skills/check/SKILL.md +0 -0
  21. {runops-2.9.0 → runops-2.10.0}/.agents/skills/improve-harness/SKILL.md +0 -0
  22. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/SKILL.md +0 -0
  23. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/agents/openai.yaml +0 -0
  24. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/examples/refactor-request.md +0 -0
  25. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/references/anti-patterns.md +0 -0
  26. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/references/api-compatibility.md +0 -0
  27. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/references/packaging-modernization.md +0 -0
  28. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/references/refactor-playbook.md +0 -0
  29. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/references/verification.md +0 -0
  30. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/scripts/api_surface_snapshot.py +0 -0
  31. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/scripts/import_smoke.py +0 -0
  32. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/scripts/inspect_python_package.py +0 -0
  33. {runops-2.9.0 → runops-2.10.0}/.agents/skills/python-package-refactor/scripts/refactor_quality_gate.py +0 -0
  34. {runops-2.9.0 → runops-2.10.0}/.agents/skills/release/SKILL.md +0 -0
  35. {runops-2.9.0 → runops-2.10.0}/.agents/skills/simulator-adapter/SKILL.md +0 -0
  36. {runops-2.9.0 → runops-2.10.0}/.agents/skills/spec-reviewer/SKILL.md +0 -0
  37. {runops-2.9.0 → runops-2.10.0}/.agents/skills/sync-docs/SKILL.md +0 -0
  38. {runops-2.9.0 → runops-2.10.0}/.claude/agents/spec-reviewer.md +0 -0
  39. {runops-2.9.0 → runops-2.10.0}/.claude/rules/architecture.md +0 -0
  40. {runops-2.9.0 → runops-2.10.0}/.claude/rules/dev-workflow.md +0 -0
  41. {runops-2.9.0 → runops-2.10.0}/.claude/rules/gotchas.md +0 -0
  42. {runops-2.9.0 → runops-2.10.0}/.claude/settings.json +0 -0
  43. {runops-2.9.0 → runops-2.10.0}/.claude/skills/check/SKILL.md +0 -0
  44. {runops-2.9.0 → runops-2.10.0}/.claude/skills/improve-harness/SKILL.md +0 -0
  45. {runops-2.9.0 → runops-2.10.0}/.claude/skills/python-package-refactor/SKILL.md +0 -0
  46. {runops-2.9.0 → runops-2.10.0}/.claude/skills/release/SKILL.md +0 -0
  47. {runops-2.9.0 → runops-2.10.0}/.claude/skills/simulator-adapter/SKILL.md +0 -0
  48. {runops-2.9.0 → runops-2.10.0}/.claude/skills/spec-reviewer/SKILL.md +0 -0
  49. {runops-2.9.0 → runops-2.10.0}/.claude/skills/sync-docs/SKILL.md +0 -0
  50. {runops-2.9.0 → runops-2.10.0}/.codex/README.md +0 -0
  51. {runops-2.9.0 → runops-2.10.0}/.codex/agents/spec-reviewer.toml +0 -0
  52. {runops-2.9.0 → runops-2.10.0}/.codex/config.toml +0 -0
  53. {runops-2.9.0 → runops-2.10.0}/.codex/rules/runops.rules +0 -0
  54. {runops-2.9.0 → runops-2.10.0}/.dockerignore +0 -0
  55. {runops-2.9.0 → runops-2.10.0}/.gitattributes +0 -0
  56. {runops-2.9.0 → runops-2.10.0}/.github/assets/conversation-dark.svg +0 -0
  57. {runops-2.9.0 → runops-2.10.0}/.github/assets/conversation-light.svg +0 -0
  58. {runops-2.9.0 → runops-2.10.0}/.github/assets/hero-dark.svg +0 -0
  59. {runops-2.9.0 → runops-2.10.0}/.github/assets/hero-light.svg +0 -0
  60. {runops-2.9.0 → runops-2.10.0}/.github/assets/make_readme_art.py +0 -0
  61. {runops-2.9.0 → runops-2.10.0}/.github/workflows/ci.yml +0 -0
  62. {runops-2.9.0 → runops-2.10.0}/.github/workflows/publish.yml +0 -0
  63. {runops-2.9.0 → runops-2.10.0}/.gitignore +0 -0
  64. {runops-2.9.0 → runops-2.10.0}/.pre-commit-config.yaml +0 -0
  65. {runops-2.9.0 → runops-2.10.0}/.vscode/settings.json +0 -0
  66. {runops-2.9.0 → runops-2.10.0}/AGENTS.md +0 -0
  67. {runops-2.9.0 → runops-2.10.0}/CLAUDE.md +0 -0
  68. {runops-2.9.0 → runops-2.10.0}/LICENSE +0 -0
  69. {runops-2.9.0 → runops-2.10.0}/src/runops/adapters/__init__.py +0 -0
  70. {runops-2.9.0 → runops-2.10.0}/src/runops/adapters/base.py +0 -0
  71. {runops-2.9.0 → runops-2.10.0}/src/runops/adapters/generic.py +0 -0
  72. {runops-2.9.0 → runops-2.10.0}/src/runops/adapters/registry.py +0 -0
  73. {runops-2.9.0 → runops-2.10.0}/src/runops/case.py +0 -0
  74. {runops-2.9.0 → runops-2.10.0}/src/runops/config.py +0 -0
  75. {runops-2.9.0 → runops-2.10.0}/src/runops/errors.py +0 -0
  76. {runops-2.9.0 → runops-2.10.0}/src/runops/jobgen.py +0 -0
  77. {runops-2.9.0 → runops-2.10.0}/src/runops/launchers.py +0 -0
  78. {runops-2.9.0 → runops-2.10.0}/src/runops/legacy_adapters/__init__.py +0 -0
  79. {runops-2.9.0 → runops-2.10.0}/src/runops/legacy_adapters/beach.py +0 -0
  80. {runops-2.9.0 → runops-2.10.0}/src/runops/manifest.py +0 -0
  81. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/__init__.py +0 -0
  82. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/analysis.py +0 -0
  83. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/common.py +0 -0
  84. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/create.py +0 -0
  85. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/listing.py +0 -0
  86. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/notes.py +0 -0
  87. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/progress.py +0 -0
  88. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/skills.py +0 -0
  89. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/submit.py +0 -0
  90. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/sync.py +0 -0
  91. {runops-2.9.0 → runops-2.10.0}/src/runops/ops/tidy.py +0 -0
  92. {runops-2.9.0 → runops-2.10.0}/src/runops/project.py +0 -0
  93. {runops-2.9.0 → runops-2.10.0}/src/runops/runtime.py +0 -0
  94. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/README.md +0 -0
  95. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/out/fig1_maps.png +0 -0
  96. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/out/fig2_dependence.png +0 -0
  97. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/out/values.csv +0 -0
  98. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/report.html +0 -0
  99. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/scripts/build_html.py +0 -0
  100. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/example-report/scripts/make_figures.py +0 -0
  101. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-analyze/report-guide.md +0 -0
  102. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-check-status/SKILL.md +0 -0
  103. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-create-run/SKILL.md +0 -0
  104. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-maintain/SKILL.md +0 -0
  105. {runops-2.9.0 → runops-2.10.0}/src/runops/skills/runops-tidy/SKILL.md +0 -0
  106. {runops-2.9.0 → runops-2.10.0}/src/runops/slurm.py +0 -0
  107. {runops-2.9.0 → runops-2.10.0}/src/runops/util.py +0 -0
  108. {runops-2.9.0 → runops-2.10.0}/tests/__init__.py +0 -0
  109. {runops-2.9.0 → runops-2.10.0}/tests/golden/mpi_standard.sh +0 -0
  110. {runops-2.9.0 → runops-2.10.0}/tests/golden/openmp_rsc.sh +0 -0
  111. {runops-2.9.0 → runops-2.10.0}/tests/test_adapters.py +0 -0
  112. {runops-2.9.0 → runops-2.10.0}/tests/test_archive_series.py +0 -0
  113. {runops-2.9.0 → runops-2.10.0}/tests/test_build.py +0 -0
  114. {runops-2.9.0 → runops-2.10.0}/tests/test_dev_harness.py +0 -0
  115. {runops-2.9.0 → runops-2.10.0}/tests/test_jobgen.py +0 -0
  116. {runops-2.9.0 → runops-2.10.0}/tests/test_lifecycle.py +0 -0
  117. {runops-2.9.0 → runops-2.10.0}/tests/test_manifest_config.py +0 -0
  118. {runops-2.9.0 → runops-2.10.0}/tests/test_mv_naming.py +0 -0
  119. {runops-2.9.0 → runops-2.10.0}/tests/test_progress.py +0 -0
  120. {runops-2.9.0 → runops-2.10.0}/tests/test_project_scope.py +0 -0
  121. {runops-2.9.0 → runops-2.10.0}/tests/test_run_job.py +0 -0
  122. {runops-2.9.0 → runops-2.10.0}/tests/test_safety.py +0 -0
  123. {runops-2.9.0 → runops-2.10.0}/tests/test_scratch_tidy.py +0 -0
  124. {runops-2.9.0 → runops-2.10.0}/tests/test_skills.py +0 -0
  125. {runops-2.9.0 → runops-2.10.0}/tests/test_sweep.py +0 -0
  126. {runops-2.9.0 → runops-2.10.0}/tests/test_sync_evidence.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: runops
3
- Version: 2.9.0
3
+ Version: 2.10.0
4
4
  Summary: Run ledger and Slurm job submission for HPC simulation projects
5
5
  Project-URL: Homepage, https://github.com/Nkzono99/runops
6
6
  Project-URL: Documentation, https://github.com/Nkzono99/runops/blob/main/docs/reference.md
@@ -77,6 +77,7 @@ runo init
77
77
  | 片付ける | 古い run を整理して。消すものと archive するものを先に見せて |
78
78
  | 作り直した旧系列を片付ける | 旧系列は新系列で置き換えたので、対応を記録して archive して |
79
79
  | 解析する | この系列の速度を比較して。図とスクリプト、調査メモを系列の `_analysis/` にまとめて |
80
+ | 過去の結果を使う | 前回の平均速度はどの時間幅で求めた? ノートから集計表を確認して、今回も同じ条件で比較して |
80
81
  | simulator を足す | パッチを当てた ~/BEACH-dev をビルドして、別の simulator として登録して |
81
82
  | 更新する | runops と simulator を最新にして |
82
83
 
@@ -122,6 +123,8 @@ run は ID が変わらないので、directory を移動してもエージェ
122
123
  | BEACH | `beach-bem` ≥ 3.0 | adapter とエージェント向け skill を同梱 |
123
124
  | その他 | 自作の adapter、または `generic` | [adapter ガイド](https://github.com/Nkzono99/runops/blob/main/docs/adapter.md) |
124
125
 
126
+ MPIEMSES3D の継続計算には `mpiemses3d-tools` 4.22.1 以降を使用してください。
127
+
125
128
  ---
126
129
 
127
130
  [使い方ガイド](https://github.com/Nkzono99/runops/blob/main/docs/guide.md) ·
@@ -46,6 +46,7 @@ runo init
46
46
  | 片付ける | 古い run を整理して。消すものと archive するものを先に見せて |
47
47
  | 作り直した旧系列を片付ける | 旧系列は新系列で置き換えたので、対応を記録して archive して |
48
48
  | 解析する | この系列の速度を比較して。図とスクリプト、調査メモを系列の `_analysis/` にまとめて |
49
+ | 過去の結果を使う | 前回の平均速度はどの時間幅で求めた? ノートから集計表を確認して、今回も同じ条件で比較して |
49
50
  | simulator を足す | パッチを当てた ~/BEACH-dev をビルドして、別の simulator として登録して |
50
51
  | 更新する | runops と simulator を最新にして |
51
52
 
@@ -91,6 +92,8 @@ run は ID が変わらないので、directory を移動してもエージェ
91
92
  | BEACH | `beach-bem` ≥ 3.0 | adapter とエージェント向け skill を同梱 |
92
93
  | その他 | 自作の adapter、または `generic` | [adapter ガイド](https://github.com/Nkzono99/runops/blob/main/docs/adapter.md) |
93
94
 
95
+ MPIEMSES3D の継続計算には `mpiemses3d-tools` 4.22.1 以降を使用してください。
96
+
94
97
  ---
95
98
 
96
99
  [使い方ガイド](https://github.com/Nkzono99/runops/blob/main/docs/guide.md) ·
@@ -541,7 +541,7 @@ Organize(`pin`、`archive`、`mv`、`restore`、`delete`、`tidy`)、Project
541
541
 
542
542
  | command | 効果 |
543
543
  |---|---|
544
- | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [-y]` | `runops.toml`、`cases/`、`runs/`、`LOG.md`、`AGENTS.md`、`.venv` を作る。SIM ごとに adapter package を `.venv` に install し、skill を展開する(§8)。端末から引数なしで実行すると site と simulator を尋ねる。`--site` が無ければ host 名から推定する(KUDPC のログインノードなら `kudpc`) |
544
+ | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [--no-git] [-y]` | `runops.toml`、`cases/`、`runs/`、`LOG.md`、`AGENTS.md`、`.venv` を作る。git repository の外なら `git init`(branch `main`)して、作ったものを最初の commit(`runo init`)にする(`--no-git` で行わない)。SIM ごとに adapter package を `.venv` に install し、skill を展開する(§8)。端末から引数なしで実行すると site と simulator を尋ねる。`--site` が無ければ host 名から推定する(KUDPC のログインノードなら `kudpc`) |
545
545
  | `runo doctor [--json]` | `runops.toml` の妥当性、adapter の import 可否、`.venv` に無い package(§4)、executable の存在、`sbatch` の有無、skill の鮮度を検査 |
546
546
  | `runo update [--skills-only] [-y]` | adapter package を upgrade し、skill を再展開する |
547
547
  | `runo build SIM [--force]` | `local_source` simulator を `.runops/build/` に build する(§4.1) |
@@ -802,8 +802,11 @@ seal、index を持たない)。
802
802
  - agent harness(`AGENTS.md`)は次を指示する。
803
803
  - run に関する観察は `runo note RUN "..."` に書く
804
804
  - 複数 run にまたがる結論と次の判断は `LOG.md` に日付付きで追記する
805
- - 再利用する式・手法・環境の落とし穴は `notes/<topic>.md` に書く。既存 file があれば追記し、
806
- 似た topic の file を増やさない
805
+ - 次の実験で同じ指標や手法を使うときは、`context` に出た該当ノートを開き、適用条件を確かめる
806
+ - 再利用する知見は既存の `notes/<topic>.md` にまとめる。定義と適用条件を本文に書き、
807
+ 根拠となる解析 README や集計表をノートからの相対リンクで示す。新しい topic のみ file を作る
808
+ - 機械可読の出典が必要なノートは、Open Knowledge Format (OKF) の YAML frontmatter に
809
+ `type` と `sources[].resource` を書ける。通常の Markdown も同じ手順で扱う
807
810
  - 調査の詳細は §9.1 の README にまとめ、LOG.md からリンクする
808
811
  - v1 の `research/results/`、`.runops/insights/`、`research/archive/legacy/` は移行時に
809
812
  `notes/legacy/` 配下へ **移動せず** そのまま残し、`notes/README.md` から path を案内する(§11)。
@@ -821,7 +824,8 @@ seal、index を持たない)。
821
824
  - 調査 directory は `README.md`(問い・対象 run id・方法・結果・制約)、`scripts/`
822
825
  (Python、sbatch)、`out/`(図・JSON・CSV)、`logs/`(job の stdout/stderr)からなる。
823
826
  topic は内容で名付け、同じ問いは README に日付付きで追記する。
824
- - `init` の `.gitignore` は `**/logs/`、`__pycache__/`、`.runops/analysis-env/` を含む。
827
+ - `init` の `.gitignore` は `.runops/*`(`last_run_id` と `skills.lock` は残す)、`**/logs/`、`__pycache__/`、
828
+ `runs/**/work/`、`analysis/**/work/` を含む。
825
829
  既存 project のファイルは自動で再配置しない。
826
830
  - `context` は現用 group の `_analysis/*/README.md` がある topic 名を表示し、
827
831
  `--json` では `group_analysis` に project 相対の group path → topic 名一覧を返す。
@@ -1055,5 +1059,6 @@ v2 の文書は次の 4 ファイルだけにする。
1055
1059
  | 常用と保守の案内(2026-11-12) | `runo --help` を typer の `rich_help_panel` で 4 panel に分け、生成 AGENTS.md と `runops-reference` の表を常用(作成と投入、監視、整理)と保守(`init`、`doctor`、`update`、`build`)に分ける。command は削らない | 利用痕跡では作成・投入・監視・復旧・保管が常用で、保守の command は project の準備と更新のときだけ使われていた。常に読む案内を常用の command に寄せる |
1056
1060
  | 代表値と再現性の書き方(2026-11-12) | `runops-analyze` の `report-guide.md` に 2 点を足す: 代表値の図には平均する領域・重み・基準を本文に書く。再現性の検査は bitwise の一致、標本のばらつき、物理量の許容差を分けて設計する | 面積平均した電位の基準と領域が読み手と食い違った。並列 Monte Carlo の逐点一致を求めて、加算順序の違いを不一致と取り違えた |
1057
1061
  | 起動検査の書き方(2026-11-12) | `runops-create-run` に節を置く: 短い起動検査は起動と物理設定の成立だけを判定し、定常性・統計誤差・収束は別に評価する。止める条件と警告を分け、閾値に根拠と分母を添え、項目ごとの判定・実測値・単位・閾値・script の版を JSON に残す。代表 1 配置の検査を他の配置に広げない。runops は判定を持たない(§1.4) | 起動検査に運用判断を混ぜて厳しくしすぎた例と、代表 1 配置の試験が他の配置の不良を拾えなかった例が続いた。判定の記録を runops が持つ案は、2 例目が出るまで見送る |
1062
+ | `init` が git を始める(2026-11-21) | git repository の外で `init` すると `git init` と最初の commit を行う。`git` が無い、commit に失敗した(user の設定が無いなど)ときは warning を出して続ける。`.gitignore` は `.runops/*` を外して記録の file だけ戻す | project は git 管理を想定していたのに `init` は `.gitignore` を書くだけで、10 project のうち git だったのは自前の repository を持つ 1 つだけだった。`.runops/` の下の cache(snapshot、source、実行 file)が数 GB になり、個別に外す方式では追いつかなかった |
1058
1063
  | command の削除(2026-11-12) | `runo summarize` と adapter の `summarize()` hook、`runo migrate-v1` と `ops/migrate.py` を外す(command 23)。既存 run の `analysis/summary.json` は消さず、読む機能も無い。v1 project には runops 2.8 の `migrate-v1` を案内する(§11)。`legacy_adapters/` は `init` が使うので残す | 4 project の利用痕跡で v2 形式の summary は 6 件だけで、adapter の inspect や project の解析と重複していた。v1 からの移行は一度限りで、残る v1 project も 2.8 で変換できる。上限 25 の枠を常用の機能に残す |
1059
1064
  | 使い方ガイド | `docs/guide.md` を追加し、文書を 4 ファイルにする(§13.3) | README の依頼例の表と command 一覧の間を埋める、場面ごとの流れ(case と run の分け方、smoke から本計算、状態の決まり方、整理)の置き場所が無かった |
@@ -98,3 +98,12 @@ v1 から移植した adapter は `src/runops/legacy_adapters/` にあります
98
98
  entry point が見つからないときの `runo init emses` / `runo init beach` が、project の
99
99
  `adapters/` にコピーします。MPIEMSES3D と BEACH の package が entry point を
100
100
  公開したら、legacy 版は削除できます。
101
+
102
+ EMSES の legacy adapter は、元の run の `work/latest/SNAPSHOT1`、次に
103
+ `work/SNAPSHOT1` を探し、新しい run 直下の `SNAPSHOT0` にリンクします。
104
+ native reader はジョブの CWD から `SNAPSHOT0` を読み、`-o work/latest` は出力先だけを
105
+ 指定するためです。
106
+
107
+ 既存 project にコピー済みの `adapters/emses.py` は runops の更新だけでは書き換わりません。
108
+ 古いコピーが `work/latest/SNAPSHOT0` や `work/SNAPSHOT0` にリンクする場合は、リンク先を
109
+ run 直下へ修正するか、`mpiemses3d-tools` 4.22.1 以降の entry point を使用してください。
@@ -22,6 +22,7 @@ runo init
22
22
  | `cases/`、`runs/` | 入力テンプレートと、実行した run の置き場所 |
23
23
  | `LOG.md`、`notes/` | 判断の記録と、再利用する知見の置き場所([6 節](#6-記録を残す)) |
24
24
  | `.venv/` | simulator の Python package(adapter と skill を含む) |
25
+ | `.git/`、`.gitignore` | 入力と記録の履歴。最初の commit まで `runo init` が作る(計算の出力と `.runops/` の cache は外す) |
25
26
  | `AGENTS.md`、`CLAUDE.md`、`.agents/skills/`、`.claude/skills/` | エージェント向けの規則と skill |
26
27
 
27
28
  この directory で Codex か Claude Code を起動し、調べたいことを話しかけてください。
@@ -221,7 +222,12 @@ project の run だけが対象です。同じアカウントの別 project の
221
222
  | 複数の run をまたぐ結論と次の判断 | `LOG.md` に日付見出しで追記 | 今日の scan の結論を LOG にまとめて |
222
223
  | 再利用する式、手法、落とし穴 | `notes/<topic>.md`(1 topic 1 file) | Debye 長の見積もり方を notes に残して |
223
224
 
224
- `notes/` に似た topic の file があれば、新しく作らずに追記します。
225
+ 次の実験でも使う定義や手法は、その topic のノートに追記します。たとえば「平均速度」なら、
226
+ どの粒子を対象に、どの時間幅で、どう重み付けしたかを書き、根拠となる解析 README と集計表に
227
+ ノートから相対リンクを張ります。次に同じ量を比べるときは、エージェントがその条件を確認します。
228
+ 通常の Markdown で書けます。機械可読の出典も残したいときは、ノートの先頭に YAML の
229
+ `type`(例 `Metric`)と `sources` を置き、各項目の `resource` に相対パスか URL を書きます。
230
+ 新規 project の `notes/README.md` に記入例があります。[Open Knowledge Format 仕様](https://github.com/open-knowledge-format/open-knowledge-format/blob/main/SPEC.md)
225
231
 
226
232
  調査の詳細と図・スクリプトは、結果が依存する run の範囲に合わせてまとめます。
227
233
 
@@ -247,7 +253,7 @@ topic は `speed-by-version` のように問いの内容で名付け、同じ問
247
253
  ```
248
254
 
249
255
  エージェントは `runops-analyze` skill を使い、調査の README と、そこへのリンクを含む
250
- `LOG.md` の判断を更新します。`notes/` は run に依存しない知見に使います。
256
+ `LOG.md` の判断を更新します。
251
257
  比較の結果を人に見せるレポートを頼むと(「この 3 条件を比較してレポートにまとめて」)、
252
258
  エージェントは skill 同梱の執筆ガイドと例に沿って、問いと結論、条件を同じ尺度で並べた図、
253
259
  図の読み方と結果の意味、再現情報の順に書きます。README.md と、図を埋め込んで単体で
@@ -185,7 +185,7 @@ project の保守(設定、package、build):
185
185
 
186
186
  | command | 動作 |
187
187
  |---|---|
188
- | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [-y]` | project を作る。`SIM` は `emses` や `name=package-spec`。端末から引数なしで実行すると site と simulator を尋ねる。`--site` の既定はホスト名から推定(KUDPC のログインノードなら `kudpc`、`camphor` も同義) |
188
+ | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [--no-git] [-y]` | project を作る。git repository の外なら `git init` して最初の commit を作る(`--no-git` で行わない)。`SIM` は `emses` や `name=package-spec`。端末から引数なしで実行すると site と simulator を尋ねる。`--site` の既定はホスト名から推定(KUDPC のログインノードなら `kudpc`、`camphor` も同義) |
189
189
  | `runo doctor [--json]` | 設定、adapter の解決経路、`.venv` に無い package、executable、sbatch、skill の鮮度とリンク切れを点検 |
190
190
  | `runo update [--skills-only] [-y]` | simulator package を更新し skill と AGENTS.md の管理 block を再生成。`package` を指定した simulator でも、adapter の `pip_packages()` にある他の package(emses の emout など)が `.venv` に無ければ入れる |
191
191
  | `runo build SIM [--force]` | `local_source` の simulator を build |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "runops"
7
- version = "2.9.0"
7
+ version = "2.10.0"
8
8
  description = "Run ledger and Slurm job submission for HPC simulation projects"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -1,3 +1,3 @@
1
1
  """runops: run ledger and Slurm job submission for HPC simulation projects."""
2
2
 
3
- __version__ = "2.9.0"
3
+ __version__ = "2.10.0"
@@ -178,6 +178,9 @@ def init(
178
178
  no_install: bool = typer.Option(
179
179
  False, "--no-install", help="Do not create .venv or install packages."
180
180
  ),
181
+ no_git: bool = typer.Option(
182
+ False, "--no-git", help="Do not start a git repository (none is started inside one)."
183
+ ),
181
184
  yes: bool = typer.Option(False, "-y", "--yes"),
182
185
  ) -> None:
183
186
  """Create a runops project in the current directory.
@@ -200,7 +203,7 @@ def init(
200
203
  install = not no_install
201
204
  if sims and install and any(s.split("=")[0] != "generic" for s in sims):
202
205
  install = _ask_install(root, yes)
203
- report = init_project(root, sims, site=site, name=name, install=install)
206
+ report = init_project(root, sims, site=site, name=name, install=install, git=not no_git)
204
207
  if report.site_detected:
205
208
  out.print(f"site: {report.site} (guessed from host {hostname()}; use --site to change)")
206
209
  if report.install_failed:
@@ -214,6 +217,8 @@ def init(
214
217
  out.print(f"created {item}")
215
218
  for spec in report.installed:
216
219
  out.print(f"installed {spec}")
220
+ if report.git_started:
221
+ out.print("started a git repository (first commit: runo init)")
217
222
  _warn(report.warnings)
218
223
  out.print(
219
224
  "next: start your agent (Codex / Claude Code) here and describe what to simulate; "
@@ -97,8 +97,8 @@ the project found from the current directory.
97
97
  Notes live in three places, where `runo context` and the next session find them:
98
98
  - one run: `runo note RUN "..."`;
99
99
  - conclusions across runs and next decisions: `LOG.md`, appended under a dated heading;
100
- - reusable knowledge (formulas, methods, pitfalls): `notes/<topic>.md`, extending the
101
- existing file for a topic.
100
+ - reusable definitions, methods and pitfalls: consult the topic in `notes/` before reusing it.
101
+ Update the same note with its scope and a link to the supporting report or data.
102
102
 
103
103
  Place analysis by the runs its results depend on:
104
104
 
@@ -99,8 +99,8 @@ class Adapter:
99
99
  raise ValueError(f"{src_run} has no SNAPSHOT1 to continue from")
100
100
  import tomli_w
101
101
 
102
- rel_parent = snapshot.parent.relative_to(src_run)
103
- link = run_dir / rel_parent / "SNAPSHOT0"
102
+ # Native restart paths are relative to the job's CWD, independently of -o.
103
+ link = run_dir / "SNAPSHOT0"
104
104
  link.parent.mkdir(parents=True, exist_ok=True)
105
105
  os.symlink(snapshot.resolve(), link)
106
106
  path = run_dir / INPUT
@@ -89,13 +89,13 @@ def resolve_site(site: str) -> tuple[str, bool]:
89
89
 
90
90
  GITIGNORE = """\
91
91
  .venv/
92
- .runops/analysis-env/
92
+ .runops/*
93
+ !.runops/last_run_id
94
+ !.runops/skills.lock
93
95
  **/logs/
94
96
  __pycache__/
95
- .runops/build/
96
- .runops/index.toml
97
- .runops/*.lock
98
97
  runs/**/work/
98
+ analysis/**/work/
99
99
  CLAUDE.local.md
100
100
  .claude/settings.local.json
101
101
  """
@@ -110,8 +110,26 @@ Run-specific observations go to `runo note RUN "..."`.
110
110
  NOTES_README = """\
111
111
  # notes
112
112
 
113
- Reusable knowledge: one topic per file (formulas, methods, environment pitfalls).
114
- Extend an existing file instead of creating a similar one.
113
+ Keep one Markdown file per topic. Before reusing a result, open the relevant note
114
+ and check its scope. When an analysis clarifies a definition, method or pitfall,
115
+ update that topic with the finding, the conditions where it applies and a link
116
+ to the supporting report or data. Resolve local paths from the note itself.
117
+
118
+ For machine-readable sources, a topic note can start with Open Knowledge Format
119
+ (OKF) frontmatter. For example, a note about a time average might start like this
120
+ (use the paths to your own analysis):
121
+
122
+ ```yaml
123
+ ---
124
+ type: Metric
125
+ title: Steady-state mean temperature
126
+ sources:
127
+ - resource: ../analysis/steady-state/README.md
128
+ - resource: ../analysis/steady-state/out/means.csv
129
+ ---
130
+ ```
131
+
132
+ In the body, give the averaging window and weighting that make two runs comparable.
115
133
  """
116
134
 
117
135
 
@@ -121,6 +139,7 @@ class InitReport:
121
139
  site: str = ""
122
140
  site_detected: bool = False
123
141
  install_failed: bool = False
142
+ git_started: bool = False
124
143
  created: list[str] = field(default_factory=list)
125
144
  installed: list[str] = field(default_factory=list)
126
145
  warnings: list[str] = field(default_factory=list)
@@ -142,6 +161,7 @@ def init_project(
142
161
  site: str = "",
143
162
  name: str = "",
144
163
  install: bool = True,
164
+ git: bool = True,
145
165
  ) -> InitReport:
146
166
  root = root.resolve()
147
167
  if (root / CONFIG_FILE).exists():
@@ -213,9 +233,41 @@ def init_project(
213
233
  report.created += add_legacy_adapters(project)
214
234
  report.warnings += refresh_agent_files(project)
215
235
  report.created += ["AGENTS.md", "CLAUDE.md", ".agents/skills/", ".claude/skills/"]
236
+ if git:
237
+ report.git_started, git_warnings = start_git(root)
238
+ report.warnings += git_warnings
216
239
  return report
217
240
 
218
241
 
242
+ def start_git(root: Path) -> tuple[bool, list[str]]:
243
+ """Make ``root`` a git repository with a first commit, unless it already is in one.
244
+
245
+ Returns whether a repository was started, and warnings. A missing ``git`` or a
246
+ failed commit (no user identity, a hook) leaves the project usable without git.
247
+ """
248
+ exe = shutil.which("git")
249
+ if exe is None:
250
+ return False, ["git not found; the project is not under git (run `git init` later)"]
251
+
252
+ def run(*args: str) -> subprocess.CompletedProcess[str]:
253
+ return subprocess.run(
254
+ [exe, "-C", str(root), *args], capture_output=True, text=True, check=False
255
+ )
256
+
257
+ inside = run("rev-parse", "--is-inside-work-tree")
258
+ if inside.returncode == 0 and inside.stdout.strip() == "true":
259
+ return False, []
260
+ for args in (("init", "-q"), ("symbolic-ref", "HEAD", "refs/heads/main"), ("add", "-A")):
261
+ res = run(*args)
262
+ if res.returncode != 0:
263
+ return False, [f"git {args[0]} failed: {res.stderr.strip()}"]
264
+ res = run("commit", "-q", "-m", "runo init")
265
+ if res.returncode != 0:
266
+ detail = res.stderr.strip().splitlines()[-1:] or ["unknown error"]
267
+ return True, [f"git repository started, but the first commit failed: {detail[0]}"]
268
+ return True, []
269
+
270
+
219
271
  LEGACY_ADAPTERS = ("emses", "beach")
220
272
 
221
273
 
@@ -5,8 +5,9 @@ description: Analyze or compare run results in a runops project. Use when plotti
5
5
 
6
6
  # Analyze run results
7
7
 
8
- 1. Read `runo context`, identify the question and target run ids, and check existing
9
- analysis directories for the same topic. Use simulator skills for physical methods.
8
+ 1. Read `runo context` and identify the question and target run ids. Open relevant
9
+ notes under `notes/` and check their definitions and scope against the current runs.
10
+ Look for an existing investigation on the topic. Use simulator skills for physical methods.
10
11
  2. Choose the location by the runs the result depends on:
11
12
  - one run: `<run_dir>/analysis/` (or a topic inside it);
12
13
  - one series or sweep directory: `runs/<group>/_analysis/<topic>/`;
@@ -37,7 +38,12 @@ description: Analyze or compare run results in a runops project. Use when plotti
37
38
  before and after, provenance and checks at the end, as `README.md` plus a
38
39
  self-contained `report.html`. [example-report/](example-report/README.md) shows it.
39
40
  6. Update the investigation README, then append the decision and its README link to
40
- `LOG.md`. Put reusable formulas, methods and pitfalls in `notes/<topic>.md`.
41
+ `LOG.md`. If another investigation could reuse a definition, method or finding,
42
+ update the matching `notes/<topic>.md`. State when it applies (e.g. the denominator
43
+ and time window of a fraction). Link the supporting README and the data behind a
44
+ numerical claim, using paths relative to the note. Include the relevant run ids.
45
+ Plain Markdown works. For machine-readable provenance, a topic note can start with
46
+ OKF frontmatter: a `type` such as `Metric` and a `sources` list of `resource` paths or URLs.
41
47
  7. `runo tidy --only analysis-logs` previews old job logs, retaining the newest pair per
42
48
  job name in each logs directory. Apply with `runo tidy --apply --only analysis-logs`.
43
49
  Archiving a whole group directory also moves its `_analysis/`; a partial archive
@@ -36,7 +36,7 @@ Setup, packages and builds; `runops-maintain` has the procedures.
36
36
 
37
37
  | command | effect |
38
38
  |---|---|
39
- | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [-y]` | create runops.toml, cases/, runs/, LOG.md, notes/, AGENTS.md, skills; install simulator packages. Site defaults to a guess from the host name; asks interactively only in a terminal without arguments |
39
+ | `runo init [SIM...] [--site kudpc\|standard] [--no-install] [--no-git] [-y]` | create runops.toml, cases/, runs/, LOG.md, notes/, AGENTS.md, skills; install simulator packages; outside a git repository, `git init` and a first commit. Site defaults to a guess from the host name; asks interactively only in a terminal without arguments |
40
40
  | `runo doctor [--json]` | check config, adapters, packages missing from .venv, executables, sbatch, skill freshness |
41
41
  | `runo update [--skills-only] [-y]` | upgrade simulator packages and redeploy skills / AGENTS.md block |
42
42
  | `runo build SIM [--force]` | build a local_source simulator into .runops/build/<sim>-<commit>-<hash> |
@@ -104,7 +104,7 @@ def fake_slurm(monkeypatch: pytest.MonkeyPatch) -> FakeSlurm:
104
104
  @pytest.fixture
105
105
  def project_dir(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:
106
106
  root = tmp_path / "proj"
107
- init_project(root, ["generic"], install=False)
107
+ init_project(root, ["generic"], install=False, git=False)
108
108
  case = root / "cases" / "demo"
109
109
  case.mkdir(parents=True)
110
110
  (case / "case.toml").write_text(CASE_TOML)
@@ -261,9 +261,7 @@ def test_analysis_skill_and_ignore_template_are_deployed(project_dir: Path, cli)
261
261
  for base in (".agents/skills", ".claude/skills"):
262
262
  assert (project_dir / base / "runops-analyze/SKILL.md").is_file()
263
263
  ignore = (project_dir / ".gitignore").read_text()
264
- assert all(
265
- pattern in ignore for pattern in ("**/logs/", "__pycache__/", ".runops/analysis-env/")
266
- )
264
+ assert all(pattern in ignore for pattern in ("**/logs/", "__pycache__/", ".runops/*"))
267
265
  assert "Notes and analysis" in (project_dir / "AGENTS.md").read_text()
268
266
  assert cli("update", "--skills-only").code == 0
269
267
 
@@ -5,6 +5,8 @@ from __future__ import annotations
5
5
  import shutil
6
6
  from pathlib import Path
7
7
 
8
+ import pytest
9
+
8
10
  from runops.project import Project
9
11
  from runops.util import load_toml
10
12
 
@@ -63,7 +65,10 @@ def test_beach_failure_from_stderr(project_dir: Path, cli, fake_slurm) -> None:
63
65
  assert Project.open(project_dir).resolve_run(run_id).status.value == "failed"
64
66
 
65
67
 
66
- def test_emses_adapter_and_continue(project_dir: Path, cli, fake_slurm) -> None: # type: ignore[no-untyped-def]
68
+ @pytest.mark.parametrize("snapshot_parent", ["work/latest", "work"])
69
+ def test_emses_adapter_and_continue(
70
+ project_dir: Path, cli, fake_slurm, snapshot_parent: str
71
+ ) -> None: # type: ignore[no-untyped-def]
67
72
  _add_sim(
68
73
  project_dir,
69
74
  "emses",
@@ -78,7 +83,9 @@ def test_emses_adapter_and_continue(project_dir: Path, cli, fake_slurm) -> None:
78
83
  assert "export EMSES_DEBUG=no" in job
79
84
 
80
85
  (m.run_dir / "work/latest/energy").write_text("50 1.0\n100 1.0\n")
81
- (m.run_dir / "work/latest/SNAPSHOT1").mkdir()
86
+ snapshot = m.run_dir / snapshot_parent / "SNAPSHOT1"
87
+ snapshot.mkdir()
88
+ (snapshot / "esdat0000.h5").write_bytes(b"restart path fixture")
82
89
  fake_slurm.states[fake_slurm.last_job] = "COMPLETED"
83
90
  cli("sync")
84
91
  assert Project.open(project_dir).resolve_run(run_id).status.value == "completed"
@@ -90,6 +97,8 @@ def test_emses_adapter_and_continue(project_dir: Path, cli, fake_slurm) -> None:
90
97
  plasma = load_toml(c.run_dir / "input/plasma.toml")
91
98
  assert plasma["jobcon"] == {"nstep": 200, "jobnum": [1, 1]}
92
99
  assert plasma["tmgrid"]["nx"] == 32
93
- link = c.run_dir / "work/latest/SNAPSHOT0"
94
- assert link.is_symlink() and link.resolve() == (m.run_dir / "work/latest/SNAPSHOT1").resolve()
100
+ # The native reader opens this path from the run root, even with -o work/latest.
101
+ link = c.run_dir / "SNAPSHOT0"
102
+ assert link.is_symlink() and link.resolve() == snapshot.resolve()
103
+ assert (link / "esdat0000.h5").read_bytes() == b"restart path fixture"
95
104
  assert c.label.endswith("-cont")
@@ -31,6 +31,52 @@ def test_init_camphor_preset(tmp_path: Path) -> None:
31
31
  assert not (root / "adapters/mysim.py").exists()
32
32
 
33
33
 
34
+ def _git_identity(monkeypatch: pytest.MonkeyPatch) -> None:
35
+ for key in ("GIT_AUTHOR_NAME", "GIT_COMMITTER_NAME"):
36
+ monkeypatch.setenv(key, "runops test")
37
+ for key in ("GIT_AUTHOR_EMAIL", "GIT_COMMITTER_EMAIL"):
38
+ monkeypatch.setenv(key, "test@example.invalid")
39
+
40
+
41
+ @pytest.mark.skipif(shutil.which("git") is None, reason="git not installed")
42
+ def test_init_starts_git_with_first_commit(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
43
+ _git_identity(monkeypatch)
44
+ root = tmp_path / "p"
45
+ report = init_project(root, ["generic"], install=False)
46
+ assert report.git_started and not report.warnings
47
+
48
+ def git(*args: str) -> str:
49
+ return subprocess.run(
50
+ ["git", "-C", str(root), *args], capture_output=True, text=True, check=True
51
+ ).stdout
52
+
53
+ assert git("rev-parse", "--abbrev-ref", "HEAD").strip() == "main"
54
+ assert git("log", "--format=%s").strip() == "runo init"
55
+ tracked = git("ls-files").split()
56
+ assert "runops.toml" in tracked and "LOG.md" in tracked and "AGENTS.md" in tracked
57
+ assert git("status", "--porcelain") == ""
58
+ (root / ".runops" / "snapshots").mkdir()
59
+ (root / ".runops" / "snapshots" / "big.h5").write_text("x")
60
+ (root / ".runops" / "last_run_id").write_text("R1\n")
61
+ assert git("status", "--porcelain", "--untracked-files=all").split() == [
62
+ "??",
63
+ ".runops/last_run_id",
64
+ ]
65
+
66
+
67
+ @pytest.mark.skipif(shutil.which("git") is None, reason="git not installed")
68
+ def test_init_inside_a_repository_or_with_no_git_leaves_git_alone(
69
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
70
+ ) -> None:
71
+ _git_identity(monkeypatch)
72
+ subprocess.run(["git", "init", "-q", str(tmp_path)], check=True)
73
+ inner = init_project(tmp_path / "inner", ["generic"], install=False)
74
+ assert not inner.git_started and not (tmp_path / "inner" / ".git").exists()
75
+ other = tmp_path.parent / f"{tmp_path.name}-nogit"
76
+ report = init_project(other, ["generic"], install=False, git=False)
77
+ assert not report.git_started and not (other / ".git").exists()
78
+
79
+
34
80
  def test_init_refuses_existing(project_dir: Path, cli) -> None: # type: ignore[no-untyped-def]
35
81
  res = cli("init", "generic", "--no-install")
36
82
  assert res.code == 2 and "already exists" in res.err
@@ -352,7 +398,7 @@ def test_emses_install_brings_the_adapters_other_packages(
352
398
  root = tmp_path / "emses-proj"
353
399
  pip = FakePip(root)
354
400
  monkeypatch.setattr("runops.ops.setup.subprocess.run", pip)
355
- report = init_project(root, ["emses"], install=True)
401
+ report = init_project(root, ["emses"], install=True, git=False)
356
402
  package = KNOWN_PACKAGES["emses"]
357
403
  # runops.toml names the simulator package; the adapter it brings also wants emout.
358
404
  assert load_toml(root / "runops.toml")["simulators"]["emses"]["package"] == package
@@ -384,7 +430,7 @@ def test_beach_install_is_unchanged(tmp_path: Path, monkeypatch: pytest.MonkeyPa
384
430
  root = tmp_path / "beach-proj"
385
431
  pip = FakePip(root)
386
432
  monkeypatch.setattr("runops.ops.setup.subprocess.run", pip)
387
- report = init_project(root, ["beach"], install=True)
433
+ report = init_project(root, ["beach"], install=True, git=False)
388
434
  assert pip.installs == [[KNOWN_PACKAGES["beach"]]]
389
435
  assert report.installed == [KNOWN_PACKAGES["beach"]]
390
436
 
@@ -525,7 +525,7 @@ wheels = [
525
525
 
526
526
  [[package]]
527
527
  name = "runops"
528
- version = "2.9.0"
528
+ version = "2.10.0"
529
529
  source = { editable = "." }
530
530
  dependencies = [
531
531
  { name = "jinja2" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes