T3Reaction.from_dict cannot read back its own as_dict output once r_species is populated
まだ誰も着手していません。
評価
調査の方向性
Start by reading T3Reaction.as_dict and T3Reaction.from_dict, then compare the serialized species fields and family fields with the arguments accepted by ARCReaction.init. Reproduce both failures using the examples in the issue and check the existing round-trip tests. Done means deserializing the output with either report_family setting succeeds when reactant and product species are attached.
索引モデルが issue の本文から書いたものです。
説明
T3Reaction.from_dict(reaction.as_dict()) raises in both report_family modes once the reaction carries r_species/p_species, so restoring a reactions.yml written by T3 does not work against current ARC.
Measured at T3 official/main 0bd0edc2 against ARC official/main bfaf50237, in t3_env:
r = T3Reaction(label='H + CH4 <=> H2 + CH3', reactants=['H','CH4'], products=['H2','CH3'], t3_index=1)
r.r_species = [T3Species(label='H', smiles='[H]'), T3Species(label='CH4', smiles='C')]
r.p_species = [T3Species(label='H2', smiles='[H][H]'), T3Species(label='CH3', smiles='[CH3]')]
T3Reaction.from_dict(r.as_dict(report_family=True))
# TypeError: ARCReaction.__init__() got an unexpected keyword argument 'family_source'
T3Reaction.from_dict(r.as_dict(report_family=False))
# AttributeError: 'dict' object has no attribute 'label'
Two separate causes:
report_family=True(the default) writesfamily_source, whichARCReaction.__init__does not accept.report_family=Falseleaves the serialisedr_species/p_speciesdicts in the payload, and they reach__init__as dicts where objects are expected.
With no species attached the round-trip succeeds, which is why the existing tests do not catch it: they exercise the thin shape.
Scope note: found while reviewing an unrelated change to T3Species/T3Reaction serialisation. It is pre-existing on main and is not caused by that change, which is why it is filed separately rather than fixed there.
- 主要言語
- Python
- スター
- 16
- フォーク
- 8
- 平均マージ
- 1時間 46分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ReactionMechanismGenerator/T3 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
ReactionMechanismGenerator/T3#233 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 53/100
ReactionMechanismGenerator/T3#239 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ReactionMechanismGenerator/T3#238 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
ReactionMechanismGenerator/T3#236 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ReactionMechanismGenerator/T3#235 ·
ReactionMechanismGenerator/T3 の issue をすべて見る
似ている issue
-
docs(contributing): the two things that silently block a PR対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンavailable documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100
Nixitov/Riptide-Native#944 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JTHCode/secretguard#24 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 ·
メンテナーはふだん 1 日以内に返信