T3Reaction.from_dict cannot read back its own as_dict output once r_species is populated
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 16
- Fork
- 8
- Merge medio
- 1h 46m
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ReactionMechanismGenerator/T3
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
ReactionMechanismGenerator/T3#233 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
ReactionMechanismGenerator/T3#239 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ReactionMechanismGenerator/T3#238 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
ReactionMechanismGenerator/T3#236 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
ReactionMechanismGenerator/T3#235 ·
Tutte le issue di ReactionMechanismGenerator/T3
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno