Partial upgrade of libsedml, fixed cli plot bugs#1627
Merged
CodeByDrescher merged 32 commits intomasterfrom May 1, 2026
Merged
Partial upgrade of libsedml, fixed cli plot bugs#1627CodeByDrescher merged 32 commits intomasterfrom
CodeByDrescher merged 32 commits intomasterfrom
Conversation
67af9ee to
006b089
Compare
84f97da to
5823a4c
Compare
… bug Fixed search paths
Fixes include logging, raising plot-pixel accurate thresholds, making code more convenient and/or easier to read / conceptualize (plus some improvements!).
fixed missed compiler errors, and remove bad comment
2fed76e to
1a99491
Compare
jcschaff
requested changes
Apr 29, 2026
Member
jcschaff
left a comment
There was a problem hiding this comment.
fail early when SimulationContext doesn't have a SBMLSymbolMapping in the SedMLImporter. make SedMLImporter.getSBMLSymbolMapping(simContext) throw IllegalStateException("no SBML importer registered for sim context " + simContext)
d740e7c to
bc21233
Compare
Contributor
Author
|
Note that issue #1673 was created to point out the flaws this PR leaves CLI mode in. Code is functional and passes all tests, but needs return work when priorities come around again. |
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.
Summary
Two largely independent changes bundled together:
package reorg into
org.jlibsedml.components.*,SEDML→SedMLnaming,new first-class
AxisandPlotabstractions, genericListOf<T>,and a
SedMLDataContainerfacade with model-pruning support.Bug fixes
Plot rendering (vcell-cli)
font now scales down (1pt per 100 chars of label, floor 8pt).
Results2DLinePlot.java(curve name → curve id → data-generator name/id) and explicit "Time"
detection for the x-axis.
PlottingDataExtractor.javaSId, not rawString.SpatialResultsConverter.java,ReorganizedSpatialResults.javaSED-ML import/export
swapped, producing wrong variable mappings in exported SED-ML.
SEDMLExporter.javastream.toMap, which fails on null values.SedMLImporter.javaSBMLImporteris keyed by
SimulationContext, notBioModel, so each applicationin a BioModel gets its own symbol table.
SedMLImporter.javaLinkedHashMap).instead of silent failures).
BiosimulationLog.javaDefensive fixes
cbit.vcell.math.Variable— null-checks and identity-validationunified into
rename(); constructor delegates so validation can't bebypassed.
SEDMLChooserPanel— tolerates SED-ML where a task references amissing model/simulation rather than NPE-ing the dialog.
[a-zA-z…]→[a-zA-Z…]) flagged byGitHub Advanced Security in
SedMLReader.jlibsedml partial upgrade
The local jlibsedml fork was reorganised to support the fixes above
and to model SED-ML constructs that were previously missing.
Restructure (mechanical):
org.jlibsedml.components.{model,output,task, simulation,algorithm,dataGenerator,listOfConstructs}.SEDML*→SedML*naming throughout (SedMLDocument,SedMLReader,SedMLWriter,SedMLImporter,SedMLUtil,SedMLTags, …).New infrastructure:
Axishierarchy (Axis,XAxis,YAxis,ZAxis,RightYAxis) with LINEAR/LOG10 type — needed for proper axis-labelpicking.
Plotsuperclass with axis, legend, and dimensionstate; cloneable.
ListOf<T>with order-preserving storage, id-basedlookup, recursive
searchFor, and duplicate-id guard.SedMLDataContainer— facade wrapping aSedMLplus namespaceand file-path metadata. Adds
pruneSedML()to remove danglingtask/datagenerator/output references (with cascading cleanup of
nested repeated-tasks) and
findByIdconvenience accessors.Calculationinterface; newAnalysissimulation type.equals/hashCodeonSedBase;clone()deep-copy onSedMLand all components.
Test infrastructure
SSIMComparisonTool— perceptual image comparison (StructuralSimilarity Index) replacing pixel-exact baseline matching for plot
Calculationinterface; newAnalysissimulation type.equals/hashCodeonSedBase;clone()deep-copy onSedMLand all components.
Test infrastructure
SSIMComparisonTool— perceptual image comparison (StructuralSimilarity Index) replacing pixel-exact baseline matching for plot
tests. A "Modified SSIM" variant applies a 5×5 Gaussian blur before
the structure term to tolerate sub-pixel font/rendering differences.
Threshold set to 0.90 MSSIM after iteration.
plot_result_0.png,plot_result_1.png,parabolic.png(replacingplot_0/1.png,Parabolic.png).TestComponents.java— first jlibsedml unit test, exercisesAxisparsing throughSedMLReader.Test plan
mvn test -Dgroups="Fast"passes(
SEDML_VCML_IT,SEDML_SBML_IT,BSTS_IT)tmatedebug step in.github/workflows/ci_cd.ymlbefore merge
Risk
mechanical; cross-module call sites have been adapted.
BioModel→SBMLImportertoSimulationContext→SBMLImporterchange is a real semantic shift — worth a careful look at
SedMLImportercallers in test runs.