-
Notifications
You must be signed in to change notification settings - Fork 1
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
Should we run some basic checks after parsing a model? #242
Comments
Thoughts @jonc125 @MauriceHendrix @skeating ? |
It's not a bad idea but I do want to be a bit careful. Depending on the validation my tests might be harder (probably not but I'd want to test it first) In any case I'd prefer to have an option to bypass the validation if I felt like it. |
I'm guessing there won't be much of a performance hit But we could definitely make the validation optional. Have some kind I'd want that anyway for the use case where users build a model from scratch through the API, or when they modify a model after loading it |
I don't might if the deaful is on for the validation |
Happy to start curating a list of possible checks, but let's not implement any yet. Some like thorough units checking would fail for most existing models, for instance... so we need to be selective! |
I agree this is important. Experience from libSBML would suggest having categories of tests that can be turned on/off. Some people just really dont care if something is not quite right but their model still runs and would get frustrated by a model not being read in just because of an error that they dont see as a problem. |
I guess that's what warnings are for? |
Yes but other people who want things to be strict and fail completely if there are discrepancies. Modellers come in all shapes and sizes 😄 |
Also if you're using cellmlmanip you wouldnt' want to filter warnings to see which ones to keep as warnings and which ones to show as an error to the user |
ha ha sure that's fair enough |
At the moment we have some methods to check the model makes sense:
Model.check_left_right_units_equal
and
testparser.py::check_rdf_identities(model)
testparser.py::check_dummy_assignment(model)
(I moved these last two into testing at one stage, as that was the only place they were used)
Should these be standard checks that occur after parsing a model? And maybe all hidden but called by some
validate()
method?The text was updated successfully, but these errors were encountered: