-
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 #451
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.
PR Overview
This PR implements configuration and formatting updates for Ruff integration along with minor code style improvements across several project files. Key changes include the addition of new Ruff configuration files and GitHub workflows, updates to pre-commit hooks, and refactoring of various file formatting and import statements.
Reviewed Changes
File | Description |
---|---|
ruff.toml, ruff-base.toml | Introduce and configure Ruff linting settings. |
.github/workflows/python-formatting.yml | Add a GitHub Actions workflow to check code formatting using Ruff. |
.pre-commit-config.yaml | Configure Ruff hooks for pre-commit checks. |
.github/workflows/python-linting.yml | Add a GitHub Actions workflow for Ruff linting. |
setup.py | Minor formatting adjustment. |
starcheck/server.py | Update print formatting and add a comment discouraging global variable usage. |
starcheck/pcad_att_check.py | Update string quoting for consistency and improve formatting in tests. |
starcheck/utils.py | Rearranged imports and added strict control in zip iterations for consistency. |
starcheck/state_checks.py | Update docstrings and adjust import order. |
starcheck/plot.py | Reformat function parameters and remove an unused import. |
starcheck/tests/* | Update test functions to include strict matching in zip calls. |
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
starcheck/server.py:85
- [nitpick] Consider refactoring the use of the global variable 'KEY' (e.g. via dependency injection) to improve code maintainability.
global KEY # noqa: PLW0603 Using the global statement to update `KEY` is discouraged
starcheck/plot.py:7
- [nitpick] Verify if the removal of the 'plot_compass' import from chandra_aca.plot is intentional; if not needed, ensure any related dead code is also removed.
from chandra_aca.plot import bad_acq_stars, plot_stars
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 went through all the manual changes, looks good to me!
Description
Ruff the starcheck Python.
Interface impacts
Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
4 recent loads run in regression against master at
https://icxc.cfa.harvard.edu/aspect/test_review_outputs/starcheck/starcheck-pr451/
Only minimal expected diffs seen.