Excited-state parsers: errors="replace" and Perl byte passthrough differ for a stray byte inside a captured label (#868)
还没有人认领这个 Issue。
评估
调研方向
Start with the Gaussian 16 excited-state parser: the Excited State n: label is captured with (.*?) and written to EXCISYM, and the committed fixture is tests/parsers/fixtures/gaussian-16/h2co_tddft_stray_in_state.log. Compare the Python output against the Perl original on origin/main for that fixture. The work is blocked on a maintainer decision between keeping U+FFFD and reproducing raw bytes with surrogateescape, so do not register the case until that is settled.
由索引模型根据 Issue 内容生成。
描述
The Python ports of the excited-state parsers (#868) decode job output with errors="replace"; the Perl originals read bytes. A stray invalid byte on a line no pattern matches is harmless in both. It matters only inside a matched line.
Tested with fixtures derived from h2co_tddft (tests/parsers/fixtures/{gaussian-16/h2co_tddft_stray_in_state.log,orca/h2co_tddft_stray_in_state.out}), original Perl from origin/main against the Python on the branch:
- ORCA (
orca.excited): bytes placed in the\S+fields of aSTATE n:line, a transition line and a spectrum row. No capture group can hold a byte, so output is byte-identical to Perl and to the clean fixture. Registered asorca-h2co-tddft-stray-in-state; the golden is byte-identical to the one the Perl produces. - Gaussian 16 (
gaussian-16.excited): bytes placed in theExcited State n:label, which is captured with(.*?)and written toEXCISYM. They differ: Perl writes the raw byte (0xFF, 0xFE); Python writes U+FFFD (EF BF BD per byte). Everything else in the output is identical.
Open decision: keep U+FFFD (valid UTF-8 downstream, loses the original byte) or reproduce Perl's raw bytes (needs errors="surrogateescape" on stdin and stdout, and puts invalid UTF-8 into a property value). The G16 fixture is committed but not registered as a case until this is decided.
Related: a valid UTF-8 non-breaking space (C2 A0) matches \s in Python text mode but not in Perl's byte regexes. Not covered by these fixtures.
Branch: cx/868-excited.
- 主要语言
- C
- 星标
- 10
- 派生
- 8
- 平均合并
- 6 小时 32 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FriendsofECCE/ECCE 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
FriendsofECCE/ECCE#1358 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
FriendsofECCE/ECCE#1353 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
FriendsofECCE/ECCE#1348 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
FriendsofECCE/ECCE#1347 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
FriendsofECCE/ECCE#1345 ·
查看 FriendsofECCE/ECCE 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
Life-Framework/Life-Framework#5378 ·
维护者通常 1 天内回复
-
Bug Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug status: planned ui
难度 2/5 1-3 小时 新手友好度 70/100
ChupathingyCE/chupathingyce#2126 ·
维护者通常 1 天内回复
-
good first issue simulation
难度 1/5 1-3 小时 新手友好度 92/100
MarcosAsh/Lattice_Fluid_Dynamics#270 ·
维护者通常 1 天内回复
-
needs-kind
难度 1/5 1 小时以内 新手友好度 82/100
falcosecurity/libs#3173 · 1 条评论 ·
维护者通常 1 天内回复