Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaniilRoman
Copy link

#822

Here's what it looks like when it passes:

Screenshot 2025-03-03 at 19 08 35

And here's what it looks like when it doesn't pass:

Screenshot 2025-03-03 at 20 08 07

with:
python-version: '3.7'

- name: Cache Poetry
Copy link
Contributor

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?

Copy link
Author

@DaniilRoman DaniilRoman Mar 4, 2025

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick check shows it got excluded by #246. @dimas-b / @snazy can you provide more context on why we exclude that?

- name: Check Licenses
working-directory: regtests/client/python
run: |
pip-licenses --partial-match --fail-on="GPL;AGPL;LGPL;SSPL;EPL"
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants