Skip to content

feat: add RichInstallerReporter and deprecate show_progress#2234

Open
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:feat/py-rattler-rich-installer-reporter
Open

feat: add RichInstallerReporter and deprecate show_progress#2234
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:feat/py-rattler-rich-installer-reporter

Conversation

@ritankarsaha
Copy link
Copy Markdown
Contributor

@ritankarsaha ritankarsaha commented Mar 17, 2026

Description

Summary

Follow-up to #2187. The InstallerReporter is a @runtime_checkable Protocol, this PR ships a first-party rich-powered implementation so users get a beautiful live progress display without writing their own reporter.

#2187 (review) addressed this comment and implemented this properly
@baszalmstra

This PR implements a ready-to-use InstallerReporter backed by rich that renders three stacked live panels:

  │      Panel      │                                   Content                                   │
  ├─────────────────┼─────────────────────────────────────────────────────────────────────────────┤
  │ Overall         │ Transaction progress bar — packages done / total with ETA                   │
  ├─────────────────┼─────────────────────────────────────────────────────────────────────────────┤
  │ Downloads       │ One transient bar per active download with bytes, speed, and time remaining │
  ├─────────────────┼─────────────────────────────────────────────────────────────────────────────┤
  │ Links / Unlinks │ One transient spinner row per active link or unlink operation               │
  └─────────────────┴─────────────────────────────────────────────────────────────────────────────┘

Also raises a clear ImportError with install instructions when rich is not available.

Before

  await install(records, prefix)

After

  from rattler.install import RichInstallerReporter
  await install(records, prefix, reporter=RichInstallerReporter())

RichInstallerReporter is re-exported from both rattler.install and the top-level rattler package.

How Has This Been Tested?

  • Manual: pip install py-rattler[rich] and run an install verify the three live panels render
  • Manual: without rich installed, RichInstallerReporter() raises ImportError with instructions
  • Manual: install(records, prefix) without reporter emits DeprecationWarning

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

@baszalmstra

@ritankarsaha
Copy link
Copy Markdown
Contributor Author

#2187 (review) @baszalmstra addressed comment in this PR in follow up to #2187

Can you please take a look if any more modifications or changes are required here?

warnings.warn(
"The 'show_progress' parameter is deprecated and will be removed in a future release. "
"Use 'reporter=RichInstallerReporter()' instead for rich progress output. "
"Install rich with: pip install py-rattler[rich]",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove this line.

@baszalmstra
Copy link
Copy Markdown
Collaborator

Can you record a little GIF that shows what this now looks like when installing an environment?

@ritankarsaha
Copy link
Copy Markdown
Contributor Author

demo

@baszalmstra is this okaay? I made this using vhs, do you require the demo.tape file ? Let me know if you need anything else from my side.
Also addressed your reviews but added them, because show_progress and reporter co exist, should I then remove show_progress entirely ? Let me know what would be the best approach for this properly. For now made the changes you asked for and pushing in a new commit.

Signed-off-by: RITANKAR SAHA <ritankar.saha786@gmail.com>

updates
@ritankarsaha ritankarsaha force-pushed the feat/py-rattler-rich-installer-reporter branch from 314e108 to 741a792 Compare March 19, 2026 03:57
@ritankarsaha
Copy link
Copy Markdown
Contributor Author

@baszalmstra ^^

@ritankarsaha
Copy link
Copy Markdown
Contributor Author

@baszalmstra are there any more changes which are required to this ?

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.

2 participants