wppm --top-level -v , to clean or create a requirements.txt - #2081
Merged
Conversation
Given a requirements file, drop every entry another entry already brings in, sort the rest, and comment out what went and why. Given no file, the same question over what is installed. An optional dependency counts only where its extra is asked for; a mutual pair keeps both members. Reading a wheelhouse now skips an archive carrying no metadata instead of losing the directory with it, and keeps the newest version of a package where several are present, so the answer stops depending on the order the files were listed in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pip already has --root (an alternate install prefix), one character away, and "root" reads as the superuser before it reads as a graph node. "Top level" is the term pipdeptree uses for the same set, so the word is one its users have already met. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The output is meant to become the requirements file, so plainly it is that file: the entries, and the notes the source carried, which are its author's and not ours. Counts and warnings go to stderr, where a redirection leaves them behind; -v puts the reasoning back on stdout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
They describe a requirements file and someone will eventually fold both streams into one; a "# " costs nothing there and reads the same in a terminal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds -tl / --top-level: keep only the entries no other entry pulls in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The -v header read "with every entry / another one already pulls in commented out", a sentence broken where it made no sense. It now carries the source and a timestamp, then the very counts stderr prints -- one wording, from top_level_summary(), for both. Under -v stderr stays quiet rather than repeating them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
from a never-ending problem to no more a problem