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

Add object sid in error messages #396

Open
matthiaskoenig opened this issue Sep 3, 2024 · 2 comments
Open

Add object sid in error messages #396

matthiaskoenig opened this issue Sep 3, 2024 · 2 comments

Comments

@matthiaskoenig
Copy link

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.

@luciansmith
Copy link
Member

In general, we do indeed try to include the SIds and other identifying information in the error messages. We can fix these messages in particular, but as you find other errors without the SIds, let us know so we can find those and fix them, too.

@luciansmith
Copy link
Member

(Actually, if you could report the error number, that would make it easier to find.)

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