Skip to content

Conversation

@lgsmith
Copy link
Contributor

@lgsmith lgsmith commented Apr 8, 2025


name: lbf fixup
about: fixes subsetting in prebuilt tool long-bond-finder
title: 'Long bond finder subset fix'
labels: 'bug-fix'
assignees: ''

Found a small but critical error in long-bond finder that makes its subsetting selection fail--it didn't call prune-bonds after subsetting.

Changes proposed in this pull request

- added call to prune bonds for scope if scope has bonds.
    - If model doesn't have all bonds, this test is skipped.

Checklist

- no open issue is addressed.
- Have you applied a formatter to your code (e.g. flake8 or black for python, clang-format for C++)? Yes.

Copy link
Member

@agrossfield agrossfield left a comment

Choose a reason for hiding this comment

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

It looks fine, but I have a very minor request:

Around lines 239 and 241, you've got if test without braces to indicate scope. It's correct as is, but please put the {} in, so someone in the future doesn't make a silly mistake.

Also, most of the changes are braces moving from the same line to the next line. I don't care one way or the other, but I thought it was weird.

Cheers,

Alan

@lgsmith
Copy link
Contributor Author

lgsmith commented Apr 8, 2025

I think my formatter did that. It seems to prefer:

if (test)
{
   statement;
}

to

if (test) {
  statement;
}

I changed them all to the latter, and added braces to each clause. Is that OK?

@agrossfield agrossfield merged commit 96a138c into GrossfieldLab:main Apr 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants