Skip to content

Add object sid in error messages  #396

Open
@matthiaskoenig

Description

I am using SBML validation a lot. Often it is difficult to figure out what object creates the error in larger models. It would be very helpful to provide the sid and perhaps also the name name attribute for the object in the error message if these attributes are set.

I.e. currently the error message is for instance

ERROR    E0: SBML component consistency (core, L225, code)                                                                                                                                                     validation.py:189
         [Error] Invalid value for the 'units' attribute of a three-dimensional compartment                                                                                                                                     
         The value of the 'units' attribute on a <compartment> having 'spatialDimensions' of '3' is restricted.                                                                                                                 
         Reference: L3V2 Section 4.5.4                                                                                                                                                                                          
          The value of the 'units' attribute on a <compartment> having 'spatialDimensions' of '3' must be either 'volume', 'litre', or the identifier of a <unitDefinition> based on either 'litre', 'metre'                    
         (with 'exponent' equal to '3'), or 'dimensionless'.  

but would be much better as

ERROR    E0: SBML component consistency (core, L225, code)                                                                                                                                                     validation.py:189
         [Error] Invalid value for the 'units' attribute of a three-dimensional compartment with 'sid' of 'Vapical'                                                                                                                                  
         The value of the 'units' attribute on a <compartment> having 'spatialDimensions' of '3' is restricted.                                                                                                                 
         Reference: L3V2 Section 4.5.4                                                                                                                                                                                          
          The value of the 'units' attribute on a <compartment> having 'spatialDimensions' of '3' must be either 'volume', 'litre', or the identifier of a <unitDefinition> based on either 'litre', 'metre'                    
         (with 'exponent' equal to '3'), or 'dimensionless'.  

I.e. add the sid which directly allows to find the right object, here the right compartment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions