Skip to content

Commit 49400ed

Browse files
authored
Merge pull request #429 from KhiopsML/dev-v10
Release 10.3.2.0
2 parents bd69a75 + 4521a51 commit 49400ed

File tree

12 files changed

+105
-75
lines changed

12 files changed

+105
-75
lines changed

.github/workflows/api-docs.yml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ env:
55
on:
66
workflow_dispatch:
77
inputs:
8-
deploy-gh-pages:
9-
description: Deploy GH Pages
10-
required: true
11-
type: boolean
12-
default: false
138
khiops-python-tutorial-revision:
149
default: 10.3.1.0
1510
description: khiops-python-tutorial repo revision
@@ -24,6 +19,8 @@ on:
2419
- doc/*.py
2520
- khiops/**.py
2621
- .github/workflows/api-docs.yml
22+
push:
23+
tags: ['*']
2724
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2825
permissions:
2926
contents: read
@@ -49,20 +46,10 @@ jobs:
4946
# https://github.com/actions/runner/issues/2033#issuecomment-1598547465
5047
options: --user 1001
5148
steps:
52-
- name: Set parameters as env
53-
run: |
54-
KHIOPS_PYTHON_TUTORIAL_REVISION=${{ inputs.khiops-python-tutorial-revision || env.DEFAULT_KHIOPS_PYTHON_TUTORIAL_REVISION }}
55-
echo "KHIOPS_PYTHON_TUTORIAL_REVISION=$KHIOPS_PYTHON_TUTORIAL_REVISION" >> "$GITHUB_ENV"
5649
- name: Checkout khiops-python
5750
uses: actions/checkout@v4
5851
with:
5952
fetch-depth: 0
60-
- name: Checkout khiops-python-tutorial
61-
uses: actions/checkout@v4
62-
with:
63-
repository: khiopsml/khiops-python-tutorial
64-
ref: ${{ env.KHIOPS_PYTHON_TUTORIAL_REVISION }}
65-
path: doc/khiops-python-tutorial
6653
- name: Add pip scripts directory to path
6754
run: echo PATH="$PATH:/github/home/.local/bin" >> "$GITHUB_ENV"
6855
- name: Install doc build requirements
@@ -75,25 +62,43 @@ jobs:
7562
# Install the doc python requirements
7663
cd doc
7764
pip3 install -U -r requirements.txt
65+
# Clone the Khiops Python tutorial repository while building the documentation
7866
- name: Build Sphinx Documentation
7967
run: |
8068
cd doc
81-
./create-doc -t
69+
./create-doc -t -d -g \
70+
${{ inputs.khiops-python-tutorial-revision || env.DEFAULT_KHIOPS_PYTHON_TUTORIAL_REVISION }}
8271
- name: Upload the docs as an artifact
83-
uses: actions/upload-pages-artifact@v3
72+
uses: actions/upload-artifact@v4
8473
with:
85-
path: doc/_build/html/
86-
# Deploy only when the user explicitly (and manually) orders it
87-
deploy:
88-
if: github.event_name == 'workflow_dispatch' && inputs.deploy-gh-pages == true
89-
runs-on: ubuntu-latest
74+
name: api-docs
75+
path: ./doc/_build/html/
76+
# Release on Git tag
77+
release:
78+
if: github.ref_type == 'tag'
9079
needs: build
91-
environment:
92-
name: github-pages
93-
url: ${{ steps.deployment.outputs.page_url }}
80+
runs-on: ubuntu-22.04
81+
permissions:
82+
contents: write
9483
steps:
95-
- name: Setup Pages
96-
uses: actions/configure-pages@v4
97-
- name: Deploy API Docs to GitHub Pages
98-
id: deployment
99-
uses: actions/deploy-pages@v4
84+
- name: Download docs artifact
85+
uses: actions/download-artifact@v4
86+
with:
87+
name: api-docs
88+
path: ./doc/_build/html/
89+
- name: Create docs release zip archive
90+
uses: thedoctor0/zip-release@0.7.6
91+
with:
92+
type: zip
93+
path: ./doc/_build/html/
94+
filename: khiops-api-docs-${{ github.ref_name }}.zip
95+
- name: Release the docs zip archive
96+
uses: ncipollo/release-action@v1.15.0
97+
with:
98+
allowUpdates: true
99+
artifacts: ./khiops-api-docs-${{ github.ref_name }}.zip
100+
body: '**For testing purposes only**'
101+
draft: false
102+
makeLatest: false
103+
prerelease: true
104+
updateOnlyUnreleased: true

.github/workflows/conda.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: Conda Package
33
env:
44
# Note: The default Khiops version must never be an alpha release as they are
55
# ephemeral. To test alpha versions run the workflow manually.
6-
DEFAULT_KHIOPS_CORE_VERSION: 10.3.1
7-
DEFAULT_SAMPLES_VERSION: 10.2.4
6+
DEFAULT_KHIOPS_CORE_VERSION: 10.3.2
7+
DEFAULT_SAMPLES_VERSION: 10.3.2
88
on:
99
workflow_dispatch:
1010
inputs:
1111
khiops-core-version:
12-
default: 10.3.1
12+
default: 10.3.2
1313
description: khiops-core version for testing
1414
khiops-samples-version:
15-
default: 10.2.4
15+
default: 10.3.2
1616
description: khiops-samples version
1717
release-channel:
1818
type: choice
@@ -57,10 +57,8 @@ jobs:
5757
- name: Install Dependency Requirements for Building Conda Packages
5858
run: conda install -y conda-build
5959
- name: Build the Conda Package
60-
# Note: The "khiops-dev" conda channel is needed to retrieve the "khiops-core" package.
61-
# The "test" part of the conda recipe needs this package.
6260
run: |
63-
conda build --channel khiops-dev --output-folder ./khiops-conda ./packaging/conda
61+
conda build --output-folder ./khiops-conda ./packaging/conda
6462
- name: Upload Conda Package Artifact
6563
uses: actions/upload-artifact@v4
6664
with:
@@ -80,8 +78,8 @@ jobs:
8078
- {os: ubuntu-24.04, json-image: '{"image": null}'}
8179
- {os: ubuntu-22.04, json-image: '{"image": "rockylinux:8"}'}
8280
- {os: ubuntu-22.04, json-image: '{"image": "rockylinux:9"}'}
83-
- {os: windows-2019, json-image: '{"image": null}'}
8481
- {os: windows-2022, json-image: '{"image": null}'}
82+
- {os: windows-2025, json-image: '{"image": null}'}
8583
- {os: macos-13, json-image: '{"image": null}'}
8684
- {os: macos-14, json-image: '{"image": null}'}
8785
- {os: macos-15, json-image: '{"image": null}'}
@@ -105,7 +103,7 @@ jobs:
105103
echo "KHIOPS_CORE_VERSION=$KHIOPS_CORE_VERSION" >> "$GITHUB_ENV"
106104
- name: Install the Khiops Conda package
107105
run: |
108-
conda install --channel khiops-dev khiops-core=$KHIOPS_CORE_VERSION
106+
conda install khiops-core=$KHIOPS_CORE_VERSION
109107
conda install --channel ./khiops-conda/ khiops
110108
- name: Test Khiops Installation Status
111109
run: kh-status

.github/workflows/dev-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Dev Docker
33
env:
4-
DEFAULT_KHIOPS_REVISION: 10.3.1
4+
DEFAULT_KHIOPS_REVISION: 10.3.2
55
DEFAULT_IMAGE_INCREMENT: 0
66
DEFAULT_SERVER_REVISION: main
77
DEFAULT_PYTHON_VERSIONS: 3.8 3.9 3.10 3.11 3.12 3.13
@@ -14,7 +14,7 @@ on:
1414
inputs:
1515
khiops-revision:
1616
type: string
17-
default: 10.3.1
17+
default: 10.3.2
1818
description: Khiops Revision
1919
image-increment:
2020
type: number

.github/workflows/pip.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
name: Pip Package
33
env:
4-
DEFAULT_SAMPLES_REVISION: 10.2.4
4+
DEFAULT_SAMPLES_REVISION: 10.3.2
55
on:
66
workflow_dispatch:
77
inputs:
88
samples-revision:
9-
default: 10.2.4
9+
default: 10.3.2
1010
description: khiops-samples repo revision
1111
image-tag:
1212
default: latest
@@ -106,9 +106,10 @@ jobs:
106106
kh-samples core -i train_coclustering -e
107107
kh-samples sklearn -i khiops_classifier -e
108108
109-
# Test that the line containing "MPI command" also contains
110-
# an executable named "mpiexec"
111-
kh-status | grep "MPI command" | grep -wq "mpiexec"
109+
# Test that the line containing "MPI command" does not contain "<empty>"
110+
# The MPI command is not always named mpiexec, but can be orterun etc
111+
# (as given by khiops_env)
112+
kh-status | grep "MPI command" | grep -vwq "<empty>"
112113
release:
113114
if: github.ref_type == 'tag'
114115
needs: [build, test]

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
name: Tests
33
env:
4-
DEFAULT_SAMPLES_REVISION: 10.2.4
5-
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.3.1
4+
DEFAULT_SAMPLES_REVISION: 10.3.2
5+
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.3.2
66
on:
77
workflow_dispatch:
88
inputs:
99
samples-revision:
10-
default: 10.2.4
10+
default: 10.3.2
1111
description: Git Tag/Branch/Commit for the khiops-samples Repo
1212
image-tag:
1313
default: latest
1414
description: Development Docker Image Tag
1515
khiops-desktop-revision:
16-
default: 10.3.1
16+
default: 10.3.2
1717
description: Khiops Windows Desktop Application Version
1818
run-expensive-tests:
1919
type: boolean
@@ -211,7 +211,7 @@ jobs:
211211
tests/resources/general_options/general_options/*/*._kh
212212
retention-days: 7
213213
check-khiops-integration-on-windows:
214-
runs-on: windows-2019
214+
runs-on: windows-2022
215215
steps:
216216
- name: Download the Khiops Desktop NSIS Installer
217217
shell: pwsh

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
- Example: 10.2.1.4 is the 5th version that supports khiops 10.2.1.
77
- Internals: Changes in *Internals* sections are unlikely to be of interest for data scientists.
88

