Skip to content

Commit 2007fba

Browse files
ci: action to check Python dependencies licenses
1 parent 49d9839 commit 2007fba

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: check-licenses
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'skore/requirements.in'
7+
- 'skore/pyproject.toml'
8+
- '.github/workflows/check-licenses.yaml'
9+
10+
permissions:
11+
contents: read
12+
13+
defaults:
14+
run:
15+
shell: "bash"
16+
17+
jobs:
18+
check-python-licenses:
19+
runs-on: "ubuntu-latest"
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
cache: 'pip'
28+
29+
- run: pip install -U pip setuptools liccheck==0.9.2
30+
31+
- run: pip install ./skore
32+
33+
- name: Check Skore dependencies with liccheck
34+
working-directory: ./skore
35+
run: liccheck

skore/pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,33 @@ exclude = ["src/skore/externals/.*", "ci/*", "hatch/*", "tests/*"]
136136
[[tool.mypy.overrides]]
137137
module = ["diskcache.*", "sklearn.*"]
138138
ignore_missing_imports = true
139+
140+
[tool.liccheck]
141+
authorized_licenses = [
142+
"bsd",
143+
"new bsd",
144+
"bsd license",
145+
"new bsd license",
146+
"simplified bsd",
147+
"apache",
148+
"apache 2.0",
149+
"apache software license",
150+
"gnu lgpl",
151+
"lgpl with exceptions or zpl",
152+
"isc license",
153+
"isc license (iscl)",
154+
"mit",
155+
"mit license",
156+
"Mozilla Public License.*",
157+
"python software foundation.*",
158+
"The Unlicense.*",
159+
"wtfpl"
160+
"zpl 2.1",
161+
]
162+
unauthorized_licenses = [
163+
"\bagpl"
164+
"\bgpl"
165+
]
166+
as_regex = true
167+
level = "PARANOID"
168+
requirement_txt_file = "./requirements.in"

0 commit comments

Comments
 (0)