Skip to content

Commit b8eaf88

Browse files
authored
Merge pull request #320 from KhiopsML/dev
Release 10.2.4.0
2 parents b25fa95 + 7575936 commit b8eaf88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1077
-1946
lines changed

.github/ISSUE_TEMPLATE/generic-issue-template.md renamed to .github/ISSUE_TEMPLATE.md

File renamed without changes.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
_Put your message here_
3+
4+
---
5+
6+
### TODO Before Asking for a Review
7+
- [ ] Rebase your branch to the latest version of `dev` (or `main` for release PRs)
8+
- [ ] Make sure all CI workflows are green
9+
- [ ] When adding a public feature/fix: Update the `Unreleased` section of `CHANGELOG.md` (no date)
10+
- [ ] Self-Review: Review "Files Changed" tab and fix any problems you find
11+
- API Docs (only if there are changes in docstrings, rst files or samples):
12+
- [ ] Check the docs build **without** warning: see the log of the API Docs workflow
13+
- [ ] Check that your changes render well in HTML: download the API Docs artifact and open `index.html`
14+
- If there are any problems it is faster to iterate by [building locally the API Docs](../blob/dev/doc/README.md#build-the-documentation)

.github/workflows/api-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
type: boolean
1010
default: false
1111
image-tag:
12-
default: 10.2.3.0
12+
default: latest
1313
description: Development Docker Image Tag
1414
pull_request:
1515
paths:
@@ -39,7 +39,7 @@ jobs:
3939
# because the `env` context is only accessible at the step level;
4040
# hence, it is hard-coded
4141
image: |-
42-
ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.2.3.0' }}
42+
ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || 'latest' }}
4343
# Use the 'runner' user (1001) from github so checkout actions work properly
4444
# https://github.com/actions/runner/issues/2033#issuecomment-1598547465
4545
options: --user 1001

