Coverage for bioimageio/spec/_internal/warning_levels.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-02 14:21 +0000

1from typing import Literal 

2 

3WarningSeverity = Literal[20, 30, 35] 

4WarningLevel = Literal[WarningSeverity, 50] 

5"""With warning level x validation warnings of severity >=x are raised. 

6Highest warning level 50/error does not raise any validaiton warnings (only validation errors).""" 

7 

8ERROR, ERROR_NAME = 50, "error" 

9"""A warning of the error level is always raised (equivalent to a validation error)""" 

10 

11ALERT, ALERT_NAME = 35, "alert" 

12"""no ALERT nor ERROR -> RDF is worriless""" 

13 

14WARNING, WARNING_NAME = 30, "warning" 

15"""no WARNING nor ALERT nor ERROR -> RDF is watertight""" 

16 

17INFO, INFO_NAME = 20, "info" 

18"""info warnings are about purely cosmetic issues, etc."""