-
Notifications
You must be signed in to change notification settings - Fork 34
Update purldb-toolkit and related README files #249 #450
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
Conversation
Reference: #249 Signed-off-by: John M. Horan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnmhoran LGTM and thanks! See couple nits and suggestions for your consideration.
purldb-toolkit/README.rst
Outdated
Options: | ||
--help Show this message and exit. | ||
|
||
Commands: | ||
metadata Given one or more PURLs, for each PURL, return a mapping of... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here instead of three dots at the end, we can show the full texts which are there when we run purlcli --help
, for all 4 commands here. Otherwise the truncated texts are not that useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually @AyanSinhaMahapatra when I ran purlcli --help
I got the same truncated texts. I'll postpone this change until you've had a chance to read this reply in case that changes your thinking. I like the idea of more info, but as you'll see in the examples below, the description for instance for metadata
is rather long -- just want to make sure we're OK with the way this wraps due to its length when we insert it into the purlcli --help
output block in the RTD.
This is purlcli --help
:
$ purlcli --help
Usage: purlcli [OPTIONS] COMMAND [ARGS]...
Return information from a PURL.
Options:
--help Show this message and exit.
Commands:
metadata Given one or more PURLs, for each PURL, return a mapping of...
urls Given one or more PURLs, for each PURL, return a list of all...
validate Check the syntax and upstream repo status of one or more PURLs.
versions Given one or more PURLs, return a list of all known versions...
And this is purlcli metadata --help
:
$ purlcli metadata --help
Usage: purlcli metadata [OPTIONS]
Given one or more PURLs, for each PURL, return a mapping of metadata fetched
from the fetchcode package.py info() function.
Options:
--purl TEXT PackageURL or PURL.
--output FILENAME Write meta output as JSON to FILE. [required]
--file FILENAME Read a list of PURLs from a FILE, one per line.
--help Show this message and exit.
Reference: #249 Signed-off-by: John M. Horan <[email protected]>
@AyanSinhaMahapatra I've just committed and pushed my updates responding to your comments (thank you for those). One open item concerns your comment re the truncated text in |
@johnmhoran here's some directions on the truncated help text: https://stackoverflow.com/questions/75036688/display-full-help-text-in-python-click, but let's not do too much here. We should rather keep this short and concise so it fits the CLI display (first line of a docstring short text for this, next paragraph for detailed docstring). LGTM otherwise! |
@johnmhoran let's handle this seperately in #455, merging the PR otherwise, thanks! |
Thank you @AyanSinhaMahapatra 👍 |
Update purldb-toolkit and related README files #249
Reference: #249
Reference: #446