PEtab-dev / PEtab-dev/libpetab-python

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

オープン
#219 コメント 0 件 リアクション 0 件 担当者 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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。