Skip to content

1027 omissions in messages for usethis init backend=none#1049

Merged
nathanjmcdougall merged 4 commits intomainfrom
1027-omissions-in-messages-for-uv-init---backendnone
Oct 26, 2025
Merged

1027 omissions in messages for usethis init backend=none#1049
nathanjmcdougall merged 4 commits intomainfrom
1027-omissions-in-messages-for-uv-init---backendnone

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

No description provided.

… --backend=none`

Split `box_print` into `how_print` and `instruct_print` with dedicated, distinguished handling in `usethis_config`
@nathanjmcdougall nathanjmcdougall linked an issue Oct 26, 2025 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 26, 2025

Codecov Report

❌ Patch coverage is 96.40719% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/usethis/_tool/impl/deptry.py 60.00% 2 Missing ⚠️
src/usethis/_tool/impl/ruff.py 77.77% 2 Missing ⚠️
src/usethis/_tool/impl/pyproject_fmt.py 80.00% 1 Missing ⚠️
src/usethis/_tool/impl/requirements_txt.py 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Oct 26, 2025

CodSpeed Performance Report

Merging #1049 will not alter performance

Comparing 1027-omissions-in-messages-for-uv-init---backendnone (173e66d) with main (d8db50c)

Summary

✅ 2 untouched

@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review October 26, 2025 22:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors console output messaging to differentiate between instructional messages (that users must act on) and informational "how-to" messages. The key changes introduce two new print functions (instruct_print and how_print) to replace the generic box_print, along with a new instruct_only configuration flag that allows selective suppression of output while preserving critical user instructions.

  • Replaces box_print with semantically distinct instruct_print (for required actions) and how_print (for usage guidance)
  • Adds instruct_only configuration mode to show only instructions, warnings, and errors
  • Updates output suppression logic across all print functions to respect the new instruct_only flag

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/usethis/_console.py Adds instruct_print and how_print functions, removes box_print, updates all print functions to check instruct_only flag
src/usethis/_config.py Adds instruct_only field to UsethisConfig class and context manager support
src/usethis/_ui/interface/init.py Refactors init function to extract logic into _init, uses instruct_only mode instead of alert_only
src/usethis/_init.py Updates to use instruct_only mode when initializing projects with backend=none
src/usethis/_deps.py Replaces box_print with instruct_print for dependency management instructions
src/usethis/_core/tool.py Replaces box_print with instruct_print for pre-commit installation instructions
src/usethis/_core/readme.py Replaces box_print with how_print for README population guidance
src/usethis/_core/ci.py Replaces box_print with how_print for CI usage instructions
src/usethis/_core/browse.py Replaces box_print with how_print for URL opening instructions
src/usethis/_tool/base.py Updates config adding logic to respect instruct_only flag
src/usethis/_tool/impl/*.py Replaces box_print with how_print or instruct_print across all tool implementations
src/usethis/_integrations/pytest/core.py Replaces box_print with instruct_print for pytest directory reconfiguration
src/usethis/_integrations/pre_commit/*.py Replaces box_print with instruct_print for pre-commit setup instructions
src/usethis/_integrations/ci/bitbucket/steps.py Replaces box_print with instruct_print for pipeline step instructions
tests/usethis/test_console.py Adds tests for instruct_print, how_print, and instruct_only suppression behavior
tests/usethis/_ui/interface/test_init.py Updates expected output to include new instructional messages for dependency additions
tests/usethis/_tool/test_base.py Updates test mocks from box_print to how_print

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nathanjmcdougall nathanjmcdougall changed the title 1027 omissions in messages for uv init backendnone 1027 omissions in messages for usethis init backend=none Oct 26, 2025
@nathanjmcdougall nathanjmcdougall merged commit ba46fd2 into main Oct 26, 2025
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 1027-omissions-in-messages-for-uv-init---backendnone branch October 26, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omissions in messages for usethis init --backend=none

2 participants