Skip to content

Commit

Permalink
Fix test khiops instal action yml to comply with new LearningTest scr…
Browse files Browse the repository at this point in the history
…ipts

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
  • Loading branch information
marcboulle committed Mar 15, 2024
1 parent 92740b7 commit 31ac298
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/actions/test-khiops-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion test/LearningTestTool/py/kht_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 31ac298

Please sign in to comment.