Skip to content

1 package khisto python#5

Merged
bruno-at-orange merged 18 commits intomainfrom
1-package-khisto-python
Feb 27, 2026
Merged

1 package khisto python#5
bruno-at-orange merged 18 commits intomainfrom
1-package-khisto-python

Conversation

@bruno-at-orange
Copy link
Member

@bruno-at-orange bruno-at-orange commented Feb 18, 2026

Add pip packaging with cmake

  • We use scikit-build-core, a build backend for Python that uses CMake
  • Khiops sources are download with the fetch mechanism of CMake
  • The version of khiops is specify in pyproject.toml
    CMake extract the version from the file pyproject.toml
    The version is specified in the "tool.khiops" section as "khiops-version = "x.y.z""

Add copyright in headers of source files: close #4

@bruno-at-orange bruno-at-orange linked an issue Feb 18, 2026 that may be closed by this pull request
It fails with the errors:

- hook id: pyrefly
- exit code: 1

INFO Found `/Users/bruno/dvpt/khisto-python/pyproject.toml` marking project root, checking root directory with default configuration
ERROR Cannot set item in `dict[str | Any, list[float]]` [unsupported-operation]
   --> src/khisto/core/cli_adapter.py:141:27
    |
141 |             result[col] = np.array([float(row[col]) for row in rows], dtype=np.float64)
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
  Argument `ndarray[tuple[Any, ...], dtype[float64]]` is not assignable to parameter `value` with type `list[float]` in function `dict.__setitem__`
ERROR Cannot set item in `dict[str | Any, list[float]]` [unsupported-operation]
   --> src/khisto/core/cli_adapter.py:143:27
    |
143 |             result[col] = np.array([int(row[col]) for row in rows], dtype=np.int64)
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
  Argument `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]` is not assignable to parameter `value` with type `list[float]` in function `dict.__setitem__`
ERROR Cannot set item in `dict[str | Any, list[float]]` [unsupported-operation]
   --> src/khisto/core/cli_adapter.py:146:27
    |
146 |             result[col] = np.array([row[col] for row in rows], dtype=object)
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
  Argument `ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `value` with type `list[float]` in function `dict.__setitem__`
ERROR Returned type `dict[str | Any, list[float]]` is not assignable to declared return type `dict[str, ndarray[tuple[Any, ...], dtype[Any]]]` [bad-return]
   --> src/khisto/core/cli_adapter.py:148:12
    |
148 |     return result
    |            ^^^^^^
    |
INFO 4 errors
@bruno-at-orange bruno-at-orange marked this pull request as ready for review February 20, 2026 09:17
Copy link

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several comments (most of them just questions).

- We use scikit-build-core, a build backend for Python that uses CMake
- Khiops sources are download with the fetch mechanism of CMake
- The version of khiops is specify in pyproject.toml
CMake extract the version from the file  pyproject.toml
The version is specified in the "tool.khiops" section as "khiops-version = "x.y.z""
Copy link

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One CI comment pending.

@bruno-at-orange bruno-at-orange force-pushed the 1-package-khisto-python branch 4 times, most recently from fc1f340 to baa761e Compare February 20, 2026 17:42
Copy link

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two pending questions (see the comments).

- name: Test built wheel
run: |
pip install --find-links=wheelhouse khisto
pip install pytest>=8.3 pytest-cov>=6 pytest-xdist>=3.6 pytest-sugar>=1.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put these test dependencies into a test-requirements.txt file, then just do pip install -r test-requirements.txt.

@bruno-at-orange bruno-at-orange merged commit 4153484 into main Feb 27, 2026
9 of 24 checks passed
@bruno-at-orange bruno-at-orange deleted the 1-package-khisto-python branch February 27, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add license information in the header of each python file Package khisto-python

2 participants