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

Better keyval reading in Python #2965

Open
4 tasks
Lestropie opened this issue Aug 15, 2024 · 0 comments
Open
4 tasks

Better keyval reading in Python #2965

Lestropie opened this issue Aug 15, 2024 · 0 comments
Labels

Comments

@Lestropie
Copy link
Member

There's currently a mismatch between the implementation of utils.load_keyval() and the relevant comment (which reflects original intent). It ignores all content after comment symbols. However with #1609, numeric text files now have key-value-based comments.

Currently, the only use of that function is to parse the output of transformcalc decomp in population_template.

  • Read key-values as plain text; don't do any splitting of lines.
  • Fix construction of multi-line fields as lists of strings.
  • Give capability to read key-values from the comments themselves, rather than from everything other than the comments.
  • Give matrix module functions ability to populate both matrix data and header key-values in a single pass of the file, similar to what is done by the numerical text data read functions in C++.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant