Skip to content

[cryspy] 新規パッケージ追加(#155 候補: 結晶構造探索, ohtaka 検証済み) - #197

Open
k-yoshimi wants to merge 2 commits into
developfrom
feat/155-cryspy
Open

[cryspy] 新規パッケージ追加(#155 候補: 結晶構造探索, ohtaka 検証済み)#197
k-yoshimi wants to merge 2 commits into
developfrom
feat/155-cryspy

Conversation

@k-yoshimi

Copy link
Copy Markdown
Collaborator

概要

Refs #155(2024年度追加候補の1つ)

CrySPY 1.4.3(結晶構造探索, Python)を apps/cryspy として追加します。pip ベースなので既存の physbo/py2dmat と同じパターン(PYTHONPATH 対応の vars 生成)に乗せています。

構成

  • 取得: CrySPY の GitHub リリースソース(archive/refs/tags/v1.4.3.tar.gz)を取得し、pip install ./ で prefix へ導入
  • 依存の NumPy ABI 対策: install.shnumpy<2pandas<2.2同一解決パスで固定。CrySPY は pyshtools 等のコンパイル済み依存を牽引し、それらは NumPy 1.x 向け wheel を配布するため、固定しないと NumPy 1.x/2.x の wheel が混在し cryspy コマンドが import 時に ABI エラー(Cannot convert numpy.ndarray to numpy.ndarray)で落ちます。両制約でスタック全体を NumPy 1.x ABI に揃えています
  • Python 3.9〜3.12 が前提(pyshtools の wheel が揃うバージョン)。EOL の 3.8 や新しすぎる版は pyshtools がソースビルドに落ちて fftw3/openblas を要求し失敗する旨を README(en/ja) に明記
  • runtest: import cryspycryspy コマンドの起動(Start CrySPY 1.4.3 バナー)を確認

検証(ISSP ohtaka, Python 3.9 で実施)

インストーラの通しフローを ohtaka で実機実行し end-to-end で成功:

SETUP OK
INSTALL_EXIT=0
import cryspy OK 1.4.3
cryspy started OK

Test Passed.

(検証の過程で、Python 3.8 では pyshtools のソースビルドが fftw3 を要求して失敗、numpy を単純に下げると pandas が NumPy2 wheel のままで ABI エラー、という 2 つの落とし穴を特定し、numpy<2 pandas<2.2 の同時固定で解決しました。)

補足

  • CrySPY 自体は探索の制御のみで、実際の構造予測には本インストーラの QE/OpenMX 等のエネルギー計算コードと cryspy.in が必要です(README に明記)。
  • 2024年度追加候補 #155 の他候補(TurboGenius, TurboRVB)は別 PR で順次対応予定です。

🤖 Generated with Claude Code

k-yoshimi and others added 2 commits July 9, 2026 11:31
CrySPY 1.4.3 (crystal structure prediction), installed with pip into
the MateriApps prefix, following the physbo Python-app pattern
(PYTHONPATH-aware vars file). install.sh pins numpy<2 and pandas<2.2
in one resolution pass so the whole stack stays on the NumPy 1.x ABI
that compiled deps like pyshtools ship wheels for; otherwise the
cryspy command aborts at import with a NumPy 1.x/2.x ABI error.
README/README_ja note the Python 3.9-3.12 requirement (pyshtools
wheels) and the numpy/pandas pins.

Verified end-to-end on ISSP ohtaka with Python 3.9: the installer flow
(setup -> install -> link -> runtest) passes; runtest confirms
`import cryspy` and that the `cryspy` command starts (Start CrySPY 1.4.3).

Refs #155

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ard)

- add cryspy to the GitHub Actions app matrix so it is built/tested in CI
- register cryspy in the en/ja Sphinx appendix (toctree + README stub)
- test.sh: guard the startup smoke test with a timeout (fails on 124)
  instead of masking every nonzero exit, keeping the expected no-input
  early exit tolerated and the banner assertion intact

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaWKJsSQqCakkMEKZpJcvP
@k-yoshimi

Copy link
Copy Markdown
Collaborator Author

AI レビューサイクル結果(Codex + Antigravity)

本 PR に対して ai-review-cycle(Phase 1: Codex / Phase 2: Antigravity)を実施しました。

Phase 1 — Codex(コード correctness)

  • must_fix: なし
  • should_fix(1件、対応済み): apps/cryspy/test/test.sh のスモークテストが cryspy > cryspy.out 2>&1 || true で全ての非ゼロ終了をマスクしており、(a) バナー表示後の想定外失敗を取りこぼす、(b) 将来 cryspy が入力待ちでブロックした場合にハングする、という指摘。
    timeout(利用可能な場合)で起動を保護し、124(タイムアウト)は明示的に失敗させるよう修正。cryspy.in 無しでの想定内の early exit は引き続き許容し、Start CrySPY バナーの検証は維持。

Phase 2 — Antigravity(ドキュメント / ワークフロー)

  • must_fix_docs: なし
  • should_fix / workflow_risk(対応済み):
    • cryspy が GitHub Actions の CI マトリクスに無い → .github/workflows/main.ymlapp マトリクスに cryspy を追加。
    • Sphinx appendix に cryspy が未登録 → en/ja 双方の appendix/index.rst の toctree に追加し、README_cryspy.rst(MIT / 公式ページ / MateriApps app/1072)を新規作成。
  • 対応を見送った項目(理由付き):
    • docs/sphinx/table/apps.csv への追加 → 同表は intel/macos/gcc のコンパイラ互換性マトリクスであり、pip パッケージ(physbo・py2dmat も同様に未掲載)には整合しないため対象外とした。

動作確認

物性研 ohtaka(Python 3.9)で setup → install → link → runtest を実機確認済み:import cryspy OK 1.4.3 / cryspy started OK / Test Passed

Codex の must_fix・Antigravity の must_fix_docs はいずれも無く、指摘は上記のとおり対応済みのため収束と判断します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants