Skip to content

Conversation

bendudson
Copy link
Contributor

@bendudson bendudson commented Aug 15, 2022

In BOUT++ next (not master) if input values contain unbalanced brackets or parentheses ('[]' or '()') then reading continues to the next line. This allows long expressions (or lists in Hermes-3) to be spread over multiple lines.

The corresponding code in BOUT++ is here: https://github.com/boutproject/BOUT-dev/blob/next/src/sys/options/options_ini.cxx#L132
Looking at this again, that line should probably be while (count == 0)

Fixes #73.

bendudson and others added 2 commits August 15, 2022 12:01
If brackets are unbalanced then the line continues on the next line.
Need to merge together the values and comments.
@bendudson bendudson changed the title Multiline comments Multiline values Aug 15, 2022
@johnomotani
Copy link
Contributor

I suspect the lint CI is failing because version 5.0.x of flake8 has broken reading its configuration (I think they were on 5.0.0 a month or so ago, and seem to be up to 5.0.4 already so I guess they're working hard!). I had a similar problem on another repo. I think it's OK to just ignore that failure for now, and give flake8 a bit longer to iron its bugs out. We could also pin flake8 to 4.x, but we'd just have to keep checking if they've fixed things and change it later - something to think about if it keeps being a problem for a long time IMO.

Copy link
Contributor

@johnomotani johnomotani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Would be nice to have a test, but we don't have tests of reading a BOUT.inp at the moment, so happy to leave testing as a note on #20.

@johnomotani johnomotani mentioned this pull request Aug 15, 2022
@johnomotani johnomotani added the bug Something isn't working label Aug 15, 2022
@johnomotani johnomotani merged commit 174b500 into master Sep 1, 2022
@johnomotani johnomotani deleted the multiline-comments branch September 1, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No support for new Hermes-3 input style
2 participants