Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator does not check for required column noiseFormula in observables table #219

Open
dweindl opened this issue Jul 25, 2023 · 0 comments

Comments

@dweindl
Copy link
Member

dweindl commented Jul 25, 2023

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

See also PEtab-dev/PEtab#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant