-
Notifications
You must be signed in to change notification settings - Fork 332
Automatic license check for Python #1102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic license check for Python #1102
Conversation
| with: | ||
| python-version: '3.7' | ||
|
|
||
| - name: Cache Poetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be problematic as we have gitignore for poetry.lock. In this case, it won't invalid the cache right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point, we need to have poetry.lock in order to cache this properly and we could even use this config cache: 'poetry' of actions/setup-python@v4 GitHub action (here's this docs section).
Without having poetry.lock we can only cache based on pyptoject.toml which doesn't cover transitive dependencies.
I've also thought about generating poetry.lock on CI but for this we need to have poetry first and when we install poetry, it installs dependencies as well - so, it wouldn't work
What about removing poetry.lock from .gitignore and creating it and managing for the future changes? 🤔
Or is it good enough to create a hash key based on myproject.toml instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: Check Licenses | ||
| working-directory: regtests/client/python | ||
| run: | | ||
| pip-licenses --partial-match --fail-on="GPL;AGPL;LGPL;SSPL;EPL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbonofre can u help review if this rule is sufficient?
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
@DaniilRoman Let us know if u would like to continue the PR above. As we are getting ready to release the python client as distribution, it may be wise to add license check such as the one listed in this PR. |
|
Agreed with @MonkeyCanCode, we will also need a license file for any third-party python lib/file shipped in the binary distribution. |
Here is the sample PR based on the work done in this one: #2580 |
#822
Here's what it looks like when it passes:
And here's what it looks like when it doesn't pass: