Skip to content

Commit

Permalink
Add selected_groups in the API RunSerializer #1306
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jul 2, 2024
1 parent af15beb commit ff994df
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 64 deletions.
1 change: 1 addition & 0 deletions scanpipe/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class Meta:
"pipeline_name",
"status",
"description",
"selected_groups",
"project",
"uuid",
"created_date",
Expand Down
2 changes: 1 addition & 1 deletion scanpipe/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
scanpipe_app.register_pipeline("profile_step", ProfileStep)
scanpipe_app.register_pipeline("raise_exception", RaiseException)

FIXTURES_REGEN = os.environ.get("SCANCODEIO_TEST_FIXTURES_REGEN", False)
FIXTURES_REGEN = os.environ.get("SCANCODEIO_TEST_FIXTURES_REGEN", 1)
mocked_now = mock.Mock(now=lambda: datetime(2010, 10, 10, 10, 10, 10))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{
"pipeline_name": "load_inventory",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
5 changes: 3 additions & 2 deletions scanpipe/tests/data/d2d/about_files/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{
"pipeline_name": "map_deploy_to_develop",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down Expand Up @@ -71,9 +72,9 @@
"notice_text": "",
"source_packages": [],
"extra_data": {},
"package_uid": "pkg:local-files/analysis-90cb6382/90cb6382-431c-4187-be76-d4f1a2199a2f?uuid=fixed-uid-done-for-testing-5642512d1758",
"is_private": false,
"is_virtual": false,
"package_uid": "pkg:local-files/analysis-90cb6382/90cb6382-431c-4187-be76-d4f1a2199a2f?uuid=fixed-uid-done-for-testing-5642512d1758",
"datasource_ids": [],
"datafile_paths": [],
"file_references": [],
Expand Down Expand Up @@ -124,9 +125,9 @@
"*flume-ng-node-*.jar-extract/org/apache/flume/node/ConfigurationProvider.class"
]
},
"package_uid": "pkg:maven/log4j/[email protected]?uuid=fixed-uid-done-for-testing-5642512d1758",
"is_private": false,
"is_virtual": false,
"package_uid": "pkg:maven/log4j/[email protected]?uuid=fixed-uid-done-for-testing-5642512d1758",
"datasource_ids": [],
"datafile_paths": [],
"file_references": [],
Expand Down
3 changes: 2 additions & 1 deletion scanpipe/tests/data/d2d/flume-ng-node-d2d.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{
"pipeline_name": "map_deploy_to_develop",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down Expand Up @@ -71,9 +72,9 @@
"notice_text": "",
"source_packages": [],
"extra_data": {},
"package_uid": "pkg:local-files/analysis-b74fe5df/b74fe5df-e965-415e-ba65-f38421a0695d?uuid=fixed-uid-done-for-testing-5642512d1758",
"is_private": false,
"is_virtual": false,
"package_uid": "pkg:local-files/analysis-b74fe5df/b74fe5df-e965-415e-ba65-f38421a0695d?uuid=fixed-uid-done-for-testing-5642512d1758",
"datasource_ids": [],
"datafile_paths": [],
"file_references": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pipeline_name": "resolve_dependencies",
"status": "not_started",
"selected_groups": [
"Static Resolver"
],
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pipeline_name": "inspect_packages",
"status": "not_started",
"selected_groups": [
"Static Resolver"
],
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down Expand Up @@ -163,7 +166,7 @@
"matcher": "5-undetected",
"end_line": 1,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-cb9ea49fe36cb2e1ba6d87c68e1195a492f762cf",
"from_file": "resolved_dependencies_npm.zip-extract/package.json",
"from_file": null,
"start_line": 1,
"matched_text": "license - UNLICENSED",
"match_coverage": 100.0,
Expand Down Expand Up @@ -640,38 +643,17 @@
"source_packages": [],
"bug_tracking_url": null,
"primary_language": "JavaScript",
"license_detections": [
{
"matches": [
{
"score": 100.0,
"matcher": "5-undetected",
"end_line": 1,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-cb9ea49fe36cb2e1ba6d87c68e1195a492f762cf",
"from_file": null,
"start_line": 1,
"matched_text": "license - UNLICENSED",
"match_coverage": 100.0,
"matched_length": 2,
"rule_relevance": 100,
"rule_identifier": "package-manifest-unknown-cb9ea49fe36cb2e1ba6d87c68e1195a492f762cf",
"license_expression": "unknown",
"spdx_license_expression": "LicenseRef-scancode-unknown"
}
],
"identifier": "unknown-0669ac45-20f6-defd-ec9f-2b6aafc9f944",
"license_expression": "unknown",
"license_expression_spdx": "LicenseRef-scancode-unknown"
}
],
"license_detections": [],
"repository_download_url": null,
"repository_homepage_url": null,
"other_license_detections": [],
"other_license_expression": null,
"declared_license_expression": "unknown",
"extracted_license_statement": "- UNLICENSED\n",
"declared_license_expression": null,
"extracted_license_statement": [
"UNLICENSED"
],
"other_license_expression_spdx": null,
"declared_license_expression_spdx": "LicenseRef-scancode-unknown"
"declared_license_expression_spdx": null
}
],
"for_packages": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pipeline_name": "resolve_dependencies",
"status": "not_started",
"selected_groups": [
"Static Resolver"
],
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pipeline_name": "resolve_dependencies",
"status": "not_started",
"selected_groups": [
"Static Resolver"
],
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pipeline_name": "inspect_packages",
"status": "not_started",
"selected_groups": [
"Static Resolver"
],
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down Expand Up @@ -317,19 +320,19 @@
"score": 100.0,
"matcher": "1-hash",
"end_line": 1,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE",
"from_file": "resolved_dependencies_poetry.zip-extract/univers/pyproject.toml",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE",
"from_file": null,
"start_line": 1,
"matched_text": "apache-2.0",
"matched_text": "license: apache-2.0",
"match_coverage": 100.0,
"matched_length": 3,
"matched_length": 4,
"rule_relevance": 100,
"rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE",
"rule_identifier": "apache-2.0_65.RULE",
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0"
}
],
"identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8",
"identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0",
"license_expression": "apache-2.0",
"license_expression_spdx": "Apache-2.0"
}
Expand Down Expand Up @@ -1158,38 +1161,15 @@
"source_packages": [],
"bug_tracking_url": null,
"primary_language": "Python",
"license_detections": [
{
"matches": [
{
"score": 100.0,
"matcher": "1-hash",
"end_line": 1,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE",
"from_file": null,
"start_line": 1,
"matched_text": "apache-2.0",
"match_coverage": 100.0,
"matched_length": 3,
"rule_relevance": 100,
"rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE",
"license_expression": "apache-2.0",
"spdx_license_expression": "Apache-2.0"
}
],
"identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8",
"license_expression": "apache-2.0",
"license_expression_spdx": "Apache-2.0"
}
],
"license_detections": [],
"repository_download_url": "https://pypi.org/packages/source/u/univers/univers-0.1.0.tar.gz",
"repository_homepage_url": "https://pypi.org/project/univers",
"other_license_detections": [],
"other_license_expression": null,
"declared_license_expression": "apache-2.0",
"declared_license_expression": null,
"extracted_license_statement": "license: apache-2.0\n",
"other_license_expression_spdx": null,
"declared_license_expression_spdx": "Apache-2.0"
"declared_license_expression_spdx": null
}
],
"for_packages": [
Expand Down
1 change: 1 addition & 0 deletions scanpipe/tests/data/docker/debian_scan_codebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{
"pipeline_name": "analyze_docker_image",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{
"pipeline_name": "analyze_docker_image",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{
"pipeline_name": "analyze_docker_image",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{
"pipeline_name": "analyze_root_filesystem_or_vm_image",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{
"pipeline_name": "scan_codebase",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{
"pipeline_name": "scan_codebase",
"status": "not_started",
"selected_groups": null,
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
Expand Down

0 comments on commit ff994df

Please sign in to comment.