9+
## 10.3.2.0 - 2025-07-03
10+
11+
### Fixed
12+
- (`sklearn`) Documentation display for the `train_test_split_dataset` sklearn
13+
helper function.
14+
915
## 10.3.1.0 - 2025-04-16
1016

1117
### Added

doc/create-doc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
77
# Default parameter values
88
TRANSFORM_NOTEBOOKS=""
99
DOWNLOAD_REPO=""
10-
DEFAULT_KHIOPS_TUTORIAL_REPO_URL="git@github.com:KhiopsML/khiops-python-tutorial.git"
10+
DEFAULT_KHIOPS_TUTORIAL_REPO_URL="https://github.com/KhiopsML/khiops-python-tutorial.git"
11+
DEFAULT_KHIOPS_TUTORIAL_REPO_REF="main"
1112
DEFAULT_KHIOPS_TUTORIAL_DIR="${SCRIPT_DIR}/khiops-python-tutorial"
1213

1314
# Function to display the usage help
1415
usage() {
15-
echo "Usage: create-doc [-r REPO_URL] [-d] [-t] [-l]"
16+
echo "Usage: create-doc [-r REPO_URL] [-d] [-t] [-g] [-l]"
1617
echo "Options:"
1718
echo " -d: Downloads the Khiops tutorial repository. Implies -t. See also -r."
1819
echo " -t: Transform the Khiops Jupyter notebooks tutorials into reST."
19-
echo " -r: Set the Khiops tutorial repository. The default is"
20+
echo " -r: Set the Khiops tutorial repository URL. The default is"
2021
echo " '$DEFAULT_KHIOPS_TUTORIAL_REPO_URL'."
22+
echo " -g: Set the Khiops tutorial repository Git reference. The default is"
23+
echo " '$DEFAULT_KHIOPS_TUTORIAL_REPO_REF'."
2124
echo " -l: Directory of the local copy of the khiops tutorial repository. The default is"
2225
echo " '$DEFAULT_KHIOPS_TUTORIAL_DIR'."
2326
echo ""
@@ -29,17 +32,19 @@ exit_bad() {
2932
}
3033

3134
# Read command line arguments
32-
while getopts "dtr:l:" opt
35+
while getopts "dtrg:l:" opt
3336
do
3437
case "$opt" in
3538
d ) DOWNLOAD_REPO=true && TRANSFORM_NOTEBOOKS="true" ;;
3639
t ) TRANSFORM_NOTEBOOKS="true" ;;
3740
r ) KHIOPS_TUTORIAL_REPO_URL="$OPTARG" ;;
41+
g ) KHIOPS_TUTORIAL_REPO_REF="$OPTARG" ;;
3842
l ) KHIOPS_TUTORIAL_REPO_DIR="$OPTARG" ;;
3943
* ) exit_bad ;;
4044
esac
4145
done
4246
KHIOPS_TUTORIAL_REPO_URL="${KHIOPS_TUTORIAL_REPO_URL:-$DEFAULT_KHIOPS_TUTORIAL_REPO_URL}"
47+
KHIOPS_TUTORIAL_REPO_REF="${KHIOPS_TUTORIAL_REPO_REF:-$DEFAULT_KHIOPS_TUTORIAL_REPO_REF}"
4348
KHIOPS_TUTORIAL_REPO_DIR="${KHIOPS_TUTORIAL_REPO_DIR:-$DEFAULT_KHIOPS_TUTORIAL_DIR}"
4449

4550

@@ -69,10 +74,9 @@ done
6974
# Clone the Khiops tutorial repository
7075
if [[ $DOWNLOAD_REPO ]]
7176
then
72-
echo "Obtaining khiops-python-tutorial"
77+
echo "Obtaining khiops-python-tutorial revision $KHIOPS_TUTORIAL_REPO_REF"
7378
rm -rf "$KHIOPS_TUTORIAL_REPO_DIR"
74-
khiops_python_tutorial_repo_branch="main"
75-
git clone --depth 1 --branch="$khiops_python_tutorial_repo_branch" \
79+
git clone --depth 1 --branch="$KHIOPS_TUTORIAL_REPO_REF" \
7680
"$KHIOPS_TUTORIAL_REPO_URL" "$KHIOPS_TUTORIAL_REPO_DIR" \
7781
&& rm -rf "$KHIOPS_TUTORIAL_REPO_DIR/.git"
7882
fi

doc/sklearn/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ khiops.sklearn
1515
:nosignatures:
1616

1717
estimators
18+
helpers
1819

1920
Related Docs
2021
------------

khiops/core/internals/runner.py

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,14 @@ def _infer_env_bin_dir_for_conda_based_installations():
146146
# Match $CONDA_PREFIX/[Ll]ib/python3.X/site-packages/khiops/core/internals/runner.py
147147
else:
148148
conda_env_dir = current_file_path.parents[6]
149-
env_bin_dir = os.path.join(str(conda_env_dir), "bin")
149+
150+
# Conda env binary dir is:
151+
# - on Windows: conda_env_dir\Library\bin
152+
# - on Linux/macOS: conda_env_dir\bin
153+
if platform.system() == "Windows":
154+
env_bin_dir = os.path.join(str(conda_env_dir), "Library", "bin")
155+
else:
156+
env_bin_dir = os.path.join(str(conda_env_dir), "bin")
150157

