Merged
Conversation
Test the build is successful with `use_mkdocs`
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
CodSpeed Instrumentation Performance ReportMerging #823 will degrade performances by 8.07%Comparing Summary
Benchmarks breakdown
|
Collaborator
Author
|
Next steps:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new mkdocs tool in usethis, including core logic, CLI integration, dependency management, configuration handling, and tests.
- Introduce
MkDocsToolwith usage printing, dependency and config spec - Implement
add_docs_dirintegration and register file manager - Wire up
use_mkdocsin core logic and add CLI command
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/usethis/_tool/impl/test_mkdocs.py | Unit tests for MkDocsTool usage printing |
| tests/usethis/_integrations/mkdocs/test_core.py | Integration tests for add_docs_dir behavior |
| tests/usethis/_core/test_list.py | Include MkDocs in tool listing tests |
| tests/usethis/_core/test_core_tool.py | Add use_mkdocs add/remove/how tests in core tool |
| src/usethis/_tool/impl/pyproject_toml.py | Register MkDocsTool among other tools |
| src/usethis/_tool/impl/mkdocs.py | Implement MkDocsTool: usage, deps, config spec, file management |
| src/usethis/_tool/base.py | Add get_doc_deps, add_doc_deps, remove_doc_deps to base tool |
| src/usethis/tool/all.py | Include MkDocsTool in ALL_TOOLS list |
| src/usethis/_interface/tool.py | Add mkdocs CLI command and register in runner |
| src/usethis/_integrations/mkdocs/core.py | Create add_docs_dir helper for docs directory |
| src/usethis/_core/tool.py | Add use_mkdocs orchestration to core tool logic |
| src/usethis/_config_file.py | Add MkDocsYMLManager and include it in files_manager |
| pyproject.toml | Update tool layering to include mkdocs |
Comments suppressed due to low confidence (4)
src/usethis/_tool/base.py:199
- [nitpick] Consider adding a docstring for
add_doc_depsto explain its behavior and purpose, for consistency with other Tool base methods.
def add_doc_deps(self) -> None:
src/usethis/_tool/base.py:202
- [nitpick] Consider adding a docstring for
remove_doc_depsto describe what dependencies are removed and under what conditions.
def remove_doc_deps(self) -> None:
src/usethis/_tool/impl/mkdocs.py:33
- Add a unit test for the
unconditional=Truebranch ofget_doc_deps, verifying it returns both 'mkdocs' and 'mkdocs-material'.
def get_doc_deps(self, *, unconditional: bool = False) -> list[Dependency]:
src/usethis/_core/tool.py:169
- The call to
ensure_pyproject_toml()will fail because onlyensure_pyproject_validityis imported. Either importensure_pyproject_tomlor change this call toensure_pyproject_validity().
ensure_pyproject_toml()
Co-authored-by: Copilot <[email protected]>
Tweak docstring for mkdocs command
…m/nathanjmcdougall/usethis-python into 188-implement-usethis-tool-mkdocs
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.