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'),['*'])
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
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'),
)
#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" ]
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
])
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'])
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'])
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())
# fin attention
from Extensions import parametre
+from Extensions import param2
import I_OBJECT
import CONNECTOR
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
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)
def verif_typeihm(self,val,cr='non'):
try :
- self.val.eval()
+ val.eval()
return 1
except :
pass