.github/workflows/conda.yml

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
name: Conda Package
33
env:
4-
DEFAULT_SAMPLES_VERSION: 10.2.0
54
# Note: The default Khiops version must never be an alpha release as they are
65
# ephemeral. To test alpha versions run the workflow manually.
7-
DEFAULT_KHIOPS_CORE_VERSION: 10.2.3
6+
DEFAULT_KHIOPS_CORE_VERSION: 10.2.4
7+
DEFAULT_SAMPLES_VERSION: 10.2.4
88
on:
99
workflow_dispatch:
1010
inputs:
1111
khiops-core-version:
12-
default: 10.2.3
12+
default: 10.2.4
1313
description: khiops-core version for testing
1414
khiops-samples-version:
15-
default: 10.2.0
15+
default: 10.2.4
1616
description: khiops-samples version
1717
release-channel:
1818
type: choice
@@ -22,7 +22,16 @@ on:
2222
push:
2323
tags: ['*']
2424
pull_request:
25-
paths: [packaging/conda/**, '!packaging/conda/README.md', .github/workflows/conda.yml]
25+
paths:
26+
- setup.py
27+
- setup.cfg
28+
- pyproject.toml
29+
- LICENSE.md
30+
- versioneer.py
31+
- khiops/_version.py
32+
- packaging/conda/**,
33+
- '!packaging/conda/README.md'
34+
- .github/workflows/conda.yml
2635
defaults:
2736
run:
2837
shell: bash -el {0}
@@ -44,6 +53,7 @@ jobs:
4453
with:
4554
miniforge-version: latest
4655
python-version: '3.12'
56+
conda-remove-defaults: true
4757
- name: Install Dependency Requirements for Building Conda Packages
4858
run: conda install -y conda-build
4959
- name: Build the Conda Package
@@ -63,17 +73,17 @@ jobs:
6373
strategy:
6474
fail-fast: false
6575
matrix:
66-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
76+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
6777
env:
6878
- {os: ubuntu-20.04, json-image: '{"image": null}'}
6979
- {os: ubuntu-22.04, json-image: '{"image": null}'}
7080
- {os: ubuntu-22.04, json-image: '{"image": "rockylinux:8"}'}
7181
- {os: ubuntu-22.04, json-image: '{"image": "rockylinux:9"}'}
7282
- {os: windows-2019, json-image: '{"image": null}'}
7383
- {os: windows-2022, json-image: '{"image": null}'}
74-
- {os: macos-12, json-image: '{"image": null}'}
7584
- {os: macos-13, json-image: '{"image": null}'}
7685
- {os: macos-14, json-image: '{"image": null}'}
86+
- {os: macos-15, json-image: '{"image": null}'}
7787
runs-on: ${{ matrix.env.os }}
7888
container: ${{ fromJSON(matrix.env.json-image) }}
7989
steps:
@@ -82,6 +92,7 @@ jobs:
8292
with:
8393
miniforge-version: latest # needed for macOS 13
8494
python-version: ${{ matrix.python-version }}
95+
conda-remove-defaults: true
8596
- name: Download Conda Package Artifact
8697
uses: actions/download-artifact@v4
8798
with:
@@ -97,11 +108,30 @@ jobs:
97108
conda install --channel ./khiops-conda/ khiops
98109
- name: Test Khiops Installation Status
99110
run: kh-status
111+
- name: Test Khiops Installation Status (Conda-Based Environments)
112+
run: |
113+
# Set `python` to the current Conda Python executable
114+
PYTHON="$(type -P python)"
115+
116+
# Remove $CONDA_PREFIX/bin from PATH
117+
PATH=$(echo $PATH | sed "s#$CONDA_PREFIX/bin:##g")
118+
119+
# Unset *CONDA* environment variables
120+
# As a corrolary, CONDA_PREFIX is unset
121+
# Note: There is no way to remove these variables from GITHUB_ENV
122+
# (see https://github.com/actions/runner/issues/1126)
123+
for CONDA_VAR in $(env | grep CONDA)
124+
do
125+
unset $(echo $CONDA_VAR | cut -d '=' -f 1)
126+
done
127+
128+
# Note: kh-status is not reachable as it is not in PATH
129+
$PYTHON -c "import khiops.core as kh; kh.get_runner().print_status()"
100130
- name: Download Sample Datasets
101131
run: |
102132
kh-download-datasets \
103133
--version ${{ inputs.khiops-samples-version || env.DEFAULT_SAMPLES_VERSION }}
104-
- name: Test Conda Package Installation on Samples
134+
- name: Test Conda Package on Samples
105135
env:
106136
# Force > 2 CPU cores to launch mpiexec
107137
KHIOPS_PROC_NUMBER: 4
@@ -111,6 +141,31 @@ jobs:
111141
kh-samples core -i train_coclustering -e
112142
kh-samples sklearn -i khiops_classifier -e
113143
kh-samples sklearn -i khiops_coclustering -e
144+
- name: Test Conda Package on Some Samples (Conda-Based Environments)
145+
env:
146+
# Force > 2 CPU cores to launch mpiexec
147+
KHIOPS_PROC_NUMBER: 4
148+
run: |
149+
# Set `python` to the current Conda Python executable
150+
PYTHON="$(type -P python)"
151+
152+
# Remove $CONDA_PREFIX/bin from PATH
153+
PATH=$(echo $PATH | sed "s#$CONDA_PREFIX/bin:##g")
154+
155+
# Unset *CONDA* environment variables
156+
# As a corrolary, CONDA_PREFIX is unset
157+
# Note: There is no way to remove these variables from GITHUB_ENV
158+
# (see https://github.com/actions/runner/issues/1126)
159+
for CONDA_VAR in $(env | grep CONDA)
160+
do
161+
unset $(echo $CONDA_VAR | cut -d '=' -f 1)
162+
done
163+
164+
# Execute some Khiops and Khiops Coclustering samples
165+
# Note: kh-samples is not reachable as it is not in PATH
166+
$PYTHON -m khiops.samples.samples -i deploy_model -e
167+
$PYTHON -m khiops.samples.samples -i deploy_coclustering -e
168+
114169
# Release is only executed on tags
115170
# Note: For this job to work the secrets variables KHIOPS_ANACONDA_CHANNEL_TOKEN and
116171
# KHIOPS_DEV_ANACONDA_CHANNEL_TOKEN must be set with valid anaconda.org access tokens
@@ -132,6 +187,7 @@ jobs:
132187
with:
133188
miniforge-version: latest
134189
python-version: '3.12'
190+
conda-remove-defaults: true
135191
- name: Install Requirement Packages
136192
run: conda install -y anaconda-client conda-index
137193
- name: Reindex the package directory

.github/workflows/dev-docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
name: Dev Docker
33
env:
4-
DEFAULT_KHIOPS_REVISION: 10.2.3
4+
DEFAULT_KHIOPS_REVISION: 10.2.4
55
DEFAULT_IMAGE_INCREMENT: 0
66
DEFAULT_SERVER_REVISION: main
7-
DEFAULT_PYTHON_VERSIONS: 3.8 3.9 3.10 3.11 3.12
7+
DEFAULT_PYTHON_VERSIONS: 3.8 3.9 3.10 3.11 3.12 3.13
88
on:
99
pull_request:
1010
paths: [packaging/docker/khiopspydev/Dockerfile.*, .github/workflows/dev-docker.yml]
1111
workflow_dispatch:
1212
inputs:
1313
khiops-revision:
1414
type: string
15-
default: 10.2.3
15+
default: 10.2.4
1616
description: Khiops Revision
1717
image-increment:
1818
type: number
@@ -28,7 +28,7 @@ on:
2828
description: Set as 'latest'
2929
python-versions:
3030
type: string
31-
default: 3.8 3.9 3.10 3.11 3.12
31+
default: 3.8 3.9 3.10 3.11 3.12 3.13
3232
description: Python versions to support
3333
server-revision:
3434
type: string

.github/workflows/pip.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
---
22
name: Pip Package
33
env:
4-
DEFAULT_SAMPLES_REVISION: main
4+
DEFAULT_SAMPLES_REVISION: 10.2.4
55
on:
66
workflow_dispatch:
77
inputs:
88
samples-revision:
9-
default: main
9+
default: 10.2.4
1010
description: khiops-samples repo revision
1111
image-tag:
12-
default: 10.2.3.0
12+
default: latest
1313
description: Development Docker Image Tag
1414
pull_request:
15+
paths:
16+
- setup.py
17+
- setup.cfg
18+
- pyproject.toml
19+
- LICENSE.md
20+
- versioneer.py
21+
- khiops/_version.py
22+
- .github/workflows/pip.yml
1523
push:
1624
tags: ['*']
1725
concurrency:
@@ -56,7 +64,7 @@ jobs:
5664
# because the `env` context is only accessible at the step level;
5765
# hence, it is hard-coded
5866
image: |-
59-
ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || '10.2.3.0' }}
67+
ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || 'latest' }}
6068
steps:
6169
- name: Set parameters as env
6270
run: |

.github/workflows/unit-tests.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
---
22
name: Unit Tests
33
env:
4-
DEFAULT_SAMPLES_REVISION: main
5-
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.2.3
4+
DEFAULT_SAMPLES_REVISION: 10.2.4
5+
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.2.4
66
on:
77
workflow_dispatch:
88
inputs:
99
samples-revision:
10-
default: main
11-
description: Git tag, branch or commit for the khiops-samples repository
10+
default: 10.2.4
11+
description: Git Tag/Branch/Commit for the khiops-samples Repo
1212
image-tag:
13-
default: 10.2.3.0
13+
default: latest
1414
description: Development Docker Image Tag
1515
khiops-desktop-revision:
16-
default: 10.2.3
16+
default: 10.2.4
1717
description: Khiops Windows Desktop Application Version
1818
run-long-tests:
1919
type: boolean
2020
required: false
2121
default: false
2222
description: Execute long tests
2323
pull_request:
24+
paths:
25+
- khiops/**.py
26+
- pykhiops/**.py # TODO: Remove for Khiops 11
27+
- tests/**.py
28+
- tests/resources/**
29+
- '!tests/resources/**.md'
30+
- .github/workflows/unit-tests.yml
2431
concurrency:
2532
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2633
cancel-in-progress: true
@@ -30,13 +37,13 @@ jobs:
3037
strategy:
3138
fail-fast: false
3239
matrix:
33-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
40+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
3441
container:
3542
# 'latest' default image tag cannot be set as an environment variable,
3643
# because the `env` context is only accessible at the step level;
3744
# hence, it is hard-coded
3845
image: |-
39-
ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.2.3.0' }}
46+
ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || 'latest' }}
4047
credentials:
4148
username: ${{ github.actor }}
4249
password: ${{ secrets.GITHUB_TOKEN }}
@@ -54,10 +61,10 @@ jobs:
5461
fetch-depth: 0
5562
# We move SAMPLES_REVISION to the environment so that we can use
5663
# them in both push and workflow_dispatch events
57-
- name: Move SAMPLES_REVISION to the environment (push event)
58-
if: github.event_name == 'push'
64+
- name: Set SAMPLES_REVISION on 'pull_request' events
65+
if: github.event_name == 'pull_request'
5966
run: echo "SAMPLES_REVISION=${DEFAULT_SAMPLES_REVISION}" >> "$GITHUB_ENV"
60-
- name: Move SAMPLES_REVISION to the environment (workflow_dispatch event)
67+
- name: Set SAMPLES_REVISION on 'workflow_dispatch' events
6168
if: github.event_name == 'workflow_dispatch'
6269
run: echo "SAMPLES_REVISION=${{ inputs.samples-revision }}" >> "$GITHUB_ENV"
6370
- name: Checkout Khiops samples
@@ -78,15 +85,15 @@ jobs:
7885
for CONDA_ENV in $CONDA_ENVS
7986
do
8087
mkdir -p -m u+rwx reports/"$CONDA_ENV"
81-
88+
8289
# install within the conda environments without activating them
8390
$CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
8491
$CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
8592
done
8693
- name: Install khiops-python dependencies
8794
if: success() || failure()
8895
run: |
89-
# The following git command is required,
96+
# The following git command is required,
9097
# as the Git repository is in a directory the current user does not own,
9198
# Python versioneer fails to compute the current version correctly otherwise
9299
git config --global --add safe.directory $(realpath .)
@@ -96,6 +103,8 @@ jobs:
96103
CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
97104
for CONDA_ENV in $CONDA_ENVS
98105
do
106+
# Since Python 3.13, setuptools is not installed automatically anymore
107+
$CONDA install -y -n "$CONDA_ENV" setuptools
99108
$CONDA run --no-capture-output -n "$CONDA_ENV" python setup.py egg_info
100109
$CONDA install -y -n "$CONDA_ENV" `grep -v "^\[" khiops.egg-info/requires.txt`
101110
rm -rf khiops.egg-info
@@ -199,7 +208,7 @@ jobs:
199208
- name: Install khiops-python dev dependencies
200209
shell: pwsh
201210
run: |
202-
# The following git command is required,
211+
# The following git command is required,
203212
# as the Git repository is in a directory the current user does not own,
204213
# Python versioneer fails to compute the current version correctly otherwise
205214
git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
@@ -222,6 +231,8 @@ jobs:
222231
shell: pwsh
223232
run: |
224233
$ErrorActionPreference = 'Stop'
234+
Set-StrictMode -Version Latest
235+
$PSNativeCommandUseErrorActionPreference = $true
225236
226237
# Refresh environment variables by using the Chocolatey tool
227238
# Otherwise, the env vars set in the registry by the Khiops installer do not get updated
@@ -237,7 +248,7 @@ jobs:
237248
# Print status
238249
Invoke-Expression -Command "$Python -c 'import khiops.core as kh; kh.get_runner().print_status()'"
239250
240-
# Run integration tests on Ubuntu and Rocky
251+
# Run integration tests on Windows
241252
Invoke-Expression -Command "$Python -m unittest -v tests.test_khiops_integrations"
242253
243254
# Execute Khiops sample (train and deploy model)
@@ -256,7 +267,7 @@ jobs:
256267
# because the `env` context is only accessible at the step level;
257268
# hence, it is hard-coded
258269
image: |-
259-
ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || '10.2.3.0' }}
270+
ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || 'latest' }}
260271
credentials:
261272
username: ${{ github.actor }}
262273
password: ${{ secrets.GITHUB_TOKEN }}
@@ -281,7 +292,7 @@ jobs:
281292
path: khiops-samples
282293
- name: Install khiops-python dev dependencies
283294
run: |
284-
# The following git command is required,
295+
# The following git command is required,
285296
# as the Git repository is in a directory the current user does not own,
286297
# Python versioneer fails to compute the current version correctly otherwise
287298
git config --global --add safe.directory $(realpath .)

0 commit comments

Comments
 (0)