From 74588875f6dbbcc5e70b2ab4df4c5925c0c32621 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Fri, 25 Jan 2019 09:47:02 +0100 Subject: [PATCH] Fixing some interface args syntax --- src/daComposant/daCore/Aidsm.py | 90 +++++++++---------- src/daComposant/daCore/Interfaces.py | 12 +-- ...ification_des_mono_et_multi_fonctions_A.py | 2 +- ...ification_des_mono_et_multi_fonctions_B.py | 2 +- ...ification_des_mono_et_multi_fonctions_C.py | 2 +- ...ification_des_mono_et_multi_fonctions_D.py | 2 +- ...ification_des_mono_et_multi_fonctions_E.py | 2 +- ...ification_des_mono_et_multi_fonctions_F.py | 2 +- 8 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/daComposant/daCore/Aidsm.py b/src/daComposant/daCore/Aidsm.py index 50cbd33..7b8f5da 100644 --- a/src/daComposant/daCore/Aidsm.py +++ b/src/daComposant/daCore/Aidsm.py @@ -94,9 +94,9 @@ class Aidsm(object): ColNames = None, DataFile = None, DiagonalSparseMatrix = None, - ExtraArgs = None, + ExtraArguments = None, Info = None, - InputAsMF = False, + InputFunctionAsMulti = False, Matrix = None, ObjectFunction = None, ObjectMatrix = None, @@ -140,14 +140,14 @@ class Aidsm(object): elif Concept == "ObservationOperator": self.setObservationOperator( Matrix, OneFunction, ThreeFunctions, AppliedInXb, - Parameters, Script, ExtraArgs, - Stored, AvoidRC, InputAsMF, Checked ) + Parameters, Script, ExtraArguments, + Stored, AvoidRC, InputFunctionAsMulti, Checked ) elif Concept in ("EvolutionModel", "ControlModel"): commande = getattr(self,"set"+Concept) commande( Matrix, OneFunction, ThreeFunctions, - Parameters, Script, Scheduler, ExtraArgs, - Stored, AvoidRC, InputAsMF, Checked ) + Parameters, Script, Scheduler, ExtraArguments, + Stored, AvoidRC, InputFunctionAsMulti, Checked ) else: raise ValueError("the variable named '%s' is not allowed."%str(Concept)) except Exception as e: @@ -345,17 +345,17 @@ class Aidsm(object): return 0 def setObservationOperator(self, - Matrix = None, - OneFunction = None, - ThreeFunctions = None, - AppliedInXb = None, - Parameters = None, - Script = None, - ExtraArgs = None, - Stored = False, - AvoidRC = True, - InputAsMF = False, - Checked = False): + Matrix = None, + OneFunction = None, + ThreeFunctions = None, + AppliedInXb = None, + Parameters = None, + Script = None, + ExtraArguments = None, + Stored = False, + AvoidRC = True, + InputFunctionAsMulti = False, + Checked = False): "Definition d'un concept de calcul" Concept = "ObservationOperator" self.__case.register("set"+Concept, dir(), locals()) @@ -367,9 +367,9 @@ class Aidsm(object): asScript = self.__with_directory(Script), asDict = Parameters, appliedInX = AppliedInXb, - extraArguments = ExtraArgs, + extraArguments = ExtraArguments, avoidRC = AvoidRC, - inputAsMF = InputAsMF, + inputAsMF = InputFunctionAsMulti, scheduledBy = None, toBeChecked = Checked, ) @@ -378,17 +378,17 @@ class Aidsm(object): return 0 def setEvolutionModel(self, - Matrix = None, - OneFunction = None, - ThreeFunctions = None, - Parameters = None, - Script = None, - Scheduler = None, - ExtraArgs = None, - Stored = False, - AvoidRC = True, - InputAsMF = False, - Checked = False): + Matrix = None, + OneFunction = None, + ThreeFunctions = None, + Parameters = None, + Script = None, + Scheduler = None, + ExtraArguments = None, + Stored = False, + AvoidRC = True, + InputFunctionAsMulti = False, + Checked = False): "Definition d'un concept de calcul" Concept = "EvolutionModel" self.__case.register("set"+Concept, dir(), locals()) @@ -400,9 +400,9 @@ class Aidsm(object): asScript = self.__with_directory(Script), asDict = Parameters, appliedInX = None, - extraArguments = ExtraArgs, + extraArguments = ExtraArguments, avoidRC = AvoidRC, - inputAsMF = InputAsMF, + inputAsMF = InputFunctionAsMulti, scheduledBy = Scheduler, toBeChecked = Checked, ) @@ -411,17 +411,17 @@ class Aidsm(object): return 0 def setControlModel(self, - Matrix = None, - OneFunction = None, - ThreeFunctions = None, - Parameters = None, - Script = None, - Scheduler = None, - ExtraArgs = None, - Stored = False, - AvoidRC = True, - InputAsMF = False, - Checked = False): + Matrix = None, + OneFunction = None, + ThreeFunctions = None, + Parameters = None, + Script = None, + Scheduler = None, + ExtraArguments = None, + Stored = False, + AvoidRC = True, + InputFunctionAsMulti = False, + Checked = False): "Definition d'un concept de calcul" Concept = "ControlModel" self.__case.register("set"+Concept, dir(), locals()) @@ -433,9 +433,9 @@ class Aidsm(object): asScript = self.__with_directory(Script), asDict = Parameters, appliedInX = None, - extraArguments = ExtraArgs, + extraArguments = ExtraArguments, avoidRC = AvoidRC, - inputAsMF = InputAsMF, + inputAsMF = InputFunctionAsMulti, scheduledBy = Scheduler, toBeChecked = Checked, ) diff --git a/src/daComposant/daCore/Interfaces.py b/src/daComposant/daCore/Interfaces.py index 7f6d8b4..796ccb8 100644 --- a/src/daComposant/daCore/Interfaces.py +++ b/src/daComposant/daCore/Interfaces.py @@ -118,11 +118,11 @@ class _TUIViewer(GenericCaseViewer): for k in __keys: __v = __local[k] if __v is None: continue - if k == "Checked" and not __v: continue - if k == "Stored" and not __v: continue - if k == "ColMajor" and not __v: continue - if k == "InputAsMF" and not __v: continue - if k == "AvoidRC" and __v: continue + if k == "Checked" and not __v: continue + if k == "Stored" and not __v: continue + if k == "ColMajor" and not __v: continue + if k == "InputFunctionAsMulti" and not __v: continue + if k == "AvoidRC" and __v: continue if k == "noDetails": continue if isinstance(__v,Persistence.Persistence): __v = __v.values() if callable(__v): __text = self._missing%__v.__name__+__text @@ -393,7 +393,7 @@ class _SCDViewer(GenericCaseViewer): __text += "%s_config['From'] = '%s'\n"%(__command,__f) __text += "%s_config['Data'] = %s\n"%(__command,__v) __text = __text.replace("''","'") - elif __k in ('Stored', 'Checked', 'ColMajor', 'InputAsMF'): + elif __k in ('Stored', 'Checked', 'ColMajor', 'InputFunctionAsMulti'): if bool(__v): __text += "%s_config['%s'] = '%s'\n"%(__command,__k,int(bool(__v))) elif __k in ('AvoidRC', 'noDetails'): diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_A.py b/test/test6903/Verification_des_mono_et_multi_fonctions_A.py index 8630ec5..f615adb 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_A.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_A.py @@ -72,7 +72,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 1 1") - adaopy.setObservationOperator(OneFunction = MultiFonction, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction, InputFunctionAsMulti = True) adaopy.setObserver("Analysis",Template="ValuePrinter") adaopy.execute() Xa["Multi/"+algo] = adaopy.get("Analysis")[-1] diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_B.py b/test/test6903/Verification_des_mono_et_multi_fonctions_B.py index 69a0eb8..3f9ef9e 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_B.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_B.py @@ -74,7 +74,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 1 1") - adaopy.setObservationOperator(OneFunction = MultiFonction, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction, InputFunctionAsMulti = True) adaopy.setEvolutionError (ScalarSparseMatrix = 1.) adaopy.setEvolutionModel (Matrix = "1 0 0;0 1 0;0 0 1") adaopy.setObserver("Analysis",Template="ValuePrinter") diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_C.py b/test/test6903/Verification_des_mono_et_multi_fonctions_C.py index 08f9a99..c4f18c6 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_C.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_C.py @@ -72,7 +72,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 2 3") - adaopy.setObservationOperator(OneFunction = MultiFonction, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction, InputFunctionAsMulti = True) adaopy.setObserver("Analysis",Template="ValuePrinter") adaopy.execute() Xa["Multi/"+algo] = adaopy.get("Analysis")[-1] diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_D.py b/test/test6903/Verification_des_mono_et_multi_fonctions_D.py index bbd418a..bcccedf 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_D.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_D.py @@ -100,7 +100,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5,0.5,1.5,2.5,0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 1 1 1 1 1 1 1 1") - adaopy.setObservationOperator(OneFunction = MultiFonction01, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction01, InputFunctionAsMulti = True) adaopy.setObserver("Analysis",Template="ValuePrinter") adaopy.execute() Xa["Multi/"+algo] = adaopy.get("Analysis")[-1] diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_E.py b/test/test6903/Verification_des_mono_et_multi_fonctions_E.py index 894c242..e5324e5 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_E.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_E.py @@ -102,7 +102,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5,0.5,1.5,2.5,0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 1 1 1 1 1 1 1 1") - adaopy.setObservationOperator(OneFunction = MultiFonction01, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction01, InputFunctionAsMulti = True) adaopy.setEvolutionError (ScalarSparseMatrix = 1.) adaopy.setEvolutionModel (Matrix = "1 0 0;0 1 0;0 0 1") adaopy.setObserver("Analysis",Template="ValuePrinter") diff --git a/test/test6903/Verification_des_mono_et_multi_fonctions_F.py b/test/test6903/Verification_des_mono_et_multi_fonctions_F.py index d07435f..0cc31e8 100644 --- a/test/test6903/Verification_des_mono_et_multi_fonctions_F.py +++ b/test/test6903/Verification_des_mono_et_multi_fonctions_F.py @@ -100,7 +100,7 @@ def test1(): adaopy.setBackgroundError (ScalarSparseMatrix = 1.) adaopy.setObservation (Vector = [0.5,1.5,2.5,0.5,1.5,2.5,0.5,1.5,2.5]) adaopy.setObservationError (DiagonalSparseMatrix = "1 1 1 1 1 1 1 1 1") - adaopy.setObservationOperator(OneFunction = MultiFonction01, InputAsMF = True) + adaopy.setObservationOperator(OneFunction = MultiFonction01, InputFunctionAsMulti = True) adaopy.setObserver("Analysis",Template="ValuePrinter") adaopy.execute() Xa["Multi/"+algo] = adaopy.get("Analysis")[-1] -- 2.39.2