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
ParameterHandler::print_parameters(): Demangle JSON #13815
Conversation
Co-authored-by: Peter Munch <peterrmuench@gmail.com>
/rebuild |
I think this PR is causing some unintended consequences in ASPECT, but I am not sure if it is deal.II's fault or how we use it. Our parameters contain a bunch of keys named "deprecation_status", which are apparently created by the function
I guess in the end the question is: Are underscores valid characters for parameter names in deal.II? If so, can we change this modification to not accidentally try to demangle these underscores? |
Makes sense. I can take a look this weekend if nobody else beats me to it l. |
@gassmoeller Thanks for your notice. Unfortunately I did not test the behavior in case of an alias parameter. I was able to reproduce your issue and hopefully also already found the problematic line, see this patch. Now, the 65,69d64
< },
< "double 3":
< {
< "alias": "double 2",
< "deprecation_status": "false"
89,94c84
< "double 2": "4.321",
< "double 3":
< {
< "alias": "double 2",
< "deprecation_status": "false"
< }
---
> "double 2": "4.321" If you are happy with that, I'll open a follow-up PR including the fix and also an extension of the test case with alias parameters. FYI @tjhei |
That looks good! Thank you. |
Looks good to me, feel free to open a PR. Thanks for the quick fix! 👍 |
ParameterHandler::print_parameters(): Demangle JSON
In this PR, we propose to demangle the parameters in case of
ParameterHandler::OutputStyle::JSON
orParameterHandler::OutputStyle::ShortJSON
prior to printing them withinParameterHandler::print_parameters()
. Otherwise, the output is not really readable, e.g., for the key-value pair ofprinting the output ends up in
@peterrum @nmuch