PEtab-dev / libpetab-python

Python package for working with PEtab files
https://libpetab-python.readthedocs.io
MIT License
14 stars 6 forks source link

PEtab lint requires indices #308

Open PaulJonasJost opened 1 week ago

PaulJonasJost commented 1 week ago

I noticed that petab_lint requires for some tables specific indices (see e.g. check_observables_df line 301). I was wondering whether there is a specific reason for this or whether one could relax this to the corresponding column (in the example case observableId).

dweindl commented 1 week ago

The reason is mostly that it's somewhat annoying to deal with different inputs in every function. If you load a PEtab problem using Problem.from_yaml, the index will be set correctly. If you want to load individual tables, you can use the get_XXX_df() functions, which will do the same. You can pass either a path or an existing DataFrame.