Include a diff and update methods for namelists #153
Replies: 2 comments
-
Ah, nice! You may be interested in this somewhat-similar tool: https://github.com/aekiss/nmltab |
Beta Was this translation helpful? Give feedback.
-
Sorry for the very late reply, I'm only just getting over some illness. I think a content-based diff feature would be valuable, and if you are able to put something together then I'd be happy to include it. I'd encourage you to look at the project by @aekiss since he's been using that in production for a while now. The update feature that you suggest may exist already. There is a function in I can follow up later with more thoughts if you like. The short answer is that if it can exist easily alongside the rest of the module, then I think it would be a good addition. Also, I will move this to the discussion tab, since the conversation is likely to drift a bit. |
Beta Was this translation helpful? Give feedback.
-
Hello,
@kellekai and I have worked on some kind of tool to allow computing the differences between two name lists and updating them based on the differences. https://github.com/kellekai/CompareFortranNamelists
After discussing it, we thought that it might be interesting to include these features directly in your library if you think they will be helpful for the community.
The main idea would be to have an object returned by the
diff
method (see the current implementation we have). The this object could have some methods to generate a kind of report (see implementation).We can adapt those methods to use only the standard libraries and make the other libraries an optional dependency, to keep in line with the requirements given in the contributing guidelines.
Then, the update method would modify a name list using the
differences
object, modifying only those variables available in both name lists.Please @marshallward, let us know your thoughts about these features. In any case, both @kellekai and I will be able to only work in our free time, so the development will be slow.
Beta Was this translation helpful? Give feedback.
All reactions