Skip to content

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

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

johnmhoran
Copy link
Member

@johnmhoran johnmhoran commented May 30, 2024

Reference: #249
Reference: #446

Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a 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.

Options:
--help Show this message and exit.

Commands:
metadata Given one or more PURLs, for each PURL, return a mapping of...
Copy link
Member

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.

Copy link
Member Author

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]>
@johnmhoran
Copy link
Member Author

@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 purlcli --help -- I noted that the full text might be long enough to wrap and some might find that unsightly. Please let me know at your convenience how you'd like me to handle that.

@AyanSinhaMahapatra
Copy link
Member

@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!

@AyanSinhaMahapatra
Copy link
Member

AyanSinhaMahapatra commented Jun 3, 2024

@johnmhoran let's handle this seperately in #455, merging the PR otherwise, thanks!

@AyanSinhaMahapatra AyanSinhaMahapatra merged commit 1a1037b into main Jun 3, 2024
8 checks passed
@AyanSinhaMahapatra AyanSinhaMahapatra deleted the 249-update-purldb-docs branch June 3, 2024 17:15
@johnmhoran
Copy link
Member Author

Thank you @AyanSinhaMahapatra 👍

JonoYang pushed a commit that referenced this pull request Apr 14, 2025
Update purldb-toolkit and related README files #249
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