Implement usethis doc and usethis init --doc#854
Merged
nathanjmcdougall merged 2 commits intomainfrom Jul 15, 2025
Merged
Conversation
Closed
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
CodSpeed Instrumentation Performance ReportMerging #854 will not alter performanceComparing Summary
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new usethis doc command and integrates it into both the standalone doc interface and the usethis init workflow, along with accompanying tests and documentation updates.
- Introduce
docCLI command and wire it intoappandinit - Implement
use_doc_frameworksin the toolset and updateinitlogic - Update tests, README, and pyproject layers to reflect the new documentation framework support
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/usethis/_interface/test_test.py | Renamed test class to TestTest for the test interface |
| tests/usethis/_interface/test_init.py | Added expected doc-related output lines in init tests |
| tests/usethis/_interface/test_doc.py | New tests for the doc command |
| src/usethis/_toolset/doc.py | Added use_doc_frameworks wrapper around use_mkdocs |
| src/usethis/_interface/tool.py | Tweaked mkdocs help text |
| src/usethis/_interface/init.py | Added --doc/--no-doc option and execution in init |
| src/usethis/_interface/doc.py | New doc command implementation |
| src/usethis/_app.py | Registered the doc command in the CLI |
| pyproject.toml | Included doc layer in interface configuration |
| README.md | Documented the new usethis doc command |
Comments suppressed due to low confidence (3)
tests/usethis/_interface/test_test.py:11
- [nitpick] The class name
TestTestis ambiguous. Consider renaming it to something more descriptive likeTestTestCommandto clarify the purpose of this test class.
class TestTest:
src/usethis/_interface/doc.py:13
- The docstring incorrectly mentions a testing framework; it should reference a documentation framework (e.g., MkDocs).
"""Add a recommended testing framework to the project."""
tests/usethis/_interface/test_doc.py:11
- Consider adding tests for the
--removeand--howflags (and other options likeoffline,quiet,frozen) to ensure comprehensive coverage of theusethis doccommand.
class TestDoc:
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.
No description provided.