Add ruff linting#44
Draft
Pierre Siddall (Pierre-siddall) wants to merge 37 commits into
Draft
Conversation
Copilot started reviewing on behalf of
Pierre Siddall (Pierre-siddall)
June 30, 2026 09:15
View session
There was a problem hiding this comment.
Pull request overview
This PR introduces Ruff as the Python linter in the CI pipeline, replacing the previously committed Pylint configuration.
Changes:
- Removed the legacy
Utilities/pylint.rc. - Added Ruff configuration (
ruff.toml) and a new GitHub Actions workflow to run Ruff on pull requests. - Added a second Ruff config under
.github/ruff.toml(currently duplicative/inconsistent with the root config).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
Utilities/pylint.rc |
Removes the old Pylint configuration file from the repo. |
ruff.toml |
Adds Ruff configuration for linting/formatting settings. |
.github/workflows/ruff-lint.yaml |
Adds a PR-triggered workflow to run Ruff in CI. |
.github/ruff.toml |
Adds an additional Ruff config file under .github/ (currently duplicates root config with small differences). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+9
| [lint] | ||
| select=["A","CPY","PLR0904","PLR0911","PLR0912","PLR0913","PLR0914","PLR0915","F901", | ||
| "B014","B025","B025","B033","PIE794","PYI016","PYI062","PT014","SIM101","PLE0241","RUF068", | ||
| "FIX"] | ||
| ignore=[] |
Comment on lines
+1
to
+9
| line-length = 80 | ||
| indent-width = 4 | ||
| preview = true | ||
|
|
||
| [lint] | ||
| select=["A","CPY","PLR0904","PLR0911","PLR0912","PLR0913","PLR0914","PLR0915","F901", | ||
| "B014","B025","B025","B033","PIE794","PYI016","PYI062","PT014","SIM101","PLE0241","RUF068", | ||
| "FIX","PLR6301"] | ||
| ignore=[] |
Comment on lines
+5
to
+9
| [lint] | ||
| select=["A","CPY","PLR0904","PLR0911","PLR0912","PLR0913","PLR0914","PLR0915","F901", | ||
| "B014","B025","B025","B033","PIE794","PYI016","PYI062","PT014","SIM101","PLE0241","RUF068", | ||
| "FIX","PLR6301"] | ||
| ignore=[] |
Comment on lines
+11
to
+14
| - name: Run Ruff Linter | ||
| uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0 | ||
| with: | ||
| version: latest |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Code Reviewer:
This PR aims to add a ruff linting action to the MOCI CI/CD pipeline and convert the current pylint.rc file to the ruff equivalent using a ruff.toml file
closes #15
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
readability of the code
Testing
acceptable (eg. kgo changes)
tests, unit tests, etc.)
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy
(including attribution labels)
Documentation
confirmed that it builds correctly
Code Review