-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve dependencies from lockfiles (#1244)
* Resolve dependencies from lockfiles #1237 Reference: #1237 Reference: #1066 Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Address feedback and add improvements Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Improve dependency resolving from lockfiles #1237 Resolves dependency for cases where multiple requirements are resolved by one package and all the version requirements are joined for that package. Reference: #1237 Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Update scancode-toolkit and fix tests Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Bump scancode-toolkit to v32.2.0 Reference: https://github.com/nexB/scancode-toolkit/releases/tag/v32.2.0 Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Regenerate test fixtures and expectations Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Improve dependency resolver for lockfiles Handle various lockfile cases where: * Same package/dependencies are present in different lockfiles * Independent lockfiles without a manifest and root package * Ecosystems which have only a single version of package in their environment * Dependency graphs where a resolved package can have many parent packages. Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Address feedback and refactor code Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * FIx bugs for resolving python packages Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Add unit tests and refactor code Signed-off-by: Ayan Sinha Mahapatra <[email protected]> * Address comments and add CHANGELOG entries Signed-off-by: Ayan Sinha Mahapatra <[email protected]> --------- Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
- Loading branch information
1 parent
53ce3b0
commit 08c54b1
Showing
42 changed files
with
2,913 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Generated by Django 5.0.6 on 2024-06-04 20:48 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("scanpipe", "0061_codebaseresource_is_legal_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="discovereddependency", | ||
name="is_direct", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this is a direct, first-level dependency relationship for a package.", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="discoveredpackage", | ||
name="is_private", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this is a private package, either not meant to be published on a repository, and/or a local package without a name and version used primarily to track dependencies and other information.", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="discoveredpackage", | ||
name="is_virtual", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this package is created only from a manifest or lockfile, and not from its actual packaged code. The files of this package are not present in the codebase.", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="discovereddependency", | ||
name="is_optional", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this dependency is an optional dependency", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="discovereddependency", | ||
name="is_resolved", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this dependency version requirement has been pinned and this dependency points to an exact version.", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="discovereddependency", | ||
name="is_runtime", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="True if this dependency is a runtime dependency.", | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="discovereddependency", | ||
index=models.Index( | ||
fields=["is_direct"], name="scanpipe_di_is_dire_6dc594_idx" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="discoveredpackage", | ||
index=models.Index( | ||
fields=["is_private"], name="scanpipe_di_is_priv_9ffd1a_idx" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="discoveredpackage", | ||
index=models.Index( | ||
fields=["is_virtual"], name="scanpipe_di_is_virt_c5c176_idx" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.