Skip to content
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

Fix non-mandatory event IDs #255

Merged
merged 2 commits into from
Aug 30, 2023
Merged

Fix non-mandatory event IDs #255

merged 2 commits into from
Aug 30, 2023

Conversation

exaexa
Copy link
Collaborator

@exaexa exaexa commented Aug 28, 2023

Mainly fixes #254 using approach #1. As a result, some new SBML usecases can be loaded.

I packed in the UL logo update (the original relied on line width setting and rendering, which is typically broken.

Also bumping to 1.5.0 (the new loadable models are a feature, also see discussion in the commits).

Closes #254

SBML says that IDs on events are actually not mandatory, this softens the data
structure so that the ID-less events are supported. The vector-of-pairs
implementation is chosen for backwards compatibility (iteration through a
vector of pairs should work precisely like iteration through the dictionary
that was there before). Notably, this might look like a breaking change _but_
it is not -- the main use case that is broken by this commit is indexing the
events by ID, which was actually broken already.
@exaexa
Copy link
Collaborator Author

exaexa commented Aug 28, 2023

cc @sebapersson -- I added one of the models you reported as a test so this should technically work, but it would ne great if you could check if your usecase is solved. Thanks!

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a30bd51) 93.51% compared to head (df38e09) 93.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #255   +/-   ##
=======================================
  Coverage   93.51%   93.51%           
=======================================
  Files          10       10           
  Lines         817      817           
=======================================
  Hits          764      764           
  Misses         53       53           
Files Changed Coverage Δ
src/structs.jl 95.00% <ø> (ø)
src/readsbml.jl 98.34% <100.00%> (ø)
src/writesbml.jl 96.21% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@paulflang paulflang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me!

@sebapersson
Copy link
Contributor

cc @sebapersson -- I added one of the models you reported as a test so this should technically work, but it would ne great if you could check if your usecase is solved. Thanks!

Thanks, it now works for my usercase.

@exaexa
Copy link
Collaborator Author

exaexa commented Aug 30, 2023

Perfect, thanks all for confirms!

@exaexa exaexa merged commit 1c7c5e3 into master Aug 30, 2023
14 checks passed
@exaexa exaexa deleted the mk-fix-event-ids branch August 30, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

readSBML fails on SBML semantic test case 00928
4 participants