From aeb42653a4b12139516a2bd5770fd6299b0b78a2 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 16:29:00 +0200 Subject: [PATCH 1/9] Update requirements-test.txt --- requirements-test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-test.txt b/requirements-test.txt index d5af4e380b..563198897c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -13,3 +13,4 @@ catboost==1.2.7 ; python_version < '3.11' # TODO: Remove 3.11 condition when cat shap==0.46.0 array-api-compat==1.9 array-api-strict==2.0.1 +pytest-cov==5.0.0 From 1ad82a1185fc16473f51cae9cace3475e58bbd85 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 17:01:10 +0200 Subject: [PATCH 2/9] Update run_test.sh --- conda-recipe/run_test.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 172a6c3721..9680754392 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -31,6 +31,11 @@ if [[ count -eq 0 ]]; then exit 1 fi +COV_CMD = "--no-cov" +if [[ "$COVERAGE" == "true" ]]; then +COV_CMD = "--cov-config='$daal4py_dir/.coveragerc' --cov --cov-report=" +fi + echo "Start testing ..." return_code=0 @@ -50,15 +55,15 @@ python -m unittest discover -v -s ${daal4py_dir}/tests -p test*.py return_code=$(($return_code + $?)) echo "Pytest of daal4py running ..." -pytest --verbose --pyargs ${daal4py_dir}/daal4py/sklearn +pytest --verbose --${daal4py_dir}/daal4py/sklearn $COV_CMD return_code=$(($return_code + $?)) echo "Pytest of sklearnex running ..." -pytest --verbose --pyargs sklearnex +pytest --verbose --pyargs sklearnex $COV_CMD return_code=$(($return_code + $?)) echo "Pytest of onedal running ..." -pytest --verbose --pyargs ${daal4py_dir}/onedal +pytest --verbose --pyargs onedal $COV_CMD return_code=$(($return_code + $?)) echo "Global patching test running ..." From 7aff222aec1ef7d70a18253b996f2c67027a7890 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 17:03:42 +0200 Subject: [PATCH 3/9] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd5a059c5e..8ec6f5eef3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,8 @@ jobs: DPCFLAG="0" if [ $(echo ${{ matrix.PYTHON_VERSION }} | grep '${{ env.DPCTL_PY_VERSIONS }}') ]; then DPCFLAG=''; fi echo "DPCFLAG=${DPCFLAG}" >> "$GITHUB_OUTPUT" + # enable coverage report generation + echo "COVERAGE=true" >> "$GITHUB_ENV" - name: apt-get run: sudo apt-get update && sudo apt-get install -y clang-format - name: dpcpp installation From 2dd45e3cb150ba66469e965197197085917e7161 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 17:06:14 +0200 Subject: [PATCH 4/9] Update run_test.sh --- conda-recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 9680754392..97a2f48f8d 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -33,7 +33,7 @@ fi COV_CMD = "--no-cov" if [[ "$COVERAGE" == "true" ]]; then -COV_CMD = "--cov-config='$daal4py_dir/.coveragerc' --cov --cov-report=" +COV_CMD = "--cov-config='$daal4py_dir/.coveragerc' --cov-report=" fi echo "Start testing ..." From 52c2505730dcd440f3b6bf33caca89f24565aff2 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 17:30:00 +0200 Subject: [PATCH 5/9] Update run_test.sh --- conda-recipe/run_test.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 97a2f48f8d..c5e3945bbc 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -31,9 +31,9 @@ if [[ count -eq 0 ]]; then exit 1 fi -COV_CMD = "--no-cov" +COV_CMD=(--no-cov) if [[ "$COVERAGE" == "true" ]]; then -COV_CMD = "--cov-config='$daal4py_dir/.coveragerc' --cov-report=" +COV_CMD=(--cov-config '$daal4py_dir/.coveragerc' --cov-report=) fi echo "Start testing ..." @@ -55,15 +55,15 @@ python -m unittest discover -v -s ${daal4py_dir}/tests -p test*.py return_code=$(($return_code + $?)) echo "Pytest of daal4py running ..." -pytest --verbose --${daal4py_dir}/daal4py/sklearn $COV_CMD +pytest --verbose --${daal4py_dir}/daal4py/sklearn "${COV_CMD[@]}" return_code=$(($return_code + $?)) echo "Pytest of sklearnex running ..." -pytest --verbose --pyargs sklearnex $COV_CMD +pytest --verbose --pyargs sklearnex "${COV_CMD[@]}" return_code=$(($return_code + $?)) echo "Pytest of onedal running ..." -pytest --verbose --pyargs onedal $COV_CMD +pytest --verbose --pyargs onedal return_code=$(($return_code + $?)) echo "Global patching test running ..." From b5c535594fa7876a02fb0a45957af2ac8427d0d7 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 17:31:08 +0200 Subject: [PATCH 6/9] Update run_test.sh --- conda-recipe/run_test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index c5e3945bbc..a6a8f25258 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -31,9 +31,9 @@ if [[ count -eq 0 ]]; then exit 1 fi -COV_CMD=(--no-cov) +COV_ARGS=(--no-cov) if [[ "$COVERAGE" == "true" ]]; then -COV_CMD=(--cov-config '$daal4py_dir/.coveragerc' --cov-report=) +COV_ARGS=(--cov-config '$daal4py_dir/.coveragerc' --cov-report=) fi echo "Start testing ..." @@ -55,11 +55,11 @@ python -m unittest discover -v -s ${daal4py_dir}/tests -p test*.py return_code=$(($return_code + $?)) echo "Pytest of daal4py running ..." -pytest --verbose --${daal4py_dir}/daal4py/sklearn "${COV_CMD[@]}" +pytest --verbose --${daal4py_dir}/daal4py/sklearn "${COV_ARGS[@]}" return_code=$(($return_code + $?)) echo "Pytest of sklearnex running ..." -pytest --verbose --pyargs sklearnex "${COV_CMD[@]}" +pytest --verbose --pyargs sklearnex "${COV_ARGS[@]}" return_code=$(($return_code + $?)) echo "Pytest of onedal running ..." From cf45cbd6d6f47dfd64feb3174cea9868fb8b00c0 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 19:59:53 +0200 Subject: [PATCH 7/9] Update run_test.sh --- conda-recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index a6a8f25258..6a90682ddc 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -55,7 +55,7 @@ python -m unittest discover -v -s ${daal4py_dir}/tests -p test*.py return_code=$(($return_code + $?)) echo "Pytest of daal4py running ..." -pytest --verbose --${daal4py_dir}/daal4py/sklearn "${COV_ARGS[@]}" +pytest --verbose ${daal4py_dir}/daal4py/sklearn "${COV_ARGS[@]}" return_code=$(($return_code + $?)) echo "Pytest of sklearnex running ..." From ff4d325f72616e3ec1bb6a1f7f014d1b6f628a2a Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 11 Oct 2024 22:27:47 +0200 Subject: [PATCH 8/9] Update run_test.sh --- conda-recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 6a90682ddc..be79c744d5 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -33,7 +33,7 @@ fi COV_ARGS=(--no-cov) if [[ "$COVERAGE" == "true" ]]; then -COV_ARGS=(--cov-config '$daal4py_dir/.coveragerc' --cov-report=) +COV_ARGS=(--cov-config '$daal4py_dir/.coveragerc') fi echo "Start testing ..." From 70f1ddafa0e0fcec0b0621c71cd143e2ec796ab0 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 12 Oct 2024 14:31:35 +0200 Subject: [PATCH 9/9] Update run_test.sh --- conda-recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index be79c744d5..cc7466b061 100755 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -33,7 +33,7 @@ fi COV_ARGS=(--no-cov) if [[ "$COVERAGE" == "true" ]]; then -COV_ARGS=(--cov-config '$daal4py_dir/.coveragerc') +COV_ARGS=(--cov-config '$daal4py_dir/.coveragerc' --cov-report term) fi echo "Start testing ..."