Skip to content

Commit d59cea0

Browse files
committed
build
1 parent 5e05cde commit d59cea0

File tree

9 files changed

+89
-18
lines changed

9 files changed

+89
-18
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.11'
24+
python-version: '3.12'
2525

2626
- uses: tlylt/install-graphviz@v1
2727

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
- uses: actions/checkout@v3
88
- uses: actions/setup-python@v4
99
with:
10-
python-version: '3.11'
10+
python-version: '3.12'
1111
- name: Install mypy
1212
run: pip install mypy
1313
- name: Run mypy

.github/workflows/rstcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Used to host cibuildwheel
1717
- uses: actions/setup-python@v4
1818
with:
19-
python-version: '3.11'
19+
python-version: '3.12'
2020

2121
- name: Install requirements
2222
run: python -m pip install -r requirements.txt

.github/workflows/wheels-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# Used to host cibuildwheel
3131
- uses: actions/setup-python@v4
3232
with:
33-
python-version: '3.11'
33+
python-version: '3.12
3434
3535
- name: Install cibuildwheel
3636
run: python -m pip install cibuildwheel

.github/workflows/wheels-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# Used to host cibuildwheel
2727
- uses: actions/setup-python@v4
2828
with:
29-
python-version: '3.11'
29+
python-version: '3.12'
3030

3131
- name: Install cibuildwheel
3232
run: python -m pip install cibuildwheel

.github/workflows/wheels-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# Used to host cibuildwheel
2626
- uses: actions/setup-python@v4
2727
with:
28-
python-version: '3.10'
28+
python-version: '3.12'
2929

3030
- name: Install cibuildwheel
3131
run: python -m pip install cibuildwheel

azure-pipelines.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,74 @@
11
jobs:
2+
- job: 'TestLinuxWheelNoCuda313'
3+
pool:
4+
vmImage: 'ubuntu-latest'
5+
strategy:
6+
matrix:
7+
Python311-Linux:
8+
python.version: '3.13'
9+
maxParallel: 3
10+
11+
steps:
12+
- task: UsePythonVersion@0
13+
inputs:
14+
versionSpec: '$(python.version)'
15+
architecture: 'x64'
16+
- script: sudo apt-get update
17+
displayName: 'AptGet Update'
18+
- script: sudo apt-get install -y graphviz
19+
displayName: 'Install Graphviz'
20+
- script: python -m pip install --upgrade pip setuptools wheel
21+
displayName: 'Install tools'
22+
- script: pip install -r requirements.txt
23+
displayName: 'Install Requirements'
24+
- script: pip install -r requirements-dev.txt
25+
displayName: 'Install Requirements dev'
26+
- script: |
27+
ruff check .
28+
displayName: 'Ruff'
29+
- script: |
30+
black --diff .
31+
displayName: 'Black'
32+
- script: |
33+
cmake-lint _cmake/Find* --disabled-codes C0103 C0113 --line-width=88
34+
cmake-lint _cmake/CMake* --disabled-codes C0103 C0113 --line-width=88
35+
displayName: 'cmake-lint'
36+
- script: |
37+
rstcheck -r ./_doc ./mlinsights
38+
displayName: 'rstcheck'
39+
- script: |
40+
cython-lint .
41+
displayName: 'cython-lint'
42+
- script: |
43+
export USE_CUDA=0
44+
python -m pip install -e . --config-settings="--use_cuda=0" -v
45+
displayName: 'pip install -e . --config-settings="--use_cuda=0" -v'
46+
- script: |
47+
python -m pytest _unittests --durations=10
48+
displayName: 'Runs Unit Tests'
49+
- script: |
50+
# --config-settings does not work yet.
51+
# python -m pip wheel . --config-settings="--use_cuda=0" -v
52+
export USE_CUDA=0
53+
python -m pip wheel . --config-settings="--use_cuda=0" -v
54+
displayName: 'build wheel'
55+
- script: |
56+
mkdir dist
57+
cp mlinsights*.whl dist
58+
displayName: 'copy wheel'
59+
- script: |
60+
pip install auditwheel-symbols
61+
auditwheel-symbols --manylinux 2014 dist/*.whl || exit 0
62+
displayName: 'Audit wheel'
63+
- script: |
64+
pip install abi3audit
65+
abi3audit dist/*.whl || exit 0
66+
displayName: 'abi3audit wheel'
67+
- task: PublishPipelineArtifact@0
68+
inputs:
69+
artifactName: 'wheel-linux-pip-$(python.version)'
70+
targetPath: 'dist'
71+
272
- job: 'TestLinuxWheelNoCuda'
373
pool:
474
vmImage: 'ubuntu-latest'

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ classifiers = [
1414
"Operating System :: Unix",
1515
"Operating System :: MacOS",
1616
"Programming Language :: Python :: 3",
17-
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
2021
]
2122
dependencies = ["numpy", "onnx>=1.14.0", "scipy"]
2223
description = "Extends the list of supported operators in onnx reference implementation and onnxruntime, or implements faster versions in C++."
2324
keywords = ["onnx", "cython", "scikit-learn", "machine-learning"]
2425
license = {file = "LICENSE.txt"}
2526
name = "mlinsights"
2627
readme = "README.rst"
27-
requires-python = ">=3.9"
28+
requires-python = ">=3.10"
2829
version = "0.5.1"
2930

3031
[project.urls]
@@ -108,7 +109,7 @@ manylinux-x86_64-image = "manylinux2014"
108109
[tool.cibuildwheel.linux]
109110
archs = ["x86_64"]
110111
build = "cp*"
111-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy* *musllinux*"
112+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy* *musllinux*"
112113
manylinux-x86_64-image = "manylinux2014"
113114
before-build = "pip install auditwheel-symbols abi3audit"
114115
build-verbosity = 1
@@ -118,13 +119,13 @@ repair-wheel-command = "auditwheel-symbols --manylinux 2014 {wheel} ; abi3audit
118119
[tool.cibuildwheel.macos]
119120
archs = ["arm64", "universal2"]
120121
build = "cp*"
121-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy* pp*"
122+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy* pp*"
122123
before-build = "brew install libomp llvm&&echo 'export PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\"' >> /Users/runner/.bash_profile"
123124

124125
[tool.cibuildwheel.windows]
125126
archs = ["AMD64"]
126127
build = "cp*"
127-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy*"
128+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy*"
128129

129130
[tool.cython-lint]
130131
max-line-length = 88

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ def initialize_options(self):
265265
self._parent.initialize_options(self)
266266

267267
# boolean
268-
b_values = {0, 1, "1", "0", True, False}
269-
t_values = {1, "1", True}
268+
b_values = {0, 1, "1", "0", True, False} # noqa: B033
269+
t_values = {1, "1", True} # noqa: B033
270270
for att in ["use_nvtx", "use_cuda", "manylinux"]:
271271
v = getattr(self, att)
272272
if v is not None:
@@ -295,17 +295,17 @@ def initialize_options(self):
295295
def finalize_options(self):
296296
self._parent.finalize_options(self)
297297

298-
b_values = {0, 1, "1", "0", True, False, "True", "False"}
298+
b_values = {0, 1, "1", "0", True, False, "True", "False"} # noqa: B033
299299
if self.use_nvtx not in b_values:
300300
raise ValueError(f"use_nvtx={self.use_nvtx!r} must be in {b_values}.")
301301
if self.use_cuda is None:
302302
self.use_cuda = find_cuda()
303303
if self.use_cuda not in b_values:
304304
raise ValueError(f"use_cuda={self.use_cuda!r} must be in {b_values}.")
305305

306-
self.use_nvtx = self.use_nvtx in {1, "1", True, "True"}
307-
self.use_cuda = self.use_cuda in {1, "1", True, "True"}
308-
self.manylinux = self.manylinux in {1, "1", True, "True"}
306+
self.use_nvtx = self.use_nvtx in {1, "1", True, "True"} # noqa: B033
307+
self.use_cuda = self.use_cuda in {1, "1", True, "True"} # noqa: B033
308+
self.manylinux = self.manylinux in {1, "1", True, "True"} # noqa: B033
309309

310310
if self.cuda_version in (None, ""):
311311
self.cuda_version = None
@@ -599,7 +599,7 @@ def get_ext_modules():
599599
add_cuda = False
600600
elif "--use-cuda=0" in sys.argv:
601601
add_cuda = False
602-
elif os.environ.get("USE_CUDA", None) in {0, "0", False}:
602+
elif os.environ.get("USE_CUDA", None) in {0, "0", False}: # noqa: B033
603603
add_cuda = False
604604
if add_cuda:
605605
cuda_extensions.extend([])

0 commit comments

Comments
 (0)