-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ruff #184
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 15 out of 30 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- .github/workflows/black.yml: Language not supported
- .github/workflows/flake8.yml: Language not supported
- chandra_aca/centroid_resid.py: Evaluated as low risk
- chandra_aca/darkbins.py: Evaluated as low risk
- chandra_aca/dark_model.py: Evaluated as low risk
- chandra_aca/attitude.py: Evaluated as low risk
- chandra_aca/tests/test_attitude.py: Evaluated as low risk
- chandra_aca/drift.py: Evaluated as low risk
- chandra_aca/aca_image.py: Evaluated as low risk
- chandra_aca/tests/test_aca_image.py: Evaluated as low risk
- chandra_aca/tests/test_all.py: Evaluated as low risk
- chandra_aca/plot.py: Evaluated as low risk
- chandra_aca/planets.py: Evaluated as low risk
- chandra_aca/tests/test_dark_model.py: Evaluated as low risk
- chandra_aca/star_probs.py: Evaluated as low risk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, thanks!
PS I hadn't asked for review yet until #174 is reviewed and merged. |
Oops, I guess I just got excited. And ruff review is about where I'm at today. |
I think this is ready for review. I tried to separate the auto ruff pieces from my manual fixes in the separate commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 15 out of 30 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- .github/workflows/black.yml: Language not supported
- .github/workflows/flake8.yml: Language not supported
- chandra_aca/darkbins.py: Evaluated as low risk
- chandra_aca/attitude.py: Evaluated as low risk
- chandra_aca/dark_model.py: Evaluated as low risk
- chandra_aca/tests/test_attitude.py: Evaluated as low risk
- chandra_aca/drift.py: Evaluated as low risk
- chandra_aca/aca_image.py: Evaluated as low risk
- chandra_aca/tests/test_all.py: Evaluated as low risk
- chandra_aca/tests/test_aca_image.py: Evaluated as low risk
- chandra_aca/planets.py: Evaluated as low risk
- chandra_aca/plot.py: Evaluated as low risk
- chandra_aca/centroid_resid.py: Evaluated as low risk
- chandra_aca/tests/test_dark_model.py: Evaluated as low risk
- chandra_aca/star_probs.py: Evaluated as low risk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all looks good. Thanks for the way you separated all the by-hand changes, this made the review much easier!
I made the same comment twice. Both versions you put in will give the right answer, so I'm OK with just merging this as-is.
if blobs and frames: | ||
raise ValueError("Specify only one of 'blobs' or 'frames'") | ||
if (not blobs and not frames) or (frames and blobs): | ||
raise ValueError("Specify one and only one of 'blobs' or 'frames'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeating the comment, basically that the version in 9d0a53 was actually correct.
OK, the original logic was unnecessarily complex. It was
assert frames XOR blobs # one and only one of frame/blobs is set
However, the statement before ensures that at least one of them is always set, so then here (indeed) you can just check blobs and frames
.
Maybe it would be worth a documentation update to reflect that if neither is set, then frames
is the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the other comment on code that got changed, so it might not show up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see everything!
Regarding "so I'm OK with just merging this as-is." Thanks! I think it was a good point in your original review that the change wasn't logically equivalent. It was a process mistake on my part to try to simplify that logic a bit but not call appropriate attention to it in review. I think at least the change has had appropriate review (thanks!) and if we want to do some more simplification, at least it is starting with passing ruff! |
Description
Ruff
Interface impacts
Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
No functional testing.