Skip to content

Commit be7607e

Browse files
committed
Drop versioneer and hard-code the version, as for the Khiops binaries
Notes: - the version is hard-coded in the khiops/__init__.py file and not in pyproject.toml, because pyproject.toml is not accessible at runtime for an installed package - conda-build does not support pyproject.toml-style dynamic versions, hence the version has to be hard-coded in conda/meta.yaml as well - when moving to conda-forge, the version would have to be hard-coded anyway - the khiops/__init__.py vs conda/meta.yaml version coherence is checked in the conda package building and testing workflow.
1 parent d4f5fd1 commit be7607e

File tree

7 files changed

+22
-3094
lines changed

7 files changed

+22
-3094
lines changed

.github/workflows/conda.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,21 @@ jobs:
111111
fi
112112
conda install ${RC_LABEL}khiops-core=$KHIOPS_CORE_VERSION
113113
conda install --channel ./khiops-conda/ khiops
114+
- name: Install JQ test dependency (Linux / MacOS)
115+
if: runner.os != 'Windows'
116+
run: conda install jq
117+
- name: Test Conda / Python Package Version Coherence
118+
run: |
119+
PACKAGE_VERSION=$(python -c "import khiops; print(khiops.__version__)")
120+
CONDA_VERSION=$(conda list ^khiops$ --json | jq ".[].version")
121+
122+
# Fail if CONDA_VERSION is not identical to $PACKAGE_VERSION
123+
echo $CONDA_VERSION | grep -wq $PACKAGE_VERSION
124+
if [[ $? -ne 0 ]]
125+
then
126+
echo "::error::Conda package version $CONDA_VERSION does not match Python package version $PYTHON_VERSION"
127+
false
128+
fi
114129
- name: Test Khiops Installation Status
115130
run: kh-status
116131
- name: Test Khiops Installation Status (Conda-Based Environments)

khiops/__init__.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,9 @@
2222
(extension ".khcj")
2323
- sklearn: Scikit-Learn estimator classes to learn and use Khiops models
2424
"""
25-
import importlib
26-
import importlib.util
27-
import os
28-
import sys
29-
import warnings
30-
from copy import copy
31-
from pathlib import Path
32-
33-
from khiops._version import get_versions
3425
from khiops.core.internals.version import KhiopsVersion
3526

36-
__version__ = get_versions()["version"]
37-
del get_versions
27+
__version__ = "11.0.0.0b.0"
3828

3929

4030
def get_compatible_khiops_version():

0 commit comments

Comments
 (0)