Skip to content

Quick Checks

Quick Checks #35

Workflow file for this run

---
name: Quick Checks
env:
DEFAULT_KHIOPS_PYTHON_REVISION: dev
on:
pull_request:
workflow_dispatch:
inputs:
khiops-python-revision:
default: dev
description: Git tag/branch/commit for the khiops-python repository
image-tag:
default: 10.6.0-b.0.0
description: Development Docker Image Tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install khiops-python dev dependencies
run: |
pip install pre-commit
- name: Run pre-commit checks
uses: pre-commit/[email protected]
execute-nb:
runs-on: ubuntu-22.04
container:
# 'latest' default image tag cannot be set as an environment variable,
# because the `env` context is only accessible at the step level;
# hence, it is hard-coded
image: ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.6.0-b.0.0' }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install pre-requisites
run: |
pip install nbconvert nbformat jupyter
- name: Put the khiops-python version in the environment
run: |
KHIOPS_PYTHON_REVISION="${{ inputs.khiops-python-revision || env.DEFAULT_KHIOPS_PYTHON_REVISION }}"
echo "KHIOPS_PYTHON_REVISION=${KHIOPS_PYTHON_REVISION}" >> "$GITHUB_ENV"
- name: Install khiops-python
run: |
git clone https://github.com/khiopsml/khiops-python
cd khiops-python
git checkout $KHIOPS_PYTHON_REVISION
pip install .
kh-status
kh-download-datasets --version 10.2.4
- name: Execute the convert hook
run: |-
mkdir output_nb
export KHIOPS_PROC_NUMBER=1
python khiops-python/doc/convert_tutorials.py --execute-notebooks ./ output_nb
ls -ltr output_nb