Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider introducing a --metadata option #419

Open
kemzeb opened this issue Oct 13, 2024 · 2 comments
Open

Consider introducing a --metadata option #419

kemzeb opened this issue Oct 13, 2024 · 2 comments

Comments

@kemzeb
Copy link
Collaborator

kemzeb commented Oct 13, 2024

Describe the feature

Given #391, #386, and the --license option that was introduced some time ago, there is a clear desire to provide more package metadata and aggregate data in order to get useful insights from the environment.

I propose that we introduce a metadata option that can a predefined value e.g.:

pipdeptree --metadata license # or -m license

Which leads me to consider if all rendering options should allow users to pass more than 1 metadata value e.g.:

pipdeptree --metadata size,license,keyword

I can see this being useful for machine-readable formats (e.g. json), but for rendering options like text it would make the dependency tree very hard to read.

We could try to:

  • Throw all the possible metadata we would support into groups and determine if a rendering option supports rendering that group (or this could instead be done on a per-metadata-value basis e.g. should text support Home-page metadata)
  • ... and (maybe?) restrict the number of metadata values that the rendering options can include, e.g.:
pipdeptree --metadata license,size
# Exit with an error here since the text render can only render one metadata value (to maintain readability)

We would need to somehow communicate this design in the help message so that users won't be surprised by certain input. Maybe a combination of the --metadata description and the main description would be a solution to that.

@stasfilin
Copy link
Contributor

I can pick for development if this is still relevant

@kemzeb
Copy link
Collaborator Author

kemzeb commented Dec 14, 2024

I was planning on tackling this myself eventually, but if you have the time feel free to do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants