From 17c094ed00187010123d6c7a5e58c7fe7f68f1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Boull=C3=A9?= Date: Thu, 14 Mar 2024 14:57:41 +0100 Subject: [PATCH] Fix install action yml to comply with new LearningTest scripts Correction: - .github\actions\test-khiops-install\action.yml: correction pour mise en phase avec les nouveaux scripts de LearningTest - test\LearningTestTool\py\kht_apply.py: concatenation des dictionnaire dans register_all_instructions, sans utiliser l'operateur '|' supporte uniquement depuis python 3.9 --- .github/actions/test-khiops-install/action.yml | 10 +++++----- test/LearningTestTool/py/kht_apply.py | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/actions/test-khiops-install/action.yml b/.github/actions/test-khiops-install/action.yml index a44d7c275..4d6c131f1 100644 --- a/.github/actions/test-khiops-install/action.yml +++ b/.github/actions/test-khiops-install/action.yml @@ -61,11 +61,11 @@ runs: touch test/LearningTest/TestCoclustering/Standard/Iris/results/time.log touch test/LearningTest/TestKhiops/Standard/Iris/results/time.log echo "Check test results" - cd test/LearningTest/cmd/python/ - $PYTHON test_khiops.py Khiops nul Standard - $PYTHON test_khiops.py Coclustering nul Standard - $PYTHON apply_command.py errors ../../TestKhiops/Standard/ Iris | tee /tmp/khiops-log.txt - $PYTHON apply_command.py errors ../../TestCoclustering/Standard/ Iris | tee /tmp/coclustering-log.txt + cd test/LearningTestTool/py/ + $PYTHON kht_test.py ../../LearningTest/TestKhiops/Standard/Iris check + $PYTHON kht_test.py ../../LearningTest/TestCoclustering/Standard/Iris check + $PYTHON kht_apply.py ../../LearningTest/TestKhiops/Standard/Iris errors | tee /tmp/khiops-log.txt + $PYTHON kht_apply.py ../../LearningTest/TestCoclustering/Standard/Iris errors | tee /tmp/khiops-log.txt if (grep -q error /tmp/khiops-log.txt || grep -q error /tmp/coclustering-log.txt); then echo "::error::Errors in Khiops run" false diff --git a/test/LearningTestTool/py/kht_apply.py b/test/LearningTestTool/py/kht_apply.py index e0ecc947e..dc2c3e420 100644 --- a/test/LearningTestTool/py/kht_apply.py +++ b/test/LearningTestTool/py/kht_apply.py @@ -137,7 +137,9 @@ def register_all_instructions(): instructions1 = standard_instructions.register_standard_instructions() instructions2 = one_shot_instructions.register_one_shot_instructions() - all_instructions = instructions1 | instructions2 + # L'operateur d'union entre dictionnaires '|' n'est supporte que depuis python 3.9 + all_instructions = instructions1 + all_instructions.update(instructions2) return all_instructions, len(instructions1)