From df14452bac74b4fb7b3719037b86187f4567255f Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Tue, 15 Oct 2024 16:09:19 +0200 Subject: [PATCH] Updating module version information --- bin/module_version.py | 4 +- resources/SalomeApp.xml.in | 2 +- src/daComposant/daCore/version.py | 10 +- .../pst4mod/modelica_calibration/case.py | 2 +- ..._13_0.py => traduitADAOV7_4_0ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV7_5_0ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV7_5_1ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV7_6_0ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV7_7_0ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV7_8_0ToV9_14_0.py} | 2 +- ..._13_0.py => traduitADAOV8_1_0ToV9_14_0.py} | 2 +- src/daEficas/traduitADAOV8_2_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV8_2_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV8_3_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV8_3_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV8_4_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV8_4_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV8_5_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV8_5_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV8_6_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV8_6_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_10_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_10_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_11_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_11_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_12_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_12_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_13_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_2_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_2_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_3_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_3_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_4_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_4_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_5_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_5_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_6_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_6_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_7_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_7_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_8_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_8_0ToV9_14_0.py | 99 +++++++++++++++++++ src/daEficas/traduitADAOV9_9_0ToV9_13_0.py | 99 ------------------- src/daEficas/traduitADAOV9_9_0ToV9_14_0.py | 99 +++++++++++++++++++ ...V9_13_0.py => traduitADAOsansToV9_14_0.py} | 2 +- 45 files changed, 1700 insertions(+), 1601 deletions(-) rename src/daEficas/{traduitADAOV7_4_0ToV9_13_0.py => traduitADAOV7_4_0ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV7_5_0ToV9_13_0.py => traduitADAOV7_5_0ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV7_5_1ToV9_13_0.py => traduitADAOV7_5_1ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV7_7_0ToV9_13_0.py => traduitADAOV7_6_0ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV7_8_0ToV9_13_0.py => traduitADAOV7_7_0ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV8_1_0ToV9_13_0.py => traduitADAOV7_8_0ToV9_14_0.py} (99%) rename src/daEficas/{traduitADAOV7_6_0ToV9_13_0.py => traduitADAOV8_1_0ToV9_14_0.py} (99%) delete mode 100644 src/daEficas/traduitADAOV8_2_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV8_2_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV8_3_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV8_3_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV8_4_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV8_4_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV8_5_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV8_5_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV8_6_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV8_6_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_10_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_10_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_11_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_11_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_12_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_12_0ToV9_14_0.py create mode 100644 src/daEficas/traduitADAOV9_13_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_2_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_2_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_3_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_3_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_4_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_4_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_5_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_5_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_6_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_6_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_7_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_7_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_8_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_8_0ToV9_14_0.py delete mode 100644 src/daEficas/traduitADAOV9_9_0ToV9_13_0.py create mode 100644 src/daEficas/traduitADAOV9_9_0ToV9_14_0.py rename src/daEficas/{traduitADAOsansToV9_13_0.py => traduitADAOsansToV9_14_0.py} (99%) diff --git a/bin/module_version.py b/bin/module_version.py index fdf01be..aa2ae52 100644 --- a/bin/module_version.py +++ b/bin/module_version.py @@ -29,9 +29,9 @@ __author__ = "Jean-Philippe ARGAUD" __all__ = [] name = "ADAO" -version = "9.13.0" +version = "9.14.0" year = "2024" -date = "mercredi 22 mai 2024, 22:22:22 (UTC+0100)" +date = "vendredi 22 novembre 2024, 22:22:22 (UTC+0100)" longname = name + ", a module for Data Assimilation and Optimization" cata = "V" + version.replace(".","_") diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 85e0358..06544f7 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -28,7 +28,7 @@ - + diff --git a/src/daComposant/daCore/version.py b/src/daComposant/daCore/version.py index dd604ee..70a0754 100644 --- a/src/daComposant/daCore/version.py +++ b/src/daComposant/daCore/version.py @@ -26,11 +26,11 @@ __author__ = "Jean-Philippe ARGAUD" __all__ = [] -name = "ADAO" -version = "9.13.0" -year = "2024" -date = "mercredi 22 mai 2024, 22:22:22 (UTC+0100)" +name = "ADAO" +version = "9.14.0" +year = "2024" +date = "vendredi 22 novembre 2024, 22:22:22 (UTC+0100)" longname = name + ", a module for Data Assimilation and Optimization" -cata = "V" + version.replace(".", "_") +cata = "V" + version.replace(".", "_") __version__ = version diff --git a/src/daComposant/daNumerics/pst4mod/modelica_calibration/case.py b/src/daComposant/daNumerics/pst4mod/modelica_calibration/case.py index d1e7e08..6b8d20b 100644 --- a/src/daComposant/daNumerics/pst4mod/modelica_calibration/case.py +++ b/src/daComposant/daNumerics/pst4mod/modelica_calibration/case.py @@ -24,7 +24,7 @@ __all__ = ["Calibration", "name", "version", "year"] # ============================================================================== name = "Modelica and Dymola Calibration Tools" -version = "1.0.9.13.0" # "x.x"+"adao version" +version = "1.0.9.14.0" # "x.x"+"adao version" year = "2021" # ============================================================================== diff --git a/src/daEficas/traduitADAOV7_4_0ToV9_13_0.py b/src/daEficas/traduitADAOV7_4_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_4_0ToV9_13_0.py rename to src/daEficas/traduitADAOV7_4_0ToV9_14_0.py index 6773bb7..3094748 100644 --- a/src/daEficas/traduitADAOV7_4_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_4_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV7_5_0ToV9_13_0.py b/src/daEficas/traduitADAOV7_5_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_5_0ToV9_13_0.py rename to src/daEficas/traduitADAOV7_5_0ToV9_14_0.py index 6773bb7..3094748 100644 --- a/src/daEficas/traduitADAOV7_5_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_5_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV7_5_1ToV9_13_0.py b/src/daEficas/traduitADAOV7_5_1ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_5_1ToV9_13_0.py rename to src/daEficas/traduitADAOV7_5_1ToV9_14_0.py index 6773bb7..3094748 100644 --- a/src/daEficas/traduitADAOV7_5_1ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_5_1ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV7_7_0ToV9_13_0.py b/src/daEficas/traduitADAOV7_6_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_7_0ToV9_13_0.py rename to src/daEficas/traduitADAOV7_6_0ToV9_14_0.py index a3bc271..4a74938 100644 --- a/src/daEficas/traduitADAOV7_7_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_6_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV7_8_0ToV9_13_0.py b/src/daEficas/traduitADAOV7_7_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_8_0ToV9_13_0.py rename to src/daEficas/traduitADAOV7_7_0ToV9_14_0.py index a3bc271..4a74938 100644 --- a/src/daEficas/traduitADAOV7_8_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_7_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV8_1_0ToV9_13_0.py b/src/daEficas/traduitADAOV7_8_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV8_1_0ToV9_13_0.py rename to src/daEficas/traduitADAOV7_8_0ToV9_14_0.py index a3bc271..4a74938 100644 --- a/src/daEficas/traduitADAOV8_1_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV7_8_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV7_6_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_1_0ToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_6_0ToV9_13_0.py rename to src/daEficas/traduitADAOV8_1_0ToV9_14_0.py index a3bc271..4a74938 100644 --- a/src/daEficas/traduitADAOV7_6_0ToV9_13_0.py +++ b/src/daEficas/traduitADAOV8_1_0ToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] diff --git a/src/daEficas/traduitADAOV8_2_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_2_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV8_2_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV8_2_0ToV9_14_0.py b/src/daEficas/traduitADAOV8_2_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV8_2_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV8_3_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_3_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV8_3_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV8_3_0ToV9_14_0.py b/src/daEficas/traduitADAOV8_3_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV8_3_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV8_4_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_4_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV8_4_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV8_4_0ToV9_14_0.py b/src/daEficas/traduitADAOV8_4_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV8_4_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV8_5_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_5_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV8_5_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV8_5_0ToV9_14_0.py b/src/daEficas/traduitADAOV8_5_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV8_5_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV8_6_0ToV9_13_0.py b/src/daEficas/traduitADAOV8_6_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV8_6_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV8_6_0ToV9_14_0.py b/src/daEficas/traduitADAOV8_6_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV8_6_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_10_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_10_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_10_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_10_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_10_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_10_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_11_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_11_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_11_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_11_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_11_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_11_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_12_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_12_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_12_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_12_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_12_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_12_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_13_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_13_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_13_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_2_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_2_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_2_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_2_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_2_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_2_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_3_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_3_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_3_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_3_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_3_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_3_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_4_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_4_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_4_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_4_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_4_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_4_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_5_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_5_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_5_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_5_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_5_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_5_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_6_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_6_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_6_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_6_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_6_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_6_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_7_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_7_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_7_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_7_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_7_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_7_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_8_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_8_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_8_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_8_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_8_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_8_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOV9_9_0ToV9_13_0.py b/src/daEficas/traduitADAOV9_9_0ToV9_13_0.py deleted file mode 100644 index a3bc271..0000000 --- a/src/daEficas/traduitADAOV9_9_0ToV9_13_0.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2024 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -import argparse # optparse deprecated since Python version 3.2 -import sys -import re - -import Traducteur.log as log -from Traducteur.load import getJDC, getJDCFromTexte -from Traducteur.mocles import parseKeywords -from Traducteur.dictErreurs import genereErreurPourCommande -from Traducteur.inseremocle import * -from Traducteur.movemocle import * -from Traducteur.renamemocle import * - -version_out = "V9_13_0" - -usage="""Usage: python %(prog)s [args] - -Typical use is: - python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" - -atraiter = ( - ) - -dict_erreurs = { - } - -sys.dict_erreurs=dict_erreurs - -def traduc(infile=None,outfile=None,texte=None,flog=None): - hdlr = log.initialise(flog) - if infile is not None: - jdc = getJDC(infile,atraiter) - elif texte is not None: - jdc = getJDCFromTexte(texte,atraiter) - else: - raise ValueError("Traduction du JDC impossible") - # ========================================================================== - - - # ========================================================================== - fsrc = jdc.getSource() - fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) - fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) - fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) - fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) - # - log.ferme(hdlr) - if outfile is not None: - with open(outfile,'w') as f: - f.write( fsrc ) - else: - return fsrc - -class MonTraducteur: - def __init__(self,texte): - self.__texte = str(texte) - def traduit(self): - return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) - -def main(): - parser = argparse.ArgumentParser(usage=usage) - - parser.add_argument('-i','--infile', dest="infile", - help="Le fichier COMM en entree, a traduire") - parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', - help="Le fichier COMM en sortie, traduit") - - args = parser.parse_args() - if len(args.infile) == 0: - print("") - parser.print_help() - print("") - sys.exit(1) - - traduc(args.infile,args.outfile) - -if __name__ == '__main__': - main() diff --git a/src/daEficas/traduitADAOV9_9_0ToV9_14_0.py b/src/daEficas/traduitADAOV9_9_0ToV9_14_0.py new file mode 100644 index 0000000..4a74938 --- /dev/null +++ b/src/daEficas/traduitADAOV9_9_0ToV9_14_0.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2024 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import argparse # optparse deprecated since Python version 3.2 +import sys +import re + +import Traducteur.log as log +from Traducteur.load import getJDC, getJDCFromTexte +from Traducteur.mocles import parseKeywords +from Traducteur.dictErreurs import genereErreurPourCommande +from Traducteur.inseremocle import * +from Traducteur.movemocle import * +from Traducteur.renamemocle import * + +version_out = "V9_14_0" + +usage="""Usage: python %(prog)s [args] + +Typical use is: + python %(prog)s --infile=xxxx.comm --outfile=yyyy.comm""" + +atraiter = ( + ) + +dict_erreurs = { + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile=None,outfile=None,texte=None,flog=None): + hdlr = log.initialise(flog) + if infile is not None: + jdc = getJDC(infile,atraiter) + elif texte is not None: + jdc = getJDCFromTexte(texte,atraiter) + else: + raise ValueError("Traduction du JDC impossible") + # ========================================================================== + + + # ========================================================================== + fsrc = jdc.getSource() + fsrc = re.sub( "MaximumNumberOfSteps", "MaximumNumberOfIterations", fsrc ) + fsrc = re.sub( "EnableMultiProcessing", "EnableWiseParallelism", fsrc ) + fsrc = re.sub( "#VERSION_CATALOGUE:.*:FIN VERSION_CATALOGUE", "#VERSION_CATALOGUE:%s:FIN VERSION_CATALOGUE"%version_out, fsrc) + fsrc = re.sub( "#CHECKSUM.*FIN CHECKSUM", "", fsrc ) + # + log.ferme(hdlr) + if outfile is not None: + with open(outfile,'w') as f: + f.write( fsrc ) + else: + return fsrc + +class MonTraducteur: + def __init__(self,texte): + self.__texte = str(texte) + def traduit(self): + return traduc(infile=None,outfile=None,texte=self.__texte,flog=None) + +def main(): + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_argument('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + args = parser.parse_args() + if len(args.infile) == 0: + print("") + parser.print_help() + print("") + sys.exit(1) + + traduc(args.infile,args.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOsansToV9_13_0.py b/src/daEficas/traduitADAOsansToV9_14_0.py similarity index 99% rename from src/daEficas/traduitADAOsansToV9_13_0.py rename to src/daEficas/traduitADAOsansToV9_14_0.py index 6773bb7..3094748 100644 --- a/src/daEficas/traduitADAOsansToV9_13_0.py +++ b/src/daEficas/traduitADAOsansToV9_14_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V9_13_0" +version_out = "V9_14_0" usage="""Usage: python %(prog)s [args] -- 2.39.2