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

Update unknown keyword validation and throw error for files other than the mdu file #643

Open
MRVermeulenDeltares opened this issue May 30, 2024 · 0 comments
Assignees
Labels
type: compatibility Changes needed to be compatible with the computational core

Comments

@MRVermeulenDeltares
Copy link
Contributor

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.

@tim-vd-aardweg 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
@priscavdsluis priscavdsluis added the type: compatibility Changes needed to be compatible with the computational core label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: compatibility Changes needed to be compatible with the computational core
Projects
None yet
Development

No branches or pull requests

3 participants