PEtab-dev / PEtab-dev/libpetab-python

Validator does not check for required column `noiseFormula` in observables table

未关闭
#219 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@dweindl 已经在做这个了。

开始于 2025年3月25日。

  • #367 来自 @dweindl —— 已合并
validation
主要语言
Python
星标
18
派生
9
PR 合并指标
30 天内没有已合并 PR

描述

Validator does not check for presence of the required column noiseFormula in observables table

See also https://github.com/PEtab-dev/PEtab/issues/259

EDIT: The validator would check for noiseFormula, if it wouldn't already fail during validating the measurement table:

Traceback (most recent call last):
  File "bin/petablint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/dweindl/src/libpetab-python/petab/petablint.py", line 132, in main
    ret = petab.lint.lint_problem(problem)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dweindl/src/libpetab-python/petab/lint.py", line 831, in lint_problem
    check_measurement_df(problem.measurement_df, problem.observable_df)
  File "/home/dweindl/src/libpetab-python/petab/lint.py", line 169, in check_measurement_df
    measurements.assert_overrides_match_parameter_count(
  File "/home/dweindl/src/libpetab-python/petab/measurements.py", line 256, in assert_overrides_match_parameter_count
    observable_df[NOISE_FORMULA])}
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "lib/python3.11/site-packages/pandas/core/frame.py", line 3761, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3655, in get_loc
    raise KeyError(key) from err
KeyError: 'noiseFormula'

So the problem is rather the order of the checks. And whether we want stop upon the first error, or continue checking other files.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。