From: Eric Fayolle Date: Wed, 27 Mar 2024 19:58:54 +0000 (+0100) Subject: Mise au point cata RN X-Git-Tag: V_demo_28_mars_2024 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7acc5bca6290aa4abcf5e18dab80e1e770cc7bf;p=tools%2Feficas.git Mise au point cata RN --- diff --git a/Codes/ReacteurNumerique/GNUmakefile b/Codes/ReacteurNumerique/GNUmakefile index 878090cb..441410eb 100644 --- a/Codes/ReacteurNumerique/GNUmakefile +++ b/Codes/ReacteurNumerique/GNUmakefile @@ -90,7 +90,7 @@ define test_xml_rule = @[[ -f $$(*).py ]] || (echo "Le fichier catalogue $$(*).py est introuvable" && false) @[[ -f $$(*)_driver.py ]] || (echo "Le fichier driver $$(*)_driver.py est introuvable" && false) python3 $(tooldir)/validateDataSet.py -c $$(abspath $$(*).py) $$< - python3 $(tooldir)/generateXML.py -c $$(abspath $$(*).py) $$< + ./exec.sh python3 $(tooldir)/generateXML.py -c $$(abspath $$(*).py) $$< endef @@ -109,7 +109,8 @@ define test_comm_rule = @echo -e "\n\n------ Generate modified.comm file $$(@) ------\n" @[[ -f $$(*).py ]] || (echo "Le fichier catalogue $$(*).py est introuvable" && false) @[[ -f $$(*)_driver.py ]] || (echo "Le fichier driver $$(*)_driver.py est introuvable" && false) - python3 $(tooldir)/generateUQComm.py -x -c $$(abspath $$(*).py) -o $$(@) $$< +# python3 $(tooldir)/generateUQComm.py -x -c $$(abspath $$(*).py) -o $$(@) $$< + ./exec.sh python3 $(tooldir)/generateComm.py -x -c $$(abspath $$(*).py) -o $$(@) $$< diff -w -I '^#' -I '^ #' $$(@:%_modified.comm=%.comm) $$(@) endef @@ -147,8 +148,8 @@ testAll: exec.sh driverAll $(new_test_driver_py) $(new_test_driver_xml) $(new_te clean: rm -f *.pyc *~ qtEficas.sh exec.sh environ.sh rm -rf raw binding.py __pycache__ - rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml *test_driver_?_modified.comm + rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml *test_driver_?.xml.rewrite *test_driver_?_modified.comm cleantest: - rm -f *test_driver_?.py *test_driver_?.xml *test_driver_?_modified.comm + rm -f *test_driver_?.py *test_driver_?.xml *test_driver_?.xml.rewrite *test_driver_?_modified.comm diff --git a/Codes/ReacteurNumerique/lanceEficas.py b/Codes/ReacteurNumerique/lanceEficas.py deleted file mode 100755 index e7da3cf3..00000000 --- a/Codes/ReacteurNumerique/lanceEficas.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -import sys, os -from pathlib import Path - -code="ReacteurNumerique" - -try : - eficasPath=os.environ['EFICAS_ROOT_DIR'] -except : - print ('Please, set EFICAS_ROOT_DIR') - exit(1) -sys.path.append(os.path.join(os.path.abspath(eficasPath))) - -name='prefs_' + code -prefFile = Path(name + ".py") -if prefFile.is_file(): - try : - __import__(name) - except : - print ('Unable to import {}').format(prefFile) - exit(1) -from Editeur import eficas_go -eficas_go.lanceQtEficas(code=code,GUIPath='QT5') diff --git a/Codes/ReacteurNumerique/prefs_ExempleIntegrateur.py b/Codes/ReacteurNumerique/prefs_ExempleIntegrateur.py deleted file mode 100755 index b159d44c..00000000 --- a/Codes/ReacteurNumerique/prefs_ExempleIntegrateur.py +++ /dev/null @@ -1,8 +0,0 @@ -import os -repIni='/home/A96028/QT5Dev/eficasMerge/Codes/ReacteurNumerique' -lang='fr' -catalogues=( - ('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_UQ.py'),'python','python'), - #('ReacteurNumerique','Version UQ',os.path.join(repIni,'cata_RN_EDG_Fake.py'),'python','python'), -) -closeFrameRechercheCommande=False diff --git a/Web/mdm3.py b/Web/mdm3.py index eaecd26e..0138c163 100755 --- a/Web/mdm3.py +++ b/Web/mdm3.py @@ -307,7 +307,7 @@ def newDataset(): # Print the dictionary print(__file__+"/newDataset : ",req); #cataFile =os.path.abspath("../Codes/WebTest/"+req['catalogName']); - cataFile =os.path.abspath("./data/"+req['catalogName']); + cataFile =os.path.abspath("./data/"+req['catalogName']); dataSetFile =os.path.abspath("./data/"+req['datasetName']); #cataFile = os.path.abspath('../Codes/WebTest/cata_essai.py') #dataSetFile = os.path.abspath('../Codes/WebTest/web_tres_simple_avec_2Fact.comm') diff --git a/Web/templates/commandes_2.html b/Web/templates/commandes_2.html index 64b9ce4d..d60b6972 100644 --- a/Web/templates/commandes_2.html +++ b/Web/templates/commandes_2.html @@ -79,7 +79,7 @@

