refactor: update check-licenses to exclude non-runtime dependencies during checks - #1535
Merged
Merged
Conversation
moe-ad
force-pushed
the
refactor/check-vulnerabilities
branch
from
September 15, 2026 10:20
1ea7653 to
5275251
Compare
moe-ad
force-pushed
the
refactor/check-vulnerabilities
branch
from
September 15, 2026 10:20
5275251 to
b89702c
Compare
moe-ad
added this pull request to stack #1564
September 15, 2026 10:26
moe-ad
marked this pull request as ready for review
September 15, 2026 11:50
moe-ad
requested review from
AlejandroFernandezLuces,
RobPasMue,
SMoraisAnsys and
clatapie
September 15, 2026 11:50
SMoraisAnsys
approved these changes
Sep 15, 2026
SMoraisAnsys
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the changes @moe-ad ! LGTM, please let others also review the PR and do not merge it too fast (see this comment)
jorgepiloto
approved these changes
Sep 15, 2026
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
RobPasMue
approved these changes
Sep 15, 2026
clatapie
approved these changes
Sep 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1066.
Note
Whoever reviews this PR should also check #1563.
Poetry-related changes
So, when the issue was originally opened,
pymaterials-managerwas still usingpoetry, however, the project has since migrated touv, which really complicated my life as there was no way to easily reproduce anymore... :)Nonetheless, I looked into it and the main issue stems from the fact that poetry automatically installs all non-optional groups (check this section to find out more about "optional groups" in poetry lingo) when executing
poetry install(see this section). To install only runtime dependencies, we need to pass--only mainas I have done.UV-related changes
uvalso behaves similarly, in that it automatically syncs with thedevgroup included. Fine, we already pass--no-devbut I have updated that to--no-default-groupsto make things more robust. This is becauseuvactually reads the default-groups setting to determine what groups to automatically include during a sync (anddevjust happens to be the default value). So if a project reconfigures this setting to include other groups,--no-devwill no longer be sufficient.Others
Given that an external virtual environment can be passed to the
check-licensesaction via theactivate-venvinput (which we have no control over), I have added a warning log to inform users about their role in ensuring the provided virtual environment contains only the packages whose licenses need to be checked.