Skip to content

Commit b2dd112

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

File tree

2 files changed

+64
-0
lines changed

2 files changed

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

skore/pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,31 @@ 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+
"zpl 2.1",
160+
]
161+
unauthorized_licenses = [
162+
"\bgpl"
163+
]
164+
as_regex = true
165+
level = "PARANOID"
166+
requirement_txt_file = "./requirements.in"

0 commit comments

Comments
 (0)