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
17 changes: 12 additions & 5 deletions .github/workflows/dev-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ env:
DEFAULT_IMAGE_INCREMENT: 0
DEFAULT_SERVER_REVISION: main
DEFAULT_PYTHON_VERSIONS: 3.10 3.11 3.12 3.13 3.14
DEFAULT_KHIOPS_GCS_DRIVER_REVISION: 0.0.14
DEFAULT_KHIOPS_S3_DRIVER_REVISION: 0.0.14
DEFAULT_KHIOPS_GCS_DRIVER_REVISION: 0.0.16
DEFAULT_KHIOPS_S3_DRIVER_REVISION: 0.0.15
DEFAULT_KHIOPS_AZURE_DRIVER_REVISION: 0.0.6 # XXX : to modify soon
on:
pull_request:
paths: [packaging/docker/khiopspydev/Dockerfile.*, .github/workflows/dev-docker.yml]
Expand All @@ -27,7 +28,7 @@ on:
set-latest:
type: boolean
default: false
description: Set as 'latest'
description: Set as 'latest' (if the current branch is 'main')
python-versions:
type: string
default: 3.10 3.11 3.12 3.13 3.14
Expand All @@ -38,12 +39,16 @@ on:
description: Khiops Server Revision
khiops-gcs-driver-revision:
type: string
default: 0.0.14
default: 0.0.16
description: Driver version for Google Cloud Storage remote files
khiops-s3-driver-revision:
type: string
default: 0.0.14
default: 0.0.15
description: Driver version for AWS-S3 remote files
khiops-azure-driver-revision:
type: string
default: 0.0.6 # XXX : to modify soon
description: Driver version for Azure remote files and blobs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -67,6 +72,7 @@ jobs:
echo "IMAGE_URL=ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.khiopsdev-os }}" >> "$GITHUB_ENV"
echo "KHIOPS_GCS_DRIVER_REVISION=${{ inputs.khiops-gcs-driver-revision || env.DEFAULT_KHIOPS_GCS_DRIVER_REVISION }}" >> "$GITHUB_ENV"
echo "KHIOPS_S3_DRIVER_REVISION=${{ inputs.khiops-s3-driver-revision || env.DEFAULT_KHIOPS_S3_DRIVER_REVISION }}" >> "$GITHUB_ENV"
echo "KHIOPS_AZURE_DRIVER_REVISION=${{ inputs.khiops-azure-driver-revision || env.DEFAULT_KHIOPS_AZURE_DRIVER_REVISION }}" >> "$GITHUB_ENV"
- name: Checkout khiops-python sources
uses: actions/checkout@v4
- name: Set up Docker Buildx
Expand Down Expand Up @@ -105,6 +111,7 @@ jobs:
"PYTHON_VERSIONS=${{ inputs.python-versions || env.DEFAULT_PYTHON_VERSIONS }}"
"KHIOPS_GCS_DRIVER_REVISION=${{ env.KHIOPS_GCS_DRIVER_REVISION }}"
"KHIOPS_S3_DRIVER_REVISION=${{ env.KHIOPS_S3_DRIVER_REVISION }}"
"KHIOPS_AZURE_DRIVER_REVISION=${{ env.KHIOPS_AZURE_DRIVER_REVISION }}"
tags: ${{ env.DOCKER_IMAGE_TAGS }}
# Push only on manual request
push: ${{ inputs.push || false }}
Expand Down
73 changes: 32 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,39 +78,27 @@ jobs:
run: |
CONDA="/root/miniforge3/bin/conda"

# Native Khiops-based Conda environment, and
# `khiops-core`-based Conda environment
CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
for CONDA_ENV in $CONDA_ENVS
do
mkdir -p -m u+rwx reports/"$CONDA_ENV"
# Native Khiops-based Conda environment (to test in a specific python version)
CONDA_ENV=py${{ matrix.python-version }}
mkdir -p -m u+rwx reports/"$CONDA_ENV"

# install within the conda environments without activating them
$CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
$CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
done
# install within the conda environments without activating them
$CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
$CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
- name: Install khiops-python dependencies
if: success() || failure()
run: |
# The following git command is required,
# as the Git repository is in a directory the current user does not own,
# Python versioneer fails to compute the current version correctly otherwise
git config --global --add safe.directory $(realpath .)
CONDA="/root/miniforge3/bin/conda"
# Native Khiops-based Conda environment, and
# `khiops-core`-based Conda environment
CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
for CONDA_ENV in $CONDA_ENVS
do
# Since Python 3.13, setuptools is not installed automatically anymore
$CONDA install -y -n "$CONDA_ENV" setuptools
# Native Khiops-based Conda environment (to test in a specific python version)
CONDA_ENV=py${{ matrix.python-version }}
# Since Python 3.13, setuptools is not installed automatically anymore
$CONDA install -y -n "$CONDA_ENV" setuptools

# Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
$CONDA install -y -n "$CONDA_ENV" tomli
$CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
$CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
rm -f requires.txt
done
# Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
$CONDA install -y -n "$CONDA_ENV" tomli
$CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
$CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
rm -f requires.txt
- name: Configure Expensive Tests Setting
# Skip expensive tests by default, unless on the `main-v10` or `main` branches
if: github.ref != 'main-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
Expand Down Expand Up @@ -138,21 +126,32 @@ jobs:
echo "Generated AWS configuration..."
cat ${GITHUB_WORKSPACE}/.aws/configuration
/scripts/run_fake_remote_file_servers.sh . # launch the servers in the background

# Set environment variables for the tests with GCS
GCS_BUCKET_NAME=data-test-khiops-driver-gcs/khiops_data
GCS_DRIVER_LOGLEVEL=info # set to debug for diagnosis

# Set environment variables for the tests with S3
S3_DRIVER_LOGLEVEL=info # set to debug for diagnosis
S3_BUCKET_NAME=s3-bucket
AWS_SHARED_CREDENTIALS_FILE=${{ github.workspace }}/.aws/credentials
AWS_CONFIG_FILE=${{ github.workspace }}/.aws/configuration

# Set environment variables for the tests with Azure
AZURE_STORAGE_CONNECTION_STRING='${{ secrets.AZURE_CONNECTION_STRING }}'
CLOUD_BLOB_URI_PREFIX=${{ vars.CLOUD_BLOB_URI_PREFIX }}
CLOUD_FILE_URI_PREFIX=${{ vars.CLOUD_FILE_URI_PREFIX }}

# Persist environment variables for subsequent steps
echo "GCS_BUCKET_NAME=${GCS_BUCKET_NAME}" >> "$GITHUB_ENV"
echo "GCS_DRIVER_LOGLEVEL=${GCS_DRIVER_LOGLEVEL}" >> "$GITHUB_ENV"
echo "S3_DRIVER_LOGLEVEL=${S3_DRIVER_LOGLEVEL}" >> "$GITHUB_ENV"
echo "S3_BUCKET_NAME=${S3_BUCKET_NAME}" >> "$GITHUB_ENV"
echo "AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE}" >> "$GITHUB_ENV"
echo "AWS_CONFIG_FILE=${AWS_CONFIG_FILE}" >> "$GITHUB_ENV"
echo "AZURE_STORAGE_CONNECTION_STRING=${AZURE_STORAGE_CONNECTION_STRING}" >> "$GITHUB_ENV"
echo "CLOUD_BLOB_URI_PREFIX=${CLOUD_BLOB_URI_PREFIX}" >> "$GITHUB_ENV"
echo "CLOUD_FILE_URI_PREFIX=${CLOUD_FILE_URI_PREFIX}" >> "$GITHUB_ENV"
- name: Authenticate to GCP using "Workload Identity Federation"
if: env.SKIP_EXPENSIVE_TESTS != 'true'
# For integration tests on GCS we use a real Google account
Expand Down Expand Up @@ -186,23 +185,17 @@ jobs:
# version is retrieved
git config --global --add safe.directory $(realpath .)
CONDA="/root/miniforge3/bin/conda"
# Native Khiops-based Conda environment, and
# `khiops-core`-based Conda environment
CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
for CONDA_ENV in $CONDA_ENVS
do
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/$CONDA_ENV" -v
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
done
# Native Khiops-based Conda environment (to test in a specific python version)
CONDA_ENV=py${{ matrix.python-version }}
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/$CONDA_ENV" -v
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
- name: Display Test Reports
if: success() || failure()
uses: dorny/test-reporter@v1
with:
name: Run Tests ${{ matrix.python-version }}
path: >-
reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml,
reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
path: reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
reporter: java-junit
path-replace-backslashes: 'true' # Necessary for windows paths
fail-on-error: 'false'
Expand All @@ -214,8 +207,6 @@ jobs:
path: |-
reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
reports/py${{ matrix.python-version }}/py-coverage.xml
reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
reports/py${{ matrix.python-version }}_conda/py-coverage.xml
tests/resources/scenario_generation/*/ref/*._kh
tests/resources/scenario_generation/*/output/*._kh
tests/resources/*/output_reports/*.txt
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Added
- (`sklearn`) `keep_selected_variables_only` parameter to the predictors (`KhiopsClassifier` and `KhiopsRegressor`)
- (General) Support for Azure storage

### Changed
- (`core`) Rename `variable_part_dimensions` to `inner_variable_dimensions` in Coclustering results.
Expand Down
Loading
Loading