Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 16 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ defaults:
run:
shell: bash

# Do not let uv fall back to a Python installed by the runner image.
env:
UV_PYTHON_PREFERENCE: only-managed
Comment thread
popescu-v marked this conversation as resolved.
Resolved

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v9.0.0
- uses: astral-sh/setup-uv@v10.3.2
with:
enable-cache: true
version: "0.11.32"
enable-cache: false
version: "0.13.7"
python-version: "3.13"

- name: Install dev dependencies
run: uv sync --group dev
Expand All @@ -37,54 +42,30 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v9.0.0
- uses: astral-sh/setup-uv@v10.3.2
with:
enable-cache: true
version: "0.11.32"
enable-cache: false
version: "0.13.7"
python-version: "3.13"

- name: Test base API without optional dependencies
run: uv run --isolated --no-project --with . python scripts/check-base-install.py

get-python-versions:
name: Get Python versions
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.versions.outputs.python-versions }}
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v9.0.0
with:
version: "0.11.32"

- name: Discover available Python versions
id: versions
run: |
min_ver=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['requires-python'])")
versions=$(
uv python list --all-versions "$min_ver" \
| grep -oP 'cpython-\K\d+\.\d+(?=\.\d+-)' \
| sort -uV \
| python3 -c "import sys, json; print(json.dumps(sys.stdin.read().split()))"
)
echo "python-versions=$versions" >> $GITHUB_OUTPUT

test:
name: Test (Python ${{ matrix.python-version }})
needs: get-python-versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-versions) }}
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v9.0.0
- uses: astral-sh/setup-uv@v10.3.2
with:
enable-cache: true
enable-cache: false
python-version: ${{ matrix.python-version }}
version: "0.11.32"
version: "0.13.7"

- name: Install dev dependencies
run: uv sync --group dev --extra all
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
permissions:
contents: read
packages: read
env:
UV_PYTHON_PREFERENCE: only-managed
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
# queued. However, do NOT cancel in-progress runs as we want to allow these production deployments
# to complete.
Expand All @@ -30,28 +32,22 @@ concurrency:
jobs:
build:
if: github.event_name != 'pull_request' || github.event.action != 'closed'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout khisto-python
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Set up UV
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.3.2
with:
enable-cache: true
version: "0.11.32"
enable-cache: false
version: "0.13.7"
python-version: "3.13"
- name: Install pandoc
run: sudo apt-get install -y pandoc
- name: Install doc build requirements
run: |
uv venv .build-env
uv sync
run: uv sync --group docs
- name: Build Sphinx Documentation
run: |
. .build-env/bin/activate
uv run --active --directory docs make html
deactivate
run: uv run --directory docs make html
- name: Upload the docs as an artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -64,7 +60,7 @@ jobs:
github.event.pull_request.head.repo.full_name == github.repository &&
(github.event.action == 'closed' || needs.build.result == 'success')
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
Expand All @@ -88,7 +84,7 @@ jobs:
publish:
if: github.event_name == 'workflow_dispatch' && inputs.deploy-gh-pages == true
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/pack-pip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,27 @@ defaults:
shell: bash
env:
KEYPAIR: KP_Khiops_HSM
UV_PYTHON_PREFERENCE: only-managed

jobs:
build-wheel:
name: Build wheel
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025-vs2026, windows-11-vs2026-arm, macos-15-intel, macos-15]
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025-vs2026, windows-11-vs2026-arm, macos-15-intel, macos-26]
env:
SIGN_WINDOWS_WHEELS: ${{ github.event_name == 'workflow_dispatch' && inputs.signature-activation }}
steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Set up UV
uses: astral-sh/setup-uv@v9.0.0
uses: astral-sh/setup-uv@v10.3.2
with:
enable-cache: true
version: "0.11.32"
enable-cache: false
version: "0.13.7"
python-version: "3.13"

- name: Load Visual C++ Environment Variables (Windows)
if: runner.os == 'Windows'
Expand All @@ -61,14 +59,15 @@ jobs:
set >> %GITHUB_ENV%

- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
uses: pypa/cibuildwheel@v4.3.4

- name: Test built wheel
env:
UV_PROJECT_ENVIRONMENT: .test-env
run: |
uv venv .test-env
uv pip install --python .test-env --find-links=wheelhouse "khisto[all]"
uv sync --python .test-env --group dev --no-install-project
uv run --python .test-env pytest tests/ --no-cov
uv sync --group dev --extra all --no-install-project
uv pip install --python .test-env wheelhouse/khisto-*.whl
uv run --no-sync pytest tests/ --no-cov

# Windows wheels are unpackad, signed and repacked before uploading
- name: Set SIGN_X64_WHEEL flag
Expand All @@ -77,14 +76,11 @@ jobs:
- name: Warn smctl does not support ARM64 yet
if: runner.os == 'Windows' && runner.arch == 'ARM64' && env.SIGN_WINDOWS_WHEELS == 'true'
run: echo "::warning::smctl does not support ARM64 yet; the ARM64 wheel will not be signed"
- name: Install wheel package for signing
if: env.SIGN_X64_WHEEL == 'true'
run: python -m pip install wheel
- name: Unpack khisto wheel
if: env.SIGN_X64_WHEEL == 'true'
run: |
mkdir -p wheelhouse/unpacked
python -m wheel unpack wheelhouse/khisto-*.whl --dest wheelhouse/unpacked
uvx wheel unpack wheelhouse/khisto-*.whl --dest wheelhouse/unpacked
- name: Setup SM_CLIENT_CERT_FILE from base64 secret data
if: env.SIGN_X64_WHEEL == 'true'
run: |
Expand All @@ -105,7 +101,7 @@ jobs:
if: env.SIGN_X64_WHEEL == 'true'
run: |
rm wheelhouse/khisto-*.whl
python -m wheel pack wheelhouse/unpacked/khisto-* --dest-dir wheelhouse
uvx wheel pack wheelhouse/unpacked/khisto-* --dest-dir wheelhouse
- uses: actions/upload-artifact@v7
with:
name: pkg-wheel-${{ matrix.os }}
Expand All @@ -128,7 +124,7 @@ jobs:
pattern: pkg-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@v1.14.3
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
Expand All @@ -149,6 +145,6 @@ jobs:
pattern: pkg-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@v1.14.3
with:
verbose: true
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to Khisto are documented in this file.

## Unreleased

## [1.0.4] - 2026-10-23

### Security

- Rebuild 1.0.3 with patched packaging tools after the emSign CA incident.
Application code is unchanged.

## [1.0.3] - 2026-10-22

### Changed
Expand Down Expand Up @@ -61,6 +68,7 @@ First stable release.
- Prebuilt wheels for Linux, macOS, and Windows.
- Public API documentation and usage examples.

[1.0.4]: https://github.com/KhiopsML/khisto-python/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/KhiopsML/khisto-python/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/KhiopsML/khisto-python/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/KhiopsML/khisto-python/compare/v1.0.0...v1.0.1
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "khisto"
version = "1.0.3"
version = "1.0.4"
description = "Optimal histogram visualization using the Khiops algorithm"
readme = "README.md"
license = "BSD-3-Clause-Clear"
Expand Down Expand Up @@ -82,7 +82,7 @@ dev = [
]

[build-system]
requires = ["scikit-build-core>=0.11.6", "ninja"]
requires = ["scikit-build-core>=1.1.2", "ninja"]
build-backend = "scikit_build_core.build"

[tool.pytest.ini_options]
Expand Down
Loading