Document offline validation as the default and add test (#246)#281
Open
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
Open
Document offline validation as the default and add test (#246)#281dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
Conversation
|
It's very helpful work! Thank you @dyrpsf The BioModels repository is struggling with the consistency check. |
Contributor
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.