-
-
Notifications
You must be signed in to change notification settings - Fork 70
docs: replace black with ruff in contribution guide #292
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
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughDocumentation updates replace Black formatter references with Ruff throughout CONTRIBUTING.md, including badges, setup instructions, and configuration guidance to reflect the project's current tooling. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CONTRIBUTING.md (1)
71-82: Updateruff .to use explicit subcommands for clarity
ruff .is deprecated in current Ruff versions. The repository's pre-commit configuration (.pre-commit-config.yaml) already runs both linting and formatting separately via theruffandruff-formathooks. For manual verification, update the documentation to match this approach:-ruff . +ruff check . +ruff format .Alternatively, if the intent is only to verify without auto-formatting, use
ruff check .alone. This aligns with the actual pre-commit setup and prevents contributor confusion about what the command does.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CONTRIBUTING.md(4 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md
47-47: Images should have alternate text (alt text)
(MD045, no-alt-text)
47-47: Images should have alternate text (alt text)
(MD045, no-alt-text)
87-87: Link and image reference definitions should be needed
Duplicate link or image reference definition: "ruff"
(MD053, link-image-reference-definitions)
| - If implementing a new feature, include some documentation in docs folder. | ||
| - Make sure that your submission passes the [GH Actions build]. See "Testing and Standards below" to be able to run these locally. | ||
| - Make sure that your code is formatted according to the [black] standard (you can do it via [pre-commit]). | ||
| - Make sure that your code is formatted according to the [ruff] standard (you can do it via [pre-commit]). |
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.
Deduplicate link reference definitions ([ruff], and likely [pre-commit])
Right now [ruff] is defined twice (Line 42 and Line 87), and [pre-commit] appears to be defined twice (Line 41 and Line 86). This triggers markdownlint (MD053) and makes future edits error-prone.
Suggested fix: keep a single definition (commonly at the bottom of the file) and remove earlier duplicates:
-[pre-commit]: https://github.com/pre-commit/pre-commit
-[ruff]: https://github.com/astral-sh/ruff
...
[PEP8]: https://www.python.org/dev/peps/pep-0008
[Google Style Guide]: https://google.github.io/styleguide/pyguide.html
[pre-commit]: https://github.com/pre-commit/pre-commit
[ruff]: https://github.com/astral-sh/ruffAlso applies to: 42-42, 86-87
🤖 Prompt for AI Agents
In CONTRIBUTING.md around line 33 (duplicates also at lines 41-42 and 86-87),
there are duplicate reference definitions for [ruff] and [pre-commit]; remove
the earlier duplicate definitions and keep a single canonical definition
(preferably the bottom-of-file reference section), update any references if
necessary so they still resolve, and run markdownlint to confirm MD053 is
resolved.
CONTRIBUTING.md
Outdated
| -------------------------- | ||
|
|
||
| [](https://codecov.io/gh/projectmesa/mesa-geo) [](https://github.com/psf/black) | ||
| [](https://codecov.io/gh/projectmesa/mesa-geo) [](https://github.com/astral-sh/ruff) |
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.
Add alt text to badges to satisfy accessibility + markdownlint (MD045)
-[](https://codecov.io/gh/projectmesa/mesa-geo) [](https://github.com/astral-sh/ruff)
+[](https://codecov.io/gh/projectmesa/mesa-geo)
+[](https://github.com/astral-sh/ruff)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [](https://codecov.io/gh/projectmesa/mesa-geo) [](https://github.com/astral-sh/ruff) | |
| [](https://codecov.io/gh/projectmesa/mesa-geo) | |
| [](https://github.com/astral-sh/ruff) |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
47-47: Images should have alternate text (alt text)
(MD045, no-alt-text)
47-47: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents
CONTRIBUTING.md around line 47: the two inline badge images lack alt text which
triggers accessibility and markdownlint MD045; update the markdown image syntax
to include descriptive alt text for each badge (e.g., "Codecov badge" and "Ruff
code style badge") inside the square brackets before the parentheses, preserving
the existing links and titles so the badges render the same while satisfying
accessibility rules.
##Summary
This PR updates CONTRIBUTING.md to align the documentation with the project's actual development environment. The project previously switched to ruff for linting and formatting, but the contribution guide still referenced black.
Changes
Result
Related Issue Closes #291
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.