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

test case where parameters have units #83

Open
anandijain opened this issue Jan 26, 2022 · 1 comment
Open

test case where parameters have units #83

anandijain opened this issue Jan 26, 2022 · 1 comment

Comments

@anandijain
Copy link
Contributor

I'm writing some code in julia to test that an SBML file has valid units, and I've stumbled upon a proprietary model that uses parameters that have units (it was exported from SimBiology). I want to add a test to a public repo (SBML.jl) from this suite that uses this feature (parameters with units). I cannot seem to find one via grepping this repo. Is there such a test-case?

Any help with this would be really helpful, thank you

@luciansmith
Copy link
Member

The 'semantic' branch of the test suite tests elements of SBML that can be tested numerically: if you interpret the SBML incorrectly, you will get incorrect results. The problem with units is that they have no numerical impact on SBML at all, and therefore cannot be usefully included in the semantic tests. In other words, we can only check whether you got the answer "0.5", and can't check whether you correctly got "0.5 nm" vs. "0.5 mm".

We do also have the 'syntactic' branch which just tests internal model validity. All of the validation rules 105** in the SBML specification involve units, and therefore might be appropriate for your test? The syntactic tests are in the release and not in the source code; the link is https://github.com/sbmlteam/sbml-test-suite/releases/download/3.4.0/syntactic_tests.v3.4.0.zip (They're actually pulled from the validation tests in the libsbml source.) However, many of these models, while valid, lack numerical values for some or all of their elements, so again might not work for testing if something properly returns '0.5 nm'.

It may be that this also won't help your use case, and you'll have to make your own. Or, if you truly only need a single model, I could probably adjust an existing model to add units for you if you're unsure how to do this yourself (or you can just use the model you got from SimBiology for the purpose).

Do ask more questions if you have them, or if anything was unclear!

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

No branches or pull requests

2 participants