Commit 6c26874
Implement DiscoveredDependency model (#486)
* Implement package assembly in scancode.io #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Minor formatting changes for consistency #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Create DiscoveredPackages before other models #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Revert "Create DiscoveredPackages before other models #447"
This reverts commit c9b8bed.
Sorting Packages, Dependencies, and Resources from DatafileHandler.assemble() will never work. The code needs to be changed in scancode-toolkit.
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update migration #444
Signed-off-by: Jono Yang <jyang@nexb.com>
* Return package_uids in for_packages #444
* This is so we are consistent with scancode-toolkit JSON output
* Update expected test results
Signed-off-by: Jono Yang <jyang@nexb.com>
* Create directory Resources in docker pipeline #485
* Update test expectations
Signed-off-by: Jono Yang <jyang@nexb.com>
* Implement package assembly in scancode.io #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Implement package assembly in scancode.io #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Create DiscoveredDependency model #447
* Create new dependency list and detail views
* Update assemble_packages() to create DiscoveredDependencies
* Update test expectations
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update fields on DiscoveredDependency #447
* Remove for_package_uid and replace with ForeignKey for_package
* Remove datafile_path and replace with ForeignKey datafile_resource
* Create properties for the two removed fields
* Update dependency views to link to datafile_resource
* Update expected test results
Signed-off-by: Jono Yang <jyang@nexb.com>
* Properly pluralize verbose name #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Create new argument for create_from_data #447
* Add strip_datafile_path_root to DiscoveredDependency.create_from_data
* This argument strips the root path segment from `datafile_path` before using the path to look up the corresponding CodebaseResource
* This is used in the case where we are importing a scan from scancode-toolkit, where the root path segments are not stripped by default
* Update expected test results
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update prefetch_related #447
* Used cached_property for DiscoveredDependency properties
Signed-off-by: Jono Yang <jyang@nexb.com>
* Prefetch related models in output code #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Import scancode.io 30.2.0 scans in load_codebase
* Order DiscoveredDependencies by is_runtime, is_optional, is_resolved, and dependency_uid
* Do not show dependency_uid value in DiscoveredDependency list view
Signed-off-by: Jono Yang <jyang@nexb.com>
* Revert changes for importing old scancode.io scans
Signed-off-by: Jono Yang <jyang@nexb.com>
* Regen migrations for DiscoveredDependency #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Migrate DiscoveredPackage.dependencies #447
* Create migrations to generate new DiscoveredDependency objects from DiscoveredPackage.dependencies before removing the dependencies field
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update test expectations #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Remove accidentally committed files #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update migration logic #447
* Remove unnecessary else from DiscoveredDependency properties
Signed-off-by: Jono Yang <jyang@nexb.com>
* Add PackageURLMixin to DiscoveredDependency #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Set DiscoveredDependencies purl fields #447
* Create migration that populates purl fields for existing DiscoveredDependencies
Signed-off-by: Jono Yang <jyang@nexb.com>
* Store purl values in purl fields #447
* Do not store dependency_uid in purl fields
Signed-off-by: Jono Yang <jyang@nexb.com>
* Remove purl field from DiscoveredDependency #447
* We are already storing this info in the purl fields
* Create purl property on DiscoveredDependency for compatibility
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update DependencyFilterSet #447
* Add search and purl fields
Signed-off-by: Jono Yang <jyang@nexb.com>
* Don't show DiscoveredDependencies purl fields #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update package detail view dependencies tab #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Add package_type to dependency serializer #511
* Update test expectations
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update expected test results
Signed-off-by: Jono Yang <jyang@nexb.com>
* Add dependency table column #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Use tabset in dependency detail view #447
* Add package_type property to DiscoveredDependency
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update dependency list view #447
* Use updated table header include
* Update dependency presentation in package detail view
* Show package uid on hover on for package tab
Signed-off-by: Jono Yang <jyang@nexb.com>
* Set DiscoveredDependency serializer fields #511
* Update DiscoveredDependency ordering
Signed-off-by: Jono Yang <jyang@nexb.com>
* Create donut chart for package type #447
Signed-off-by: Jono Yang <jyang@nexb.com>
* Consolidate migrations #447
* Update DiscoveredDependency ordering
* Update daglib test expectations
Signed-off-by: Jono Yang <jyang@nexb.com>
* Update dependency JSON ordering #447
* Update test expectations
Signed-off-by: Jono Yang <jyang@nexb.com>
* Set proper discovereddependencies related_name #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Fix template indentation #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Refactor update_from_data method into a UpdateFromDataMixin #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Fix the ProjectSerializer fields #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Fix test_scanpipe_api_project_detail unit test #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Add HTML title for list views #506
Signed-off-by: Thomas Druez <tdruez@nexb.com>
* Update dependency tabs #447
* Only show links in dependency for_package tab or dependency datafile_resource tab if there is a value
Signed-off-by: Jono Yang <jyang@nexb.com>
* Use UpdateFromDataMixin #447
* Use UpdateFromDataMixin in DiscoveredDependency
* Create test for DiscoveredDependency.update_from_data()
Signed-off-by: Jono Yang <jyang@nexb.com>
* Fix formatting #447
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Thomas Druez <tdruez@nexb.com>
Co-authored-by: Thomas Druez <tdruez@nexb.com>1 parent cf389ae commit 6c26874
49 files changed
Lines changed: 3132 additions & 556 deletions
File tree
- docs
- scanpipe
- api
- migrations
- pipes
- templates/scanpipe
- includes
- tabset
- tests
- data
- image-with-symlinks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
112 | 138 | | |
113 | 139 | | |
114 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | | - | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| 154 | + | |
150 | 155 | | |
151 | | - | |
| 156 | + | |
| 157 | + | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
158 | | - | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
166 | 181 | | |
167 | 182 | | |
168 | 183 | | |
| |||
219 | 234 | | |
220 | 235 | | |
221 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
222 | 260 | | |
223 | 261 | | |
224 | 262 | | |
| |||
257 | 295 | | |
258 | 296 | | |
259 | 297 | | |
| 298 | + | |
260 | 299 | | |
261 | 300 | | |
262 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
367 | 397 | | |
368 | 398 | | |
369 | 399 | | |
| |||
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments