311 implement a rule management interface#540
Conversation
…le-management-interface
CodSpeed Performance ReportMerging #540 will not alter performanceComparing Summary
|
|
Hmm, codecov is having trouble with the coverage reports. These warnings are not related to #334, since they pre-date it: |
|
This won't be ready until:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #540 +/- ##
==========================================
+ Coverage 97.39% 97.45% +0.06%
==========================================
Files 100 102 +2
Lines 4336 4408 +72
==========================================
+ Hits 4223 4296 +73
+ Misses 113 112 -1 ☔ View full report in Codecov by Sentry. |
This reverts commit e32e054.
… we actually try to add a rule
There was a problem hiding this comment.
Pull Request Overview
This PR implements a rule management interface and updates various output messages to reflect the new terminology. Key changes include:
- Revising messages from “Enabling/Disabling” to “Selecting/Deselecting” for Ruff rules.
- Introducing a new CLI command for rule management via the “usethis rule” interface.
- Updating tests and documentation to reflect the new command and messaging.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/usethis/_tool/impl/test_ruff.py | Updated expected output messages to use “Selecting” instead of “Enabling”. |
| tests/usethis/_interface/test_tool.py | Added a new test ensuring the deptry command runs successfully. |
| tests/usethis/_interface/test_rule.py | Added tests for the rule management interface (select, deselect, ignore, unignore). |
| tests/usethis/_core/test_rule.py | Updated tests covering rule selection and deselection behaviors. |
| tests/usethis/_core/test_docstyle.py | Updated the expected docstyle message to use “Selecting” for rules. |
| tests/usethis/_core/test_core_tool.py | Revised messages in tests to use “Deselecting” for rules. |
| src/usethis/_tool/impl/ruff.py | Changed tick_print messages to consistently use “Selecting” and “Deselecting” wording. |
| src/usethis/_tool/impl/deptry.py | Added an info_print message for deptry to indicate that its rules are implicitly selected. |
| src/usethis/_tool/base.py | Extended the tool interface with a new unignore_rules method. |
| src/usethis/_interface/rule.py | Introduced the new rule management CLI command. |
| src/usethis/_core/rule.py | Implemented functions for mapping and managing rules for Ruff and Deptry. |
| src/usethis/_app.py | Registered the new rule command in the CLI application. |
| pyproject.toml | Updated layer configuration to include the new “rule” interface. |
| README.md | Revised documentation to reflect the new rule command and updated output messages. |
No description provided.