From: eficas <> Date: Fri, 9 Dec 2005 09:58:04 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: CC_param_poursuite~45 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8e953c9af29505a699a7029f362f87e917cc8337;p=tools%2Feficas.git *** empty log message *** --- diff --git a/Aster/alphasdist.py b/Aster/alphasdist.py index 519b074e..7139eb57 100644 --- a/Aster/alphasdist.py +++ b/Aster/alphasdist.py @@ -47,19 +47,20 @@ def main(): copyfiles('Cata/Utilitai',os.path.join(path_distrib,'Aster','Cata','Utilitai'),['*.py']) copyfiles('Cata/pre74',os.path.join(path_distrib,'Aster','Cata','pre74'),['*.py']) # version 5 - copyfiles('Cata/cataSTA5',os.path.join(path_distrib,'Aster','Cata','cataSTA5'),['*.py']) +# On enleve la V5 a la demande d AMA +# copyfiles('Cata/cataSTA5',os.path.join(path_distrib,'Aster','Cata','cataSTA5'),['*.py']) #version 6 copyfiles('Cata/cataSTA6',os.path.join(path_distrib,'Aster','Cata','cataSTA6'),['*.py']) copyfiles('Cata/cataSTA6/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA6','Macro'),['*.py']) #version 7.3 - copyfiles('Cata/cataSTA73',os.path.join(path_distrib,'Aster','Cata','cataSTA73'),['*.py']) - copyfiles('Cata/cataSTA73/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA73','Macro'),['*.py']) +# copyfiles('Cata/cataSTA73',os.path.join(path_distrib,'Aster','Cata','cataSTA73'),['*.py']) +# copyfiles('Cata/cataSTA73/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA73','Macro'),['*.py']) #version 7.4 copyfiles('Cata/cataSTA74',os.path.join(path_distrib,'Aster','Cata','cataSTA74'),['*.py']) copyfiles('Cata/cataSTA74/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA74','Macro'),['*.py']) #version 8 - copyfiles('Cata/cataSTA8',os.path.join(path_distrib,'Aster','Cata','cataSTA8'),['*.py']) - copyfiles('Cata/cataSTA8/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA8','Macro'),['*.py']) + copyfiles('Cata/cataSTA81',os.path.join(path_distrib,'Aster','Cata','cataSTA81'),['*.py']) + copyfiles('Cata/cataSTA81/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA81,'Macro'),['*.py']) copyfiles('../AIDE',os.path.join(path_distrib,'AIDE'),['*.py']) copyfiles('../AIDE/fichiers',os.path.join(path_distrib,'AIDE','fichiers'),['*']) diff --git a/Aster/editeur.ini b/Aster/editeur.ini index 32cfbe11..aef8a52e 100644 --- a/Aster/editeur.ini +++ b/Aster/editeur.ini @@ -23,7 +23,7 @@ import os import prefs rep_cata = os.path.join(prefs.REPINI,'Cata') -#rep_homard = os.path.join(prefs.REPINI,'../Homard') +rep_homard = os.path.join(prefs.REPINI,'../Homard') rep_Pmw = os.path.join(prefs.REPINI,'../Pmw') # Accès à la documentation Aster @@ -42,12 +42,12 @@ rep_mat="//home/noyret/Install_Eficas/materiau" catalogues = ( #('ASTER','v5',os.path.join(rep_cata,'cataSTA5'),'asterv5'), - #('ASTER','v6',os.path.join(rep_cata,'cataSTA6'),'python6'), + ('ASTER','v6',os.path.join(rep_cata,'cataSTA6'),'python6'), #('ASTER','v73',os.path.join(rep_cata,'cataSTA73'),'python','defaut'), - #('ASTER','v74',os.path.join(rep_cata,'cataSTA74'),'python'), + ('ASTER','v74',os.path.join(rep_cata,'cataSTA74'),'python'), #('ASTER','v8',os.path.join(rep_cata,'cataSTA8'),'python','defaut'), - ('ASTER','v81',os.path.join(rep_cata,'cataSTA81'),'python','defaut'), + ('ASTER','v82',os.path.join(rep_cata,'cataSTA81'),'python','defaut'), #('ASTER','v75',os.path.join(rep_cata,'cataSTA75'),'python','defaut'), - #('HOMARD','v1',os.path.join(rep_homard,'homard_cata_V73.py'),'homard'), + ('HOMARD','v1',os.path.join(rep_homard,'homard_cata_V73.py'),'homard'), ) diff --git a/Aster/lance_test.sh b/Aster/lance_test.sh index 9325bdf1..2359a5e7 100755 --- a/Aster/lance_test.sh +++ b/Aster/lance_test.sh @@ -1,13 +1,14 @@ #unalias do #set -x -version=V8 -passe=1 -rm -rf ./Tests_Batch/${version}/ok_${passe} -rm -rf ./Tests_Batch/${version}/bad_${passe} -rm -rf ./Tests_Batch/${version}/nt_${passe} -for file in `cat ./Tests_Batch/${version}/aTester` +version=NEW82 +passe=2 +rm -rf ./Batch/${version}/ok_${passe} +rm -rf ./Batch/${version}/bad_${passe} +rm -rf ./Batch/${version}/badfile_${passe} +rm -rf ./Batch/${version}/nt_${passe} +for file in `cat ./Batch/${version}/aTester` do - echo $file + #echo $file grep "VISU_EFICAS='NON'" $file > /dev/null 2>/dev/null rc=$? if [ "$rc" != "0" ] @@ -19,22 +20,24 @@ do cr=`./test_eficas.py $file` if [ "${cr}" == "" ] then - echo $file >> ./Tests_Batch/${version}/bad_${passe} + echo $file >> ./Batch/${version}/bad_${passe} else nomfeuille=`basename $file` boncr="DEBUT CR validation : "${nomfeuille}" FIN CR validation :"${nomfeuille} cr=`echo $cr` if [ "${cr}" != "$boncr" ] then - echo $file >> ./Tests_Batch/${version}/bad_${passe} + echo $file >> ./Batch/${version}/bad_${passe} + echo $cr >>./Batch/${version}/bad_${passe} + echo $file >>./Batch/${version}/badfile_${passe} else - echo $file >> ./Tests_Batch/${version}/ok_${passe} + echo $file >> ./Batch/${version}/ok_${passe} fi fi else - echo $file >> ./Tests_Batch/${version}/nt_${passe} + echo $file >> ./Batch/${version}/nt_${passe} fi else - echo $file >> ./Tests_Batch/${version}/nt_${passe} + echo $file >> ./Batch/${version}/nt_${passe} fi done diff --git a/Aster/sdist.py b/Aster/sdist.py index 1440be7c..1ed81cc0 100644 --- a/Aster/sdist.py +++ b/Aster/sdist.py @@ -53,7 +53,7 @@ def main(): ]) copyfiles('Cata/Utilitai',os.path.join(path_distrib,'Aster','Cata','Utilitai'),['*.py']) copyfiles('Cata/pre74',os.path.join(path_distrib,'Aster','Cata','pre74'),['*.py']) - copyfiles('Cata/cataSTA5',os.path.join(path_distrib,'Aster','Cata','cataSTA5'),['*.py']) + #copyfiles('Cata/cataSTA5',os.path.join(path_distrib,'Aster','Cata','cataSTA5'),['*.py']) copyfiles('Cata/cataSTA6',os.path.join(path_distrib,'Aster','Cata','cataSTA6'),['*.py']) copyfiles('Cata/cataSTA6/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA6','Macro'),['*.py']) copyfiles('Cata/cataSTA73',os.path.join(path_distrib,'Aster','Cata','cataSTA73'),['*.py']) @@ -61,6 +61,7 @@ def main(): copyfiles('Cata/cataSTA74',os.path.join(path_distrib,'Aster','Cata','cataSTA74'),['*.py']) copyfiles('Cata/cataSTA74/Macro',os.path.join(path_distrib,'Aster','Cata','cataSTA74','Macro'),['*.py']) copyfiles('Cata/cataSTA8',os.path.join(path_distrib,'Aster','Cata','cataSTA8'),['*.py']) + copyfiles('Cata/cataSTA81',os.path.join(path_distrib,'Aster','Cata','cataSTA81'),['*.py']) copyfiles('../Aster/Cata',os.path.join(path_distrib,'Aster'),['aster.py',]) copyfiles('../convert',os.path.join(path_distrib,'convert'),['*.py']) diff --git a/Extensions/param2.py b/Extensions/param2.py index b5a9113e..74ac889c 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -9,7 +9,8 @@ def mkf(value): else: raise TypeError, ("Can't make formula from", value) -class Formula(object): +#class Formula(object): +class Formula: def __complex__(self): return complex(self.eval()) def __int__(self): return int(self.eval()) def __long__(self): return long(self.eval()) diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index 9f09d948..7ed2b556 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -44,6 +44,7 @@ import Accas # fin attention from Extensions import parametre +from Extensions import param2 import I_OBJECT import CONNECTOR @@ -524,8 +525,11 @@ class MCSIMP(I_OBJECT.OBJECT): self.cr.fatal("None n'est pas une valeur autorisée") else: # type,into ... - if v.__class__.__name__ in ('PARAMETRE' , 'EVAL', 'ITEM_PARAMETRE','PARAMETRE_EVAL'): - verif_type=1 + #PN ??? je n ose pas y toucher ??? + #if v.__class__.__name__ in ('PARAMETRE','EVAL', 'ITEM_PARAMETRE','PARAMETRE_EVAL'): + if ((issubclass(v.__class__,param2.Formula)) or + (v.__class__.__name__ in ('EVAL', 'ITEM_PARAMETRE','PARAMETRE_EVAL'))): + verif_type=self.verif_typeihm(v) else: verif_type=self.verif_type(val=v,cr=None) # cas des tuples avec un ITEM_PARAMETRE @@ -533,13 +537,18 @@ class MCSIMP(I_OBJECT.OBJECT): if type(v) == types.TupleType : new_val=[] for i in v: - if i.__class__.__name__ not in ('PARAMETRE','EVAL', 'ITEM_PARAMETRE','PARAMETRE_EVAL'): + if ((issubclass(i.__class__,param2.Formula)) or + (i.__class__.__name__ in ('EVAL', 'ITEM_PARAMETRE','PARAMETRE_EVAL'))): + if self.verif_typeihm(val=i,cr=cr) == 0: + verif_type = 0 + break + else: new_val.append(i) if new_val != [] : verif_type=self.verif_type(val=new_val,cr=cr) else : # Cas d une liste de paramétre - verif_type= 1 + verif_type=self.verif_typeliste(val=v,cr=cr) else: verif_type=self.verif_type(val=v,cr=cr) valid = verif_type*self.verif_into(cr=cr)*self.verif_card(cr=cr) @@ -565,7 +574,7 @@ class MCSIMP(I_OBJECT.OBJECT): def verif_typeihm(self,val,cr='non'): try : - self.val.eval() + val.eval() return 1 except : pass