You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In #622 throwing an error when an unknown keyword is located in the mdu was added.
This should also be applied for all other models.
Some models in specific that need to be verified are:
CrossSectionDefinition
Meteo
DataBlockINIBasedModel
Structure
StorageNode
Describe the solution you'd like
When a file contains a unknown key, an error should be thrown/
Describe alternatives you've considered
Using files which contain no unknown keys.
Additional context
In #622 the throwing of an error was added via the INIBasedModel which in turn has the UnknownKeywordErrorManager class defined via the _get_unknown_keyword_error_manager method.
The UnknownKeywordErrorManager manages if an error should be thrown for the unknown keyword.
With this implementation the UnknownKeywordErrorManager was dissabled for a few models (see above), since these shown to have some issues with their respective _exclude_fields method, which is needed by the UnknownKeywordErrorManager .
These models are currently disabled by returning None instead of using the UnknownKeywordErrorManager defined in the INIBasedModel .
The wish is however that these classes can also use the UnknownKeywordErrorManager to throw an error when an unknown keyword is detected.
To do this, they will either need to use the UnknownKeywordErrorManager from the INIBasedModel or implement their own.
Besides that, the issue related to the _exclude_fields method during validation needs to be researched more in depth.
The text was updated successfully, but these errors were encountered:
tim-vd-aardweg
changed the title
Update unknown keyword validation and thrown error for files other than the mdu file
Update unknown keyword validation and throw error for files other than the mdu file
May 30, 2024
Is your feature request related to a problem? Please describe.
In #622 throwing an error when an unknown keyword is located in the mdu was added.
This should also be applied for all other models.
Some models in specific that need to be verified are:
Describe the solution you'd like
When a file contains a unknown key, an error should be thrown/
Describe alternatives you've considered
Using files which contain no unknown keys.
Additional context
In #622 the throwing of an error was added via the INIBasedModel which in turn has the UnknownKeywordErrorManager class defined via the _get_unknown_keyword_error_manager method.
The UnknownKeywordErrorManager manages if an error should be thrown for the unknown keyword.
With this implementation the UnknownKeywordErrorManager was dissabled for a few models (see above), since these shown to have some issues with their respective _exclude_fields method, which is needed by the UnknownKeywordErrorManager .
These models are currently disabled by returning None instead of using the UnknownKeywordErrorManager defined in the INIBasedModel .
The wish is however that these classes can also use the UnknownKeywordErrorManager to throw an error when an unknown keyword is detected.
To do this, they will either need to use the UnknownKeywordErrorManager from the INIBasedModel or implement their own.
Besides that, the issue related to the _exclude_fields method during validation needs to be researched more in depth.
The text was updated successfully, but these errors were encountered: