-
Notifications
You must be signed in to change notification settings - Fork 1
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
Modernize Python code with ruff, CI, pre-commit #85
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.
For this, did you want me to do the functional testing by running a test arc before doing a review?
@jeanconn - I did the functional testing and documented it in the description. |
print(hrc_shield[ok].mean(), times[ok].mean(), file=f) | ||
|
||
# For GOES earlier than 16: | ||
# for colname, scale, filename in zip( | ||
# ('p2', 'p5'), (3.3, 12.0), ('p4gm.dat', 'p41gm.dat')): | ||
# GOES-16, ``scale`` TBD | ||
for colname, scale, filename in zip( | ||
('p4', 'p7'), (3.3, 12.0), ('p4gm.dat', 'p41gm.dat')): | ||
("p4", "p7"), (3.3, 12.0), ("p4gm.dat", "p41gm.dat"), strict=False |
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.
It seems a little odd to be explicit about strict=False
, but that matches the default behavior so that's fine.
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.
That's a ruff thing, trying to highlight that the default for zip
is prone to subtle bugs. In this case it is a bit silly but harmless.
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.
Yeah, I knew this was a ruff thing in context - though I wondered if it would make sense to just use strict=True in these use cases if one is going to bother to add the strict keyword.
Description
This follows Configuration-for-linting-and-formatting-with-ruff to bring the Python code in
arc
up to basic modern standards for format and lint checking.This PR is most easily reviewed by looking at the individual commits. There should be very little that is controversial.
Interface impacts
None.
Functional testing on kady
Results at: https://icxc.cfa.harvard.edu/aspect/test_review_outputs/arc/pr85/arc3/
The output plots look fine and there were no processing errors.
In flight ska3 on kady: