335 shipped example confs cannot load: all 280 Mallela2022MSAs confs fail to parse, and 335 name BNG2.pl at /usr/local/anaconda3
还没有人认领这个 Issue。
评估
调研方向
Start with the configuration parser in pybnf and inspect the tracked .conf files under examples/Mallela2022MSAs/, examples/Mallela2021States/, and examples/Miller2022NavajoNation/. Reproduce the parse failure and check how bng_command overrides BNGPATH; then parse the affected examples after correcting their paths and simulator settings. Done when the examples load with BNGPATH configured and a test catches regressions across tracked example configs.
由索引模型根据 Issue 内容生成。
描述
335 tracked example confs cannot be loaded as shipped.
- All 280 confs in
examples/Mallela2022MSAs/fail to parse. Each directory is named for a metro area, such as "Abilene, TX". The conf uses that name unquoted, as inoutput_dir = Abilene, TX_outputandmodel = Abilene, TX.bngl: Abilene, TX.exp. The parser stops at the first line: "Parsing configuration key 'output_dir' on line 1. output_dir should be specified in the format 'output_dir=s' where s is a string". - 335 confs set
bng_command = /usr/local/anaconda3/bin/BNG2.pl, a path on the original author's machine: Mallela2021States (50), Mallela2022MSAs (280) and Miller2022NavajoNation (5).bng_commandtakes precedence overBNGPATH. So on any other machine, Mallela2021States/SI_files/Alabama/Alabama.conf (for example) is refused with "The BioNetGen simulator (BNG2.pl) was not found at the specified location", even withBNGPATHset.
#1066 removed an unused starting_params line from 334 of these confs. That edit changed nothing about whether they run; they could not run before it either. Checked on main at cbb8159c.
Reproduction
import subprocess
from pybnf import parse, printing
files = subprocess.run(['git', '-c', 'core.quotepath=off', 'ls-files', 'examples/*.conf'],
capture_output=True, text=True).stdout.splitlines()
mallela = [f for f in files if f.startswith('examples/Mallela2022MSAs/')]
bad = 0
for f in mallela:
try:
parse.ploop(open(f).read().splitlines(keepends=True))
except printing.PybnfError:
bad += 1
print(len(mallela), bad) # 280 280
print(sum('/usr/local/anaconda3' in open(f, errors='replace').read() for f in files)) # 335
What should happen
- Make the Mallela2022MSAs confs parse. Either give their paths names without commas and spaces, or have the grammar accept a quoted path, if it doesn't already.
- Delete the
bng_commandlines, so the confs useBNGPATHlike the other examples. - Add a test that loads every tracked example conf, or at least parses it. That would catch both problems.
- 主要语言
- Python
- 星标
- 26
- 派生
- 25
- 平均合并
- 4 小时 25 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lanl/PyBNF 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse it未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
-
bug minor
难度 1/5 1-3 小时 新手友好度 92/100
-
bug minor
难度 2/5 1-3 小时 新手友好度 76/100
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 关联的 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 天内回复