Open priscavdsluis opened 2 years ago
@arthurvd, I wonder the following: If the user is able to edit the header comment, should we also be able to read it?
Now we always write: written by HYDROLIB-core <version>
to INI files.
This makes sense, since it is true.
Should the header be "write-only"?
Is your feature request related to a problem? Please describe. Currently, it is not possible for a user to add custom header comments.
Originally posted by @veenstrajelmer in https://github.com/Deltares/HYDROLIB-core/issues/130#issuecomment-1272963902
Describe the solution you'd like
Possible technical solution Currently, In the
INIModel._to_document
function, a header variable is created with the contentwritten by HYDROLIB-core <version>
. Suggestion: this variable could also be class attribute that is customizable perParsableFileModel
instance.IF the comments should also be parsed from file we need to adjust the
Document.flatten
function to take into account theheader_comments