151158
return env_bin_dir
152159

@@ -168,7 +175,10 @@ def _check_conda_env_bin_dir(conda_env_bin_dir):
168175

169176
# Conda env dir is not equal to its root dir
170177
# Conda env bin dir exists, along with the `conda-meta` dir
178+
# Note: On Windows, Conda env bin dir equals conda env dir\Library\bin
171179
conda_env_dir_path = conda_env_bin_dir_path.parent
180+
if platform.system() == "Windows":
181+
conda_env_dir_path = conda_env_dir_path.parent
172182
if (
173183
str(conda_env_dir_path) != conda_env_dir_path.root # `.root` is an `str`
174184
and conda_env_bin_dir_path.is_dir()
@@ -180,20 +190,25 @@ def _check_conda_env_bin_dir(conda_env_bin_dir):
180190

181191
def _infer_khiops_installation_method(trace=False):
182192
"""Return the Khiops installation method"""
183-
# We are in a conda environment if
184-
# - if the CONDA_PREFIX environment variable exists and,
185-
# - if MODL, MODL_Coclustering and mpiexec files exists in
186-
# `$CONDA_PREFIX/bin`
187-
#
188-
# Note: The check that MODL and MODL_Coclustering are actually executable is done
193+
# We are in a Conda environment if
194+
# - the CONDA_PREFIX environment variable exists and,
195+
# - the khiops_env script exists within:
196+
# - `%CONDA_PREFIX\Library\bin%` on Windows
197+
# - `$CONDA_PREFIX/bin` on Linux and MacOS
198+
# Note: The check that the Khiops binaries are actually executable is done
189199
# afterwards by the initializations method.
190-
# We are in a conda env if the Khiops binaries exists within `$CONDA_PREFIX/bin`
191-
if "CONDA_PREFIX" in os.environ and _khiops_env_file_exists(
192-
os.path.join(os.environ["CONDA_PREFIX"], "bin")
193-
):
194-
installation_method = "conda"
195-
# Otherwise, we choose between conda-based and local (default choice)
196-
else:
200+
installation_method = "unknown"
201+
if "CONDA_PREFIX" in os.environ:
202+
conda_env_dir = os.environ["CONDA_PREFIX"]
203+
if platform.system() == "Windows":
204+
conda_binary_dir = os.path.join(conda_env_dir, "Library", "bin")
205+
else:
206+
conda_binary_dir = os.path.join(conda_env_dir, "bin")
207+
if _khiops_env_file_exists(conda_binary_dir):
208+
installation_method = "conda"
209+
# Otherwise (installation_method is still "unknown"), we choose between
210+
# conda-based and local (default choice)
211+
if installation_method == "unknown":
197212
env_bin_dir = _infer_env_bin_dir_for_conda_based_installations()
198213
if trace:
199214
print(f"Environment binary dir: '{env_bin_dir}'")

packaging/conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requirements:
2626
- python
2727
run:
2828
- python
29-
- khiops-core >=10.3.1,<10.3.2
29+
- khiops-core >=10.3.2,<10.3.3
3030
- pandas >=0.25.3
3131
- scikit-learn >=0.22.2
3232
run_constrained:

0 commit comments

Comments
 (0)