Skip to content

Commit d5c4018

Browse files
committed
Merge branch 'main' into lf32-licensetext-devel
Conflicts: scanpipe/templates/scanpipe/base.html
2 parents 0a4915a + 14d3b71 commit d5c4018

16 files changed

+97
-89
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ v31.0.0 (next)
2727
Reference: https://tracker.debian.org/pkg/wait-for-it
2828
https://github.com/nexB/scancode.io/issues/387
2929

30+
- Add support for multiple inputs in the LoadInventory pipeline.
31+
https://github.com/nexB/scancode.io/issues/451
32+
3033
- Add new SCANCODEIO_REDIS_PASSWORD environment variable and setting
31-
to optionally set Redis instance password
34+
to optionally set Redis instance password.
3235

3336
- Ensure a project cannot be deleted through the API while a pipeline is running.
3437
https://github.com/nexB/scancode.io/issues/402

scancodeio/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
"scanpipe": {
224224
"handlers": ["null"] if IS_TESTS else ["console"],
225225
"level": env.str("SCANCODEIO_LOG_LEVEL", "INFO"),
226+
"propagate": False,
226227
},
227228
},
228229
}

scancodeio/static/bulma-0.9.2.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

scancodeio/static/bulma-0.9.2.min.css.ABOUT

Lines changed: 0 additions & 13 deletions
This file was deleted.

scancodeio/static/bulma-0.9.4.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
about_resource: bulma-0.9.4.min.css
2+
name: bulma
3+
version: 0.9.4
4+
download_url: https://github.com/jgthms/bulma/releases/download/0.9.4/bulma-0.9.4.zip
5+
description: Modern CSS framework based on Flexbox
6+
homepage_url: https://bulma.io
7+
package_url: pkg:github/jgthms/bulma@0.9.4?download_url=https://github.com/jgthms/bulma/releases/download/0.9.4/bulma-0.9.4.zip
8+
license_expression: mit
9+
attribute: yes
10+
checksum_md5: 790c308ba7832ce5861cd4665902daaf
11+
checksum_sha1: e9c33fb7adb54a6d157c01e9070c79508b42f589
12+
licenses:
13+
- key: mit
14+
name: MIT License
15+
file: mit.LICENSE

scancodeio/static/fontawesome-5.15.1.all.min.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

scancodeio/static/fontawesome-5.15.4.all.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scancodeio/static/fontawesome-5.15.1.all.min.js.ABOUT renamed to scancodeio/static/fontawesome-5.15.4.all.min.js.ABOUT

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
about_resource: fontawesome-5.15.1.all.min.js
2-
download_url: https://use.fontawesome.com/releases/v5.15.1/fontawesome-free-5.15.1-web.zip
1+
about_resource: fontawesome-5.15.4.all.min.js
2+
download_url: https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-web.zip
33
license_expression: mit AND ofl-1.1 AND cc-by-4.0
44
copyright: Copyright (c) Font Awesome
55
attribute: yes
66
track_changes: yes
7-
checksum_md5: 465d5d1885864b97e218bbcabbe96538
8-
checksum_sha1: 911a6540bc0cc00c5d78288b24ad646ec71c21c8
97
licenses:
108
- key: mit
119
name: MIT License

scanpipe/pipelines/load_inventory.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@
2626

2727
class LoadInventory(Pipeline):
2828
"""
29-
A pipeline to load an inventory of files and packages from a ScanCode JSON scan.
30-
(Presumably containing file information and package scan data).
29+
A pipeline to load one or more inventory of files and packages from a ScanCode JSON
30+
scan results. (Presumably containing resource information and package scan data).
3131
"""
3232

3333
@classmethod
3434
def steps(cls):
3535
return (
36-
cls.get_scan_json_input,
37-
cls.build_inventory_from_scan,
36+
cls.get_scan_json_inputs,
37+
cls.build_inventory_from_scans,
3838
)
3939

40-
def get_scan_json_input(self):
40+
def get_scan_json_inputs(self):
4141
"""
42-
Locates a JSON scan input from a project's input/ directory.
42+
Locates all the ScanCode JSON scan results from the project's input/ directory.
43+
This includes all files with a .json extension.
4344
"""
44-
inputs = list(self.project.inputs(pattern="*.json"))
45+
self.input_locations = [
46+
str(scan_input.absolute())
47+
for scan_input in self.project.inputs(pattern="*.json")
48+
]
4549

46-
if len(inputs) != 1:
47-
raise Exception("Only 1 JSON input file supported")
48-
49-
self.input_location = str(inputs[0].absolute())
50-
51-
def build_inventory_from_scan(self):
50+
def build_inventory_from_scans(self):
5251
"""
53-
Processes a JSON Scan results file to populate codebase resources and packages.
52+
Processes JSON scan results files to populate codebase resources and packages.
5453
"""
55-
scancode.create_inventory_from_scan(self.project, self.input_location)
54+
for input_location in self.input_locations:
55+
scancode.create_inventory_from_scan(self.project, input_location)

0 commit comments

Comments
 (0)