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

Support of SBML levels 1 and 2 #11

Open
Armavica opened this issue Aug 7, 2021 · 2 comments
Open

Support of SBML levels 1 and 2 #11

Armavica opened this issue Aug 7, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Armavica
Copy link

Armavica commented Aug 7, 2021

Hello,
Thank you for maintaining this project. I downloaded models from BioModels which are in SBML Level 2, hence incompatible with rust_sbml which follows the Level 3 specification. Is there a plan to support Level 2 (and possibly Level 1) in rust_sbml? If so, I would be very happy to contribute. What would be the best way to make the different levels coexist within the library?

@carrascomj
Copy link
Owner

carrascomj commented Aug 8, 2021

Hi,

It would be fantastic to support them. However, to give an answer about "best way", I would need to study the problem a bit.

Iff the Level 1 and 2 are merely a subset of Level 3, it could be implemented through #[serde(flatten)]. More likely, It may turn out to be the same problem as extensions, which is something that I am not very sure how to tackle best: I want to find some elegant way to mimic the "inheritance" of these extensions without duplicating too much code.

With that said, feel free to prototype and experiment! I am open to suggestions and PRs, of course.

P.D.: I need to write down a CONTRIBUTING file.

@carrascomj carrascomj added the enhancement New feature or request label Aug 8, 2021
@Armavica
Copy link
Author

Armavica commented Aug 8, 2021

Ok, thank you for your answer! From what I can see, it is unfortunately not just subsets: some fields that are optional in Level 2 are required in Level 3. I will experiment a bit and come back here later. I downloaded the 1017 curated models of Biomodels and have plenty of real-world examples to try (for information, 93 of them are Level 3 and the rest are Level 2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants