Skip to content

Commit 5e05cde

Browse files
authored
Build on python 3.12 (#130)
* Build on python 3.12 * mac * disable one test on mac * switch architecture * switch architecture * build * update ci * ci * update arch * numpy Signed-off-by: Xavier Dupre <xadupre@microsoft.com> * upgrade version Signed-off-by: Xavier Dupre <xadupre@microsoft.com> * fix import issue * type --------- Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
1 parent dd5c6c4 commit 5e05cde

File tree

10 files changed

+58
-51
lines changed

10 files changed

+58
-51
lines changed

.github/workflows/check-urls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v3
2424

2525
- name: urls-checker-code
26-
uses: urlstechie/urlchecker-action@master
26+
uses: urlstechie/urlchecker-action@main
2727
with:
2828
subfolder: mlinsights
2929
file_types: .md,.py,.rst,.ipynb
@@ -35,7 +35,7 @@ jobs:
3535
# force_pass : true
3636

3737
- name: urls-checker-docs
38-
uses: urlstechie/urlchecker-action@master
38+
uses: urlstechie/urlchecker-action@main
3939
with:
4040
subfolder: _doc
4141
file_types: .md,.py,.rst,.ipynb

.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.10'
29+
python-version: '3.11'
3030

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

CHANGELOGS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change Logs
55
0.5.1
66
=====
77

8+
* :pr:`130` numpy 2.0
89
* :pr:`132` builds against scikit-learn==1.5.0, python 3.12
910

1011
0.5.0

_doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@ Source are available at `sdpython/mlinsights <https://github.com/sdpython/mlinsi
9898
Older versions
9999
++++++++++++++
100100

101+
* `0.5.1 <../v0.5.1/index.html>`_
101102
* `0.5.0 <../v0.5.0/index.html>`_

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
strategy:
66
matrix:
77
Python311-Linux:
8-
python.version: '3.11'
8+
python.version: '3.12'
99
maxParallel: 3
1010

1111
steps:

mlinsights/ext_test_case.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,39 @@ def call_f(self):
4545
return wrapper
4646

4747

48+
def is_azure() -> bool:
49+
"Tells if the job is running on Azure DevOps."
50+
return os.environ.get("AZURE_HTTP_USER_AGENT", "undefined") != "undefined"
51+
52+
53+
def is_windows() -> bool:
54+
return sys.platform == "win32"
55+
56+
57+
def is_apple() -> bool:
58+
return sys.platform == "darwin"
59+
60+
61+
def skipif_ci_windows(msg) -> Callable:
62+
"""
63+
Skips a unit test if it runs on :epkg:`azure pipeline` on :epkg:`Windows`.
64+
"""
65+
if is_windows() and is_azure():
66+
msg = f"Test does not work on azure pipeline (Windows). {msg}"
67+
return unittest.skip(msg)
68+
return lambda x: x
69+
70+
71+
def skipif_ci_apple(msg) -> Callable:
72+
"""
73+
Skips a unit test if it runs on :epkg:`azure pipeline` on :epkg:`Windows`.
74+
"""
75+
if is_apple() and is_azure():
76+
msg = f"Test does not work on azure pipeline (Apple). {msg}"
77+
return unittest.skip(msg)
78+
return lambda x: x
79+
80+
4881
def measure_time(
4982
stmt: Union[str, Callable],
5083
context: Optional[Dict[str, Any]] = None,
@@ -547,36 +580,3 @@ def unzip_files(
547580
elif not info.filename.endswith("/"):
548581
files.append(tos)
549582
return files
550-
551-
552-
def is_azure() -> bool:
553-
"Tells if the job is running on Azure DevOps."
554-
return os.environ.get("AZURE_HTTP_USER_AGENT", "undefined") != "undefined"
555-
556-
557-
def is_windows() -> bool:
558-
return sys.platform == "win32"
559-
560-
561-
def is_apple() -> bool:
562-
return sys.platform == "darwin"
563-
564-
565-
def skipif_ci_windows(msg) -> Callable:
566-
"""
567-
Skips a unit test if it runs on :epkg:`azure pipeline` on :epkg:`Windows`.
568-
"""
569-
if is_windows() and is_azure():
570-
msg = f"Test does not work on azure pipeline (Windows). {msg}"
571-
return unittest.skip(msg)
572-
return lambda x: x
573-
574-
575-
def skipif_ci_apple(msg) -> Callable:
576-
"""
577-
Skips a unit test if it runs on :epkg:`azure pipeline` on :epkg:`Windows`.
578-
"""
579-
if is_apple() and is_azure():
580-
msg = f"Test does not work on azure pipeline (Apple). {msg}"
581-
return unittest.skip(msg)
582-
return lambda x: x

pyproject.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ license = {file = "LICENSE.txt"}
2525
name = "mlinsights"
2626
readme = "README.rst"
2727
requires-python = ">=3.9"
28-
version = "0.5.0"
28+
version = "0.5.1"
2929

3030
[project.urls]
3131
homepage = "https://sdpython.github.io/doc/mlinsights/dev/"
@@ -39,17 +39,19 @@ dev = [
3939
"clang-format",
4040
"cmakelang",
4141
"coverage",
42-
"cython",
42+
"cython>=3.0.10",
4343
"cython-lint",
4444
"furo",
4545
"isort",
4646
"joblib",
4747
"lightgbm",
4848
"matplotlib",
49+
"numpy>=2.0",
4950
"onnx-array-api",
5051
"onnxruntime",
5152
"pandas",
5253
"psutil",
54+
"pybind11>=2.12.0",
5355
"pytest",
5456
"pytest-cov",
5557
"ruff",
@@ -67,10 +69,10 @@ dev = [
6769
requires = [
6870
"abi3audit; sys_platform == 'linux'",
6971
"auditwheel-symbols; sys_platform == 'linux'",
70-
"Cython",
72+
"Cython>=3.0.10",
7173
"cmake",
72-
"numpy",
73-
"pybind11",
74+
"numpy>=2.0",
75+
"pybind11>=2.12.0",
7476
"scikit-learn>=1.3.0",
7577
"scipy",
7678
"setuptools",
@@ -106,23 +108,23 @@ manylinux-x86_64-image = "manylinux2014"
106108
[tool.cibuildwheel.linux]
107109
archs = ["x86_64"]
108110
build = "cp*"
109-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* pypy* *musllinux*"
111+
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy* *musllinux*"
110112
manylinux-x86_64-image = "manylinux2014"
111113
before-build = "pip install auditwheel-symbols abi3audit"
112114
build-verbosity = 1
113115
repair-wheel-command = "auditwheel-symbols --manylinux 2014 {wheel} ; abi3audit {wheel} ; auditwheel repair -w {dest_dir} {wheel} || exit 0"
114116
# repair-wheel-command = "auditwheel-symbols --manylinux 2014 {wheel} || exit 0"
115117

116118
[tool.cibuildwheel.macos]
117-
archs = ["x86_64"]
119+
archs = ["arm64", "universal2"]
118120
build = "cp*"
119-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* pypy* pp*"
121+
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy* pp*"
120122
before-build = "brew install libomp llvm&&echo 'export PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\"' >> /Users/runner/.bash_profile"
121123

122124
[tool.cibuildwheel.windows]
123125
archs = ["AMD64"]
124126
build = "cp*"
125-
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* pypy*"
127+
skip = "cp36-* cp37-* cp38-* cp39-* cp313-* cp314-* pypy*"
126128

127129
[tool.cython-lint]
128130
max-line-length = 88

requirements-dev.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ chardet
44
clang-format
55
cmakelang
66
coverage
7-
cython>=3.0.5
7+
cython>=3.0.10
88
cython-lint
99
furo; sys_platform == 'linux'
1010
ijson
@@ -14,14 +14,16 @@ matplotlib
1414
memory_profiler>=0.55
1515
notebook
1616
numba
17+
numpy>=2.0
1718
onnxruntime
1819
pandas_streaming
19-
pybind11
20+
pybind11>=2.12.0
2021
pytest
2122
pytest-cov
2223
pytest-subtests
2324
rstcheck[sphinx,toml]
2425
ruff
26+
scikit-learn>=1.5.0
2527
seaborn
2628
skl2onnx>=1.14.1
2729
sphinx<7.2; sys_platform == 'linux' # furo still fails with sphinx==7.2.0 (issue unused furo.css)

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
cython>=3.0.5
2-
pybind11
1+
cython>=3.0.10
2+
numpy
3+
pybind11>=2.12.0
34
scikit-learn>=1.3.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def get_package_data():
670670

671671
setup(
672672
name="mlinsights",
673-
version=get_version_str(here, "0.5.0"),
673+
version=get_version_str(here, "0.5.1"),
674674
description=get_description(),
675675
long_description=get_long_description(here),
676676
author="Xavier Dupré",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy