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 摘要。