Menu

#280 Need new validation errors to complement unit warnings

closed
nobody
5
2017-12-06
2015-02-03
No

When unit problems became warnings instead of errors with the advent of l2v4, validation rules that had been errors became warnings. Unfortunately, this means that if unit attributes (such as the 'substanceUnits' attribute on a Species) references a unit that doesn't exist at all, this is only a warning, and not an error. This means that if we want a model with 'substanceUnits="doesNotExist"' to be a validation error and not a warning, we would need to create new validation errors for all the various 'unit' attributes in SBML.

Discussion

  • Lucian Smith

    Lucian Smith - 2015-02-03

    To be more clear: in L2v3, you could have a single error message, paraphrased:

    "The 'substanceUnits' of a Species must be a predefined substance unit, or reference a UnitDefinition derived from substance."

    And this would cover all our bases.

    Now that unit consistency errors are now warnings, we need two messages, one with 'must', and one with 'should':

    "The 'substanceUnits' of a Species must be a predefined unit, or reference a UnitDefinition in the model."

    "The 'substanceUnits' of a Species should be a predefined substance unit, or reference a UnitDefinition derived from substance."

     
  • Michael Hucka

    Michael Hucka - 2015-04-22

    What if there were a single validation rule that covered all unit references, and basically said that if a unit is specified, it must be either a predefined unit or a UnitDefinition in the model? In other words, find a way to have a blanket error validation rule for any time that a unit is specified but doesn't exist.

     

    Last edit: Michael Hucka 2015-04-22
  • Lucian Smith

    Lucian Smith - 2015-04-22

    By common consent at the SBML editors' meeting 2015 HARMONY, we will add a single new validation rule that covers all of these situations.

     
  • Lucian Smith

    Lucian Smith - 2015-04-22
    • status: open --> pending
    • Group: Reported-Proposed --> Accept-conformance-implications
     
  • Sarah Keating

    Sarah Keating - 2015-04-23

    Can I clarify ?

    Does this mean a change to the L2V5 spec as well as L3V2 ?

     
    • Lucian Smith

      Lucian Smith - 2015-04-23

      Yes--the validation rule is missing from both specifications.

       
  • Lucian Smith

    Lucian Smith - 2015-04-23

    Here's what I came up with for the text of the validation rules:

    L2v5:

    "10313. Unit identifier references (that is, the units attribute on Compartment, the units attribute on Parameter, and the substanceUnits attribute on Species) must be the identifier of a UnitDefinition in the Model, or the identifier of a predefined unit in SBML, that is, any of the following base units: “ampere”, “becquerel”, “candela”, “coulomb”, “dimensionless”, “farad”, “gram”, “gray”, “henry”, “hertz”, “item”, “joule”, “katal”, “kelvin”, “kilogram”, “litre”, “lumen”, “lux”, “metre”, “mole”, “newton”, “ohm”, “pascal”, “radian”, “second”, “siemens”, “sievert”, “steradian”, “tesla”, “volt”, “watt”, or “weber”. (References: L2V4 Section 4.4.2; L2V5 Section 4.4.2.)

    L3v2:

    "10313. Unit identifier references (that is, the units attribute on Compartment, the units attribute on Parameter, the units attribute on LocalParameter, the substanceUnits attribute on Species, the SBML units attribute on MathML ci elements, and the substanceUnits, volumeUnits, areaUnits, lengthUnits, timeUnits and extentUnits on Model) must be the identifier of a UnitDefinition in the Model, or the identifier of a predefined unit in SBML, that is, any of the following base units: “ampere”, “avogadro”, “becquerel”, “candela”, “coulomb”, “dimensionless”, “farad”, “gram”, “gray”, “henry”, “hertz”, “item”, “joule”, “katal”, “kelvin”, “kilogram”, “litre”, “lumen”, “lux”, “metre”, “mole”, “newton”, “ohm”, “pascal”, “radian”, “second”, “siemens”, “sievert”, “steradian”, “tesla”, “volt”, “watt”, or “weber”. (References: SBML L3v1 Section 4.4.2; SBML L3V2 Section 4.4.2 on p. 41.)"

    Note that the list of attributes is slightly different in the two specs, and that the list of units themselves has 'avogadro' added for L3v2. I put the references for both for both L2v4 and L3v1, since both of those specs had this constraint; we just didn't have an explicit validation rule for it.

     
  • Lucian Smith

    Lucian Smith - 2015-05-13

    Added to both L2v4 and L3v1 errata pages, and updated in SVN. This will be incorporated into the next release candidates of L2v5 and L3v2.

     
  • Lucian Smith

    Lucian Smith - 2015-05-13
    • status: pending --> closed
     
  • Lucian Smith

    Lucian Smith - 2016-10-04
    • status: closed --> open
     
  • Lucian Smith

    Lucian Smith - 2016-10-04

    It turns out that this new validation rule (10313) makes the old Parameter-specific rule (20701) redundant--shall we remove 20701 entirely from l3v1r2 and l3v2?

     
  • Nicolas Le Novère

    OK

     
  • Andreas Dräger

    Andreas Dräger - 2016-10-18

    Ok, too. Question: will this apply to SBML L3V1R2 as well?

     
  • Lucian Smith

    Lucian Smith - 2016-10-18

    As it stands, the new rule 10313 ('referenced units must exist') is only added to l3v2, not to l3v1r2. The reasoning is that adding the rule would make old models suddenly invalid, which we usually try to avoid. This can be revisited, but was my interpretation of that spreadsheet we created a while back about which changes should apply to which level/versions.

    As such, rule 20701 (which is rule 10313, but only for Parameters), would only be removed from l3v2.

    I should also note that 10313 is mistakenly flagged with a green star instead of a red checkbox in l3v2 rc1. I already fixed that in SVN.

     
  • Brett Olivier

    Brett Olivier - 2016-10-19

    OK

     
  • Sarah Keating

    Sarah Keating - 2016-10-25

    I would be careful about removing it - since we generally remove a rule if is is not applicable. If people look at see the rule no longer applies they may think that a model that failed it in the past is now valid - which of course it is not ; it just fails a differently numbered rule.

    I would leave it in L3V2 with a footnote that this is now encompassed by 10313 - and then remove it in later versions.

    But I will concede rather than hang the vote :-)

     
  • Lucian Smith

    Lucian Smith - 2016-10-25

    I would definitely not remove the rule and say 'this doesn't apply to this level/version', like we normally do. I would instead say as you suggest, "This rule has been superceded by rule 10313."

     
  • Lucian Smith

    Lucian Smith - 2016-11-01
    • status: open --> pending
     
  • Lucian Smith

    Lucian Smith - 2016-11-01

    Rule 20701 has now been changed in both l3v1r2 and l3v2 to say that it is superceded by rule 10313. In l3v1r2, it is red, and includes the original rule as a footnote; in l3v2 there is no footnote and the text is black. Either can be changed if need be--if so, just re-open this tracker item.

     
  • Lucian Smith

    Lucian Smith - 2017-12-06
    • status: pending --> closed
     
  • Lucian Smith

    Lucian Smith - 2017-12-06

    With the release of l3v2, this issue is now resolved.

     

Log in to post a comment.