Port improved comp flattening from eikept/jsbml and run tests #277
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 part of #251 by porting the improved comp flattening implementation
from the
eikept/jsbmlfork and wiring it into the currentjsbml-compmodule.Main changes
CompFlatteningConverterwith the version from theeikept/jsbmlfork,which provides a more complete flattening implementation for the comp package
(including proper handling of ReplacedElement/Deletion chains, conversion factors,
and nested submodels).
CompFlatteningIDExpanderCompFlatteningIDExpanderTSmergeModelsmethod to merge the “current” (parent) model beforethe previously-flattened submodels. This preserves the original parameter ordering,
so that flattened output matches the existing
testFlattening/testN_flat.xmlexpectations (e.g. for test6).
Testing
From this branch I ran:
Results:
testSpecificFile and the individual flattening/internalisation tests now pass for the local testFlattening and testGathering data.
testAllData now exercises the full testFlattening suite; there is still one mismatch reported via Success Testing Model (this was previously flagged in the test with a TODO comment).
testInternaliseExternalModelDefinitions_online still errors due to the remote URL (https://sbmlteam.github.io/jsbml/test/data/comp/simple_online_url.xml) returning a 301 HTML redirect instead of SBML; this looks like a test-data/ hosting issue rather than an algorithm problem.
I’ve kept those two behaviours unchanged but can help adjust the tests if you
prefer (e.g. updating the URL to a raw SBML resource or marking the online test
as integration-only).