Skip to content

Refactor the purl2url functions and utilities #42 #102

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 8 commits into from
Oct 17, 2022
Merged

Refactor the purl2url functions and utilities #42 #102

merged 8 commits into from
Oct 17, 2022

Conversation

tdruez
Copy link
Collaborator

@tdruez tdruez commented Oct 17, 2022

  • Refactor the purl2url functions and utilities

    • Split purl2url into get_repo_url() and get_download_url() returning
      accordingly a "Repository URL" and a "Download URL".
    • A new get_inferred_urls function is available to get return all
      inferred URLs (repository and download) values.
    • Add support in purl2url for npm, pypi, hackage, and nuget.
    • Package URL qualifiers can now be provided to purl_from_pattern().
    • The download_url qualifier is returned in get_download_url() when available.
  • Usage of purl2url.purl2url and purl2url.get_url is still available for
    backward compatibility but should be migrated to purl2url.get_repo_url.

  • Include the version_prefix ("v" or "V") as a qualifier in build_github_purl
    This allow to infer valid URLs in the context of purl2url.

Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Qualifier `download_url` is now supported in build_github_download_url

Signed-off-by: Thomas Druez <tdruez@nexb.com>


Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
@tdruez tdruez merged commit 9ea1cea into main Oct 17, 2022
@tdruez tdruez deleted the 42-purl2url branch October 17, 2022 07:24
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.

1 participant