Skip to content

Commit

Permalink
Remove logging and messaging #365
Browse files Browse the repository at this point in the history
Reference: #365

Signed-off-by: John M. Horan <[email protected]>
  • Loading branch information
johnmhoran committed Jun 8, 2024
1 parent c8fef49 commit b964cac
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 1,216 deletions.
430 changes: 55 additions & 375 deletions purldb-toolkit/src/purldb_toolkit/purlcli.py

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions purldb-toolkit/tests/data/purlcli/expected_metadata_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@
"pkg:pypi/[email protected]=windows",
"pkg:pypi/[email protected]",
"pkg:cargo/banquo",
"pkg:nginx/nginx",
"pkg:gem/rails",
"pkg:rubygems/rails"
],
"--file": null,
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/[email protected]=windows' does not exist in the upstream repo",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:nginx/nginx' not supported with `metadata` command",
"'pkg:gem/rails' not supported with `metadata` command",
"'check_existence' is not supported for 'pkg:rubygems/rails'"
]
"warnings": []
}
],
"packages": [
Expand Down
47 changes: 1 addition & 46 deletions purldb-toolkit/tests/data/purlcli/expected_urls_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,20 @@
"--purl": [
"pkg:pypi/fetchcode",
"pkg:pypi/[email protected]",
"pkg:pypi/[email protected]",
"pkg:pypi/dejacode",
"pkg:pypi/[email protected]",
"pkg:pypi/[email protected]?os=windows",
"pkg:pypi/[email protected]=windows",
"pkg:pypi/[email protected]?how_is_the_weather=rainy",
"pkg:pypi/[email protected]#how/are/you",
"pkg:pypi/[email protected]",
"pkg:cargo/banquo",
"pkg:cargo/socksprox",
"pkg:nginx/nginx",
"pkg:nginx/[email protected]?os=windows",
"pkg:gem/bundler-sass",
"pkg:rubygems/bundler-sass",
"pkg:pypi/matchcode",
"abcdefg",
"pkg/abc",
"pkg:nuget/[email protected]"
],
"--file": null,
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/fetchcode' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:pypi/dejacode' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' not fully supported with `urls` command",
"'pkg:pypi/[email protected]?os=windows' not fully supported with `urls` command",
"'pkg:pypi/[email protected]=windows' does not exist in the upstream repo",
"'pkg:pypi/[email protected]?how_is_the_weather=rainy' not fully supported with `urls` command",
"'pkg:pypi/[email protected]#how/are/you' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:nginx/nginx' not supported with `urls` command",
"'pkg:nginx/[email protected]?os=windows' not supported with `urls` command",
"'check_existence' is not supported for 'pkg:rubygems/bundler-sass'",
"'pkg:pypi/matchcode' does not exist in the upstream repo",
"'abcdefg' not valid",
"'pkg/abc' not valid"
]
"warnings": []
}
],
"packages": [
Expand Down Expand Up @@ -97,24 +70,6 @@
"repository_download_url": null,
"repository_homepage_url": "https://pypi.org/project/dejacode/5.0.0/"
},
{
"purl": "pkg:pypi/[email protected]?how_is_the_weather=rainy",
"download_url": null,
"inferred_urls": [
"https://pypi.org/project/dejacode/5.0.0/"
],
"repository_download_url": null,
"repository_homepage_url": "https://pypi.org/project/dejacode/5.0.0/"
},
{
"purl": "pkg:pypi/[email protected]#how/are/you",
"download_url": null,
"inferred_urls": [
"https://pypi.org/project/dejacode/5.0.0/"
],
"repository_download_url": null,
"repository_homepage_url": "https://pypi.org/project/dejacode/5.0.0/"
},
{
"purl": "pkg:cargo/banquo",
"download_url": null,
Expand Down
79 changes: 1 addition & 78 deletions purldb-toolkit/tests/data/purlcli/expected_urls_output_head.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,21 @@
"--purl": [
"pkg:pypi/fetchcode",
"pkg:pypi/[email protected]",
"pkg:pypi/[email protected]",
"pkg:pypi/dejacode",
"pkg:pypi/[email protected]",
"pkg:pypi/[email protected]?os=windows",
"pkg:pypi/[email protected]=windows",
"pkg:pypi/[email protected]?how_is_the_weather=rainy",
"pkg:pypi/[email protected]#how/are/you",
"pkg:pypi/[email protected]",
"pkg:cargo/banquo",
"pkg:cargo/socksprox",
"pkg:nginx/nginx",
"pkg:nginx/[email protected]?os=windows",
"pkg:gem/bundler-sass",
"pkg:rubygems/bundler-sass",
"pkg:pypi/matchcode",
"abcdefg",
"pkg/abc",
"pkg:nuget/[email protected]"
],
"--file": null,
"--head": true,
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/fetchcode' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:pypi/dejacode' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' not fully supported with `urls` command",
"'pkg:pypi/[email protected]?os=windows' not fully supported with `urls` command",
"'pkg:pypi/[email protected]=windows' does not exist in the upstream repo",
"'pkg:pypi/[email protected]?how_is_the_weather=rainy' not fully supported with `urls` command",
"'pkg:pypi/[email protected]#how/are/you' not fully supported with `urls` command",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:nginx/nginx' not supported with `urls` command",
"'pkg:nginx/[email protected]?os=windows' not supported with `urls` command",
"'check_existence' is not supported for 'pkg:rubygems/bundler-sass'",
"'pkg:pypi/matchcode' does not exist in the upstream repo",
"'abcdefg' not valid",
"'pkg/abc' not valid"
]
"warnings": []
}
],
"packages": [
Expand Down Expand Up @@ -178,56 +151,6 @@
"head_request_status_code": 200
}
},
{
"purl": "pkg:pypi/[email protected]?how_is_the_weather=rainy",
"download_url": {
"url": null,
"get_request_status_code": "N/A",
"head_request_status_code": "N/A"
},
"inferred_urls": [
{
"url": "https://pypi.org/project/dejacode/5.0.0/",
"get_request_status_code": 200,
"head_request_status_code": 200
}
],
"repository_download_url": {
"url": null,
"get_request_status_code": "N/A",
"head_request_status_code": "N/A"
},
"repository_homepage_url": {
"url": "https://pypi.org/project/dejacode/5.0.0/",
"get_request_status_code": 200,
"head_request_status_code": 200
}
},
{
"purl": "pkg:pypi/[email protected]#how/are/you",
"download_url": {
"url": null,
"get_request_status_code": "N/A",
"head_request_status_code": "N/A"
},
"inferred_urls": [
{
"url": "https://pypi.org/project/dejacode/5.0.0/",
"get_request_status_code": 200,
"head_request_status_code": 200
}
],
"repository_download_url": {
"url": null,
"get_request_status_code": "N/A",
"head_request_status_code": "N/A"
},
"repository_homepage_url": {
"url": "https://pypi.org/project/dejacode/5.0.0/",
"get_request_status_code": 200,
"head_request_status_code": 200
}
},
{
"purl": "pkg:cargo/banquo",
"download_url": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/fetchcode' not fully supported with `urls` command"
]
"warnings": []
}
],
"packages": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/[email protected]=windows' does not exist in the upstream repo",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'check_existence' is not supported for 'pkg:nginx/nginx'",
"'check_existence' is not supported for 'pkg:rubygems/rails'"
]
"warnings": []
}
],
"packages": [
Expand Down
69 changes: 17 additions & 52 deletions purldb-toolkit/tests/data/purlcli/expected_versions_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,128 +12,93 @@
"pkg:pypi/[email protected]=windows",
"pkg:pypi/[email protected]",
"pkg:cargo/banquo",
"pkg:nginx/nginx",
"pkg:hex/[email protected]"
],
"--file": null,
"--output": "<stdout>"
},
"errors": [],
"warnings": [
"'pkg:pypi/[email protected]=windows' does not exist in the upstream repo",
"'pkg:pypi/[email protected]' does not exist in the upstream repo",
"'pkg:nginx/nginx' not supported with `versions` command"
]
"warnings": []
}
],
"packages": [
{
"purl": "pkg:pypi/fetchcode@0.1.0",
"purl": "pkg:pypi/fetchcode",
"version": "0.1.0",
"release_date": "2021-08-25"
},
{
"purl": "pkg:pypi/fetchcode@0.2.0",
"purl": "pkg:pypi/fetchcode",
"version": "0.2.0",
"release_date": "2022-09-14"
},
{
"purl": "pkg:pypi/fetchcode@0.3.0",
"purl": "pkg:pypi/fetchcode",
"version": "0.3.0",
"release_date": "2023-12-18"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.1.0",
"release_date": "2021-08-25"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.2.0",
"release_date": "2022-09-14"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.3.0",
"release_date": "2023-12-18"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.1.0",
"release_date": "2021-08-25"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.2.0",
"release_date": "2022-09-14"
},
{
"purl": "pkg:pypi/[email protected]",
"version": "0.3.0",
"release_date": "2023-12-18"
},
{
"purl": "pkg:cargo/[email protected]",
"purl": "pkg:cargo/banquo",
"version": "0.1.0",
"release_date": "2024-02-07"
},
{
"purl": "pkg:hex/coherence@0.8.0",
"purl": "pkg:hex/coherence",
"version": "0.8.0",
"release_date": "2023-09-22"
},
{
"purl": "pkg:hex/coherence@0.5.2",
"purl": "pkg:hex/coherence",
"version": "0.5.2",
"release_date": "2018-09-03"
},
{
"purl": "pkg:hex/coherence@0.5.1",
"purl": "pkg:hex/coherence",
"version": "0.5.1",
"release_date": "2018-08-28"
},
{
"purl": "pkg:hex/coherence@0.5.0",
"purl": "pkg:hex/coherence",
"version": "0.5.0",
"release_date": "2017-08-02"
},
{
"purl": "pkg:hex/coherence@0.4.0",
"purl": "pkg:hex/coherence",
"version": "0.4.0",
"release_date": "2017-07-03"
},
{
"purl": "pkg:hex/coherence@0.3.1",
"purl": "pkg:hex/coherence",
"version": "0.3.1",
"release_date": "2016-11-27"
},
{
"purl": "pkg:hex/coherence@0.3.0",
"purl": "pkg:hex/coherence",
"version": "0.3.0",
"release_date": "2016-08-28"
},
{
"purl": "pkg:hex/coherence@0.2.0",
"purl": "pkg:hex/coherence",
"version": "0.2.0",
"release_date": "2016-07-30"
},
{
"purl": "pkg:hex/coherence@0.1.3",
"purl": "pkg:hex/coherence",
"version": "0.1.3",
"release_date": "2016-07-19"
},
{
"purl": "pkg:hex/coherence@0.1.2",
"purl": "pkg:hex/coherence",
"version": "0.1.2",
"release_date": "2016-07-12"
},
{
"purl": "pkg:hex/coherence@0.1.1",
"purl": "pkg:hex/coherence",
"version": "0.1.1",
"release_date": "2016-07-11"
},
{
"purl": "pkg:hex/coherence@0.1.0",
"purl": "pkg:hex/coherence",
"version": "0.1.0",
"release_date": "2016-07-11"
}
Expand Down
Loading

0 comments on commit b964cac

Please sign in to comment.