From: Pascale Noyret Date: Fri, 5 Oct 2012 07:24:42 +0000 (+0000) Subject: Pour Test Adao X-Git-Tag: LOGILAB~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51a526506c52b8c34d8ae27ee2b5382f944244cd;p=tools%2Feficas.git Pour Test Adao --- diff --git a/Adao/ADAO_Cata_V1.py b/Adao/ADAO_Cata_V1.py new file mode 100644 index 00000000..a17bb7d1 --- /dev/null +++ b/Adao/ADAO_Cata_V1.py @@ -0,0 +1,505 @@ +# -*- coding: utf-8 -*- + +# -------------------------------------------------------- +# generated by AdaoCatalogGenerator at 2012-09-17 13:34:55 +# -------------------------------------------------------- + +import Accas +from Accas import * +version_cata="V1" + +JdC = JDC_CATA (code = 'ADAO', + execmodul = None, + regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), + ) + +def F_VectorSerie(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM"), + ), + FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", + + FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + ) + +def F_Function(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithFunctions"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + + FROM = SIMP(statut = "o", typ = "TXM", into=("Direct","DirectTangentAdjoint", ), defaut="Direct"), + FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + + FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), +# FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", +# +# FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), +# ), + ) + +def F_Vector(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements, qui soit valide pour construire un vecteur : une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes, valid to build a vector: a floats serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", + + FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + ) + +def F_Dict(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM"), + ), + FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", + + FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + ) + +def F_Matrix(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM"), + ), + FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", + + FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + ) + +def F_ObservationError(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", ), defaut="Matrix"), + + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o"), + ), + + ) + +def F_Observation(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o"), + ), + + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o"), + ), + + ) + +def F_BackgroundError(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", ), defaut="Matrix"), + + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o"), + ), + + ) + +def F_ObservationOperator(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o"), + ), + + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o"), + ), + + ) + +def F_CheckingPoint(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), + + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o"), + ), + + ) + +def F_Background(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), + + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o"), + ), + + ) + +def F_AlgorithmParameters(statut) : return FACT(statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o"), + ), + + ) + +def F_EvolutionError(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", ), defaut="Matrix"), + + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o"), + ), + + ) + +def F_UserDataInit(statut) : return FACT(statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o"), + ), + + ) + +def F_EvolutionModel(statut) : return FACT(statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o"), + ), + + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o"), + ), + + ) + +def F_UserPostAnalysis(statut) : return FACT(statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + + STRING = SIMP(statut = "o", typ = "TXM"), + ), + FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", + + FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + ), + ) + +def F_InitChoice() : return ("Background", + "BackgroundError", + "Observation", + "ObservationError", + "ObservationOperator", + "EvolutionModel", + "EvolutionError", + "AlgorithmParameters", + "UserPostAnalysis", + ) + +def F_Init(statut) : return FACT(statut = statut, + INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), + TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), + ) + +def F_Observers(statut) : return FACT(statut=statut, + SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'CurrentState', 'Innovation', 'OMA', 'OMB', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCovariance'])), + + Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", + Analysis_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", + CurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", + Innovation_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", + OMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", + OMB_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", + BMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", + CostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", + CostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", + CostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", + GradientOfCostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", + GradientOfCostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", + GradientOfCostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", + SigmaObs2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", + SigmaBck2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", + APosterioriCovariance_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "f", typ = "TXM"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) + ) + ), + ), + + ) + + +def F_variables(statut) : return FACT(statut=statut, + regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), + NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), + SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") + ) + +ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", + op=None, + repetable = "n", + Study_name = SIMP(statut="o", typ = "TXM"), + Study_repertory = SIMP(statut="f", typ = "TXM"), + Debug = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + Algorithm = SIMP(statut="o", typ = "TXM", into=("3DVAR", "Blue", "EnsembleBlue", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", )), + Background = F_Background("o"), + BackgroundError = F_BackgroundError("o"), + Observation = F_Observation("o"), + ObservationError = F_ObservationError("o"), + ObservationOperator = F_ObservationOperator("o"), + EvolutionModel = F_EvolutionModel("f"), + EvolutionError = F_EvolutionError("f"), + AlgorithmParameters = F_AlgorithmParameters("f"), + UserDataInit = F_Init("f"), + UserPostAnalysis = F_UserPostAnalysis("f"), + InputVariables = F_variables("f"), + OutputVariables = F_variables("f"), + Observers = F_Observers("f") + ) + +CHECKING_STUDY = PROC(nom="CHECKING_STUDY", + op=None, + repetable = "n", + Study_name = SIMP(statut="o", typ = "TXM"), + Study_repertory = SIMP(statut="f", typ = "TXM"), + Debug = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), + Algorithm = SIMP(statut="o", typ = "TXM", into=("AdjointTest", "GradientTest", )), + CheckingPoint = F_CheckingPoint("o"), + ObservationOperator = F_ObservationOperator("o"), + AlgorithmParameters = F_AlgorithmParameters("f"), + UserDataInit = F_Init("f"), + ) + diff --git a/Adao/configuration_Adao.py b/Adao/configuration_Adao.py new file mode 100644 index 00000000..14013548 --- /dev/null +++ b/Adao/configuration_Adao.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues'] + + configuration.CONFIG_BASE.__init__(self,appli,repIni,'.Eficas_Syrthes') + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/Adao/prefs.py b/Adao/prefs.py new file mode 100644 index 00000000..5f04c8be --- /dev/null +++ b/Adao/prefs.py @@ -0,0 +1,22 @@ +# 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 +# +code="Adao" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/Adao/prefs_Adao.py b/Adao/prefs_Adao.py new file mode 100644 index 00000000..839506b6 --- /dev/null +++ b/Adao/prefs_Adao.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +import os,sys + +# repIni sert à localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' + +# Choix des catalogues +# format du Tuple (code,version,catalogue,formatOut, finit par defaut Ãventuellement) +catalogues = ( + ('Adao','V0',os.path.join(repIni,'ADAO_Cata_V1.py'),'python','python'), +) + +# lang indique la langue utilisée pour les chaines d'aide : fr ou ang +lang='fr' + + diff --git a/Adao/properties.py b/Adao/properties.py new file mode 100644 index 00000000..f8ee7110 --- /dev/null +++ b/Adao/properties.py @@ -0,0 +1,5 @@ +# ====================================================================== +# VERSION DU CODE +#---------------------------------------------------------------------- +version = "6.6" +date = "19/09/2012" diff --git a/Adao/qtEficas_Adao.py b/Adao/qtEficas_Adao.py new file mode 100755 index 00000000..1f6619df --- /dev/null +++ b/Adao/qtEficas_Adao.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# 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 +# +""" + Ce module sert à lancer EFICAS configuré pour Syrthes +""" +# Modules Python + +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import sys +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/Adao/traduitAdaosansToV1.py b/Adao/traduitAdaosansToV1.py new file mode 100644 index 00000000..80f84b60 --- /dev/null +++ b/Adao/traduitAdaosansToV1.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# 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 optparse +import log + +from load import getJDCFromTexte +from mocles import parseKeywords +from removemocle import * +from renamemocle import * +from renamemocle import * +from inseremocle import * +from changeValeur import * +from movemocle import * +from dictErreurs import GenereErreurPourCommande,GenereErreurMotCleInFact + + +atraiter=() + +dict_erreurs={} + +sys.dict_erreurs=dict_erreurs + +atraiter=( "MACR_ADAP_MAIL",) + +class MonTraducteur: + + def __init__(self,texte) : + self.jdc=getJDCFromTexte(texte,atraiter) + self.root=self.jdc.root + + def traduit(self): + parseKeywords(self.root) + renameMotCleInFact(self.jdc,"CALC_META","ETAT_INIT","META_INIT","META_INIT_ELNO") + return self.jdc.getSource() +