Document offline validation as the default and add test (#246)#281
Conversation
|
It's very helpful work! Thank you @dyrpsf The BioModels repository is struggling with the consistency check. |
Thank you for the feedback and for explaining the BioModels use case! I’m glad this change helps with your consistency checks. If you run into any other issues or notice cases where the offline validator behaves unexpectedly, I’d be happy to look into follow‑up improvements. |
draeger
left a comment
There was a problem hiding this comment.
Thanks for updating the documentation and for the smart test class that overrides the SBMLDocument. If possible, there is one word, I'd like to change in the JavaDoc text.
| * <p> The validation is currently performed using the | ||
| * SBML.org online validator (http://sbml.org/validator/).</p> | ||
| * | ||
| * <p>The validation is currently performed using the JSBML internal |
There was a problem hiding this comment.
Please change “currently“ to “primarily”.
This PR addresses #246.
Summary
SBMLDocument.checkConsistency()already delegates tocheckConsistencyOffline(), so offline validation is effectively the default. However, the Javadoc still claimed that validation was "currently performed using the SBML.org online validator". This PR:checkConsistency()continues to use the offline validator.Changes
Javadoc updates in
SBMLDocumentcore/src/org/sbml/jsbml/SBMLDocument.javacheckConsistencyOffline()Javadoc now explains that the offline validator is used by default when callingcheckConsistency(), and points tocheckConsistencyOnline()as the alternative.checkConsistency()Javadoc is updated to state that validation is performed using the JSBML internal offline validator, with the SBML.org online validator still available viacheckConsistencyOnline().New unit test
core/test/org/sbml/jsbml/test/SBMLDocumentValidationModeTest.javaTestDocumentsubclass ofSBMLDocumentthat overrides:checkConsistencyOffline()andcheckConsistencyOnline()and records which one is called.
checkConsistencyUsesOfflineValidatorByDefault()asserts that:checkConsistency()calls the offline variant,This guards against future regressions where
checkConsistency()might accidentally call the online validator again.Tests
Executed locally:
mvn -pl core test✅Test Results
The newly added regression test behaves as expected and passes successfully.