Hello, world!

Here is the Eficas/MdM WebApp prototype.

Try Menu/File/NewDataset to open/create a dataset.

-

Learn more about Eficas/MdM

+

Learn more about Eficas/MdM

@@ -270,7 +270,7 @@ function callService(msgCssSelStr, serviceName, obj) { treeMessage(msgCssSelStr,"alert-success",message) ; }; - const url = "{{ url_for('appendChild') }}"; //WARN : jinja url_for évalué dynamiquement + const url = "{{ url_for('appendChild') }}"; //WARN : jinja url_for évalué dynamiquement const newurl = url.replace("appendChild", serviceName); //TODO : Trouver une meilleure solution ! return $.ajax({ type : "POST", @@ -682,15 +682,15 @@ function createNewSetOfEvents(treeCssSelStr, msgCssSelStr) { let _msgCssSelStr = msgCssSelStr; //inutile // var _tree = $.ui.fancytree.getTree(_treeCssSelStr); source.addEventListener('propageValide', function(event) { - const data = JSON.parse(event.data); - const id = data.id; - const eId = data.eId; - const valid = data.valid; + const data = JSON.parse(event.data); + const id = data.id; + const eId = data.eId; + const valid = data.valid; const message = "The server says " + data.message +" , id: "+id; const msgerror = "Event propageValid : can't find node with key :"+id; - const tree = $.ui.fancytree.getTree(_treeCssSelStr); + const tree = $.ui.fancytree.getTree(_treeCssSelStr); const _rootNode = tree.rootNode.children[0]; - const _eId = _rootNode.data.eId; + const _eId = _rootNode.data.eId; if ( eId != _eId ) return; treeMessage(_msgCssSelStr,"alert-info",message); @@ -700,10 +700,10 @@ function createNewSetOfEvents(treeCssSelStr, msgCssSelStr) { treeMessage(_msgCssSelStr,"alert-danger",msgerror); return; }; - node.data.validite=valid; //TODO : ?? Pas encore réussi à tester ... ?? + node.data.validite=valid; //TODO : ?? Pas encore réussi à tester ... ?? //alert("propageValid"); node.render(true,false); //force rendering the node (not parents nor descendants) - //node.renderStatus(); //CSS element updates only + //node.renderStatus(); //CSS element updates only }, false); })(treeCssSelStr,'#tree1-messages'); @@ -769,14 +769,14 @@ function createNewSetOfEvents(treeCssSelStr, msgCssSelStr) { // --- appendChildren --- (function (treeCssSelStr, msgCssSelStr) { 'use strict'; - const _treeCssSelStr = treeCssSelStr; //inutile - const _msgCssSelStr = msgCssSelStr; //inutile - const _tree = $.ui.fancytree.getTree(_treeCssSelStr); + const _treeCssSelStr = treeCssSelStr; //inutile + const _msgCssSelStr = msgCssSelStr; //inutile + const _tree = $.ui.fancytree.getTree(_treeCssSelStr); source.addEventListener('appendChildren', function(event) { const data = JSON.parse(event.data); - const id = data.id; - const eId = data.eId; - const source = data.fcyTreeSrc; + const id = data.id; + const eId = data.eId; + const source = data.fcyTreeSrc; const pos = data.pos; //var message = data.message; const message = "The server says " + data.message +" , id: "+id; diff --git a/config/GNUmakefile.env b/config/GNUmakefile.env index d2cb3072..71851dbc 100644 --- a/config/GNUmakefile.env +++ b/config/GNUmakefile.env @@ -43,9 +43,9 @@ define _SCRIPT_EFI cat < $1 DIR="\$$( cd "\$$( dirname "\$$0" )" && pwd )" -\$${DIR}/exec.sh $(realpath $(tooldir))/qtEficasGui.py \$$* +\$${DIR}/exec.sh python3 $(realpath $(tooldir))/qtEficasGui.py \$$* -#./exec.sh $(realpath $(tooldir))/qtEficasGui.py \$$* +#./exec.sh python3 $(realpath $(tooldir))/qtEficasGui.py \$$* EOF endef export SCRIPT_EFI = $(call _SCRIPT_EFI,qtEficas.sh) diff --git a/config/test_driver_subst.py b/config/test_driver_subst.py index e494f2af..6933008c 100755 --- a/config/test_driver_subst.py +++ b/config/test_driver_subst.py @@ -14,5 +14,9 @@ mdm.pyxb.GlobalValidationConfig._setInvalidElementInContent(mdm.pyxb.GlobalValid mdm.pyxb.GlobalValidationConfig._setOrphanElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) o1 = mdm.CreateFromDocument(open('@file@').read()) -print(o1.toDOM().toprettyxml()) + +filename='@file@'+'.rewrite' +with open(filename, "w") as fp: + fp.write(o1.toDOM().toprettyxml()) + print("File ",'@file@', " has been loaded and rewrite into ",filename)