Skip to content

Conversation

@stevespringett
Copy link
Member

@stevespringett stevespringett commented Mar 1, 2025

This PR adds a formal structure to PURL type definitions. This PR contains:

  • JSON schema for PURL type definitions
  • JSON schema for the index of all PURL type definitions
  • Sample PURL type definitions (e.g. maven, npm, etc)
  • GitHub action and Python script that will automatically generate:
    • The index.json of all PURL type definitions
    • The human-readable documentation for all types in Markdown format

This PR closes #310

Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
…b action is activated.

Signed-off-by: Steve Springett <steve@springett.us>
@stevespringett stevespringett changed the title Purl type schema Add Schema that defines PURL types Mar 1, 2025
Signed-off-by: Steve Springett <steve@springett.us>
Dustin4444
Dustin4444 previously approved these changes Mar 2, 2025
@johnmhoran johnmhoran added PURL type definition Non-core definitions that describe and standardize PURL types documentation Ecma PURL component: type PURL generation labels Mar 4, 2025
@pombredanne pombredanne dismissed Dustin4444’s stale review March 5, 2025 16:19

Unknown user, no comments. Looks like spam

@johnmhoran johnmhoran added this to the 1.0-draft milestone Apr 4, 2025
@johnmhoran johnmhoran added Ecma standard Part of the Ecma standard for PURL 1 high priority and removed Ecma labels May 28, 2025
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
We only need a list of types and I find it less brittle avoiding to
hardcode URLs.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/oci-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/pub-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/pypi-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/rpm-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/swid-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: create types/swift-definition.json

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…ion.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: keep PURL-TYPES.rst

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
…ion.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history: merge
…n.json types/bitbucket-definition.json types/bitnami-definition.json types/cocoapods-definition.json types/cargo-definition.json types/composer-definition.json types/conan-definition.json types/conda-definition.json types/cpan-definition.json types/cran-definition.json types/deb-definition.json types/docker-definition.json types/gem-definition.json types/generic-definition.json types/github-definition.json types/golang-definition.json types/hackage-definition.json types/hex-definition.json types/huggingface-definition.json types/luarocks-definition.json types/maven-definition.json types/mlflow-definition.json types/npm-definition.json types/nuget-definition.json types/qpkg-definition.json types/oci-definition.json types/pub-definition.json types/pypi-definition.json types/rpm-definition.json types/swid-definition.json types/swift-definition.json keep history

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
The files are still in rest format for now until we convert them to
proper JSON

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
This is a script that takes one source file and multiple target files
as arguments and does a copy, keeping original commit history in a way
that git will be able to apply its heuristics to provide a proper
line-level blame

Written-by: @davidjsherman
Reference: https://gitlab.inria.fr/-/snippets/520
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
These are for the three initial tests: maven, npm and swid

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Replace with single

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
All definitions are now valid JSON, but may be not vliad schema yet.

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Also update the schema as needed

Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
@pombredanne
Copy link
Member

I am closing this now in favor of this other PR that builds on top of this:

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

Labels

1 high priority documentation Ecma standard Part of the Ecma standard for PURL PURL component: type PURL generation PURL type definition Non-core definitions that describe and standardize PURL types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Solution for Purl Type Definitions

8 participants