From c8e8e6e64452e558684284483692ec4461465c51 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Sun, 20 Sep 2015 21:48:22 +0200 Subject: [PATCH] Documentation and version change settings --- bin/module_version.py | 2 +- doc/en/advanced.rst | 7 ++ doc/fr/advanced.rst | 7 ++ resources/SalomeApp.xml | 2 +- src/daComposant/daCore/version.py | 4 +- src/daEficas/Makefile.am | 9 +- ...V7_6_0.py => traduitADAOV7_4_0ToV7_7_0.py} | 2 +- ...V7_6_0.py => traduitADAOV7_5_0ToV7_7_0.py} | 2 +- ...V7_6_0.py => traduitADAOV7_5_1ToV7_7_0.py} | 2 +- src/daEficas/traduitADAOV7_6_0ToV7_7_0.py | 98 +++++++++++++++++++ ...ToV7_6_0.py => traduitADAOsansToV7_7_0.py} | 2 +- 11 files changed, 125 insertions(+), 12 deletions(-) rename src/daEficas/{traduitADAOV7_4_0ToV7_6_0.py => traduitADAOV7_4_0ToV7_7_0.py} (99%) rename src/daEficas/{traduitADAOV7_5_0ToV7_6_0.py => traduitADAOV7_5_0ToV7_7_0.py} (99%) rename src/daEficas/{traduitADAOV7_5_1ToV7_6_0.py => traduitADAOV7_5_1ToV7_7_0.py} (99%) create mode 100644 src/daEficas/traduitADAOV7_6_0ToV7_7_0.py rename src/daEficas/{traduitADAOsansToV7_6_0.py => traduitADAOsansToV7_7_0.py} (99%) diff --git a/bin/module_version.py b/bin/module_version.py index d9ee3cf..c552d93 100644 --- a/bin/module_version.py +++ b/bin/module_version.py @@ -23,6 +23,6 @@ # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D name = "ADAO" -version = "V7_6_0" # Version pour catalogue, avec des "_" entre les numeros +version = "V7_7_0" # Version pour catalogue, avec des "_" entre les numeros date = "" year = "2015" # Annee de copyright diff --git a/doc/en/advanced.rst b/doc/en/advanced.rst index e28f9d2..fca7105 100644 --- a/doc/en/advanced.rst +++ b/doc/en/advanced.rst @@ -328,6 +328,13 @@ is not guaranteed for all the commands or keywords. In general also, an ADAO case file for one version can not be read by a previous minor or major version of the ADAO module. +Switching from 7.6 to 7.7 ++++++++++++++++++++++++++ + +There is no known incompatibility for the ADAO case files. The upgrade procedure +is to read the old ADAO case file with the new SALOME/ADAO module, and save it +with a new name. + Switching from 7.5 to 7.6 +++++++++++++++++++++++++ diff --git a/doc/fr/advanced.rst b/doc/fr/advanced.rst index 39f56a6..085a8c3 100644 --- a/doc/fr/advanced.rst +++ b/doc/fr/advanced.rst @@ -350,6 +350,13 @@ commandes ou tous les mots-cl version ne peut pas être lu par une précédente version mineure ou majeure du module ADAO. +Passer de la version 7.6 à la 7.7 ++++++++++++++++++++++++++++++++++ + +Il n'y a pas d'incompatibilité connue pour les fichiers de cas ADAO. La +procédure de montée en version consiste à lire l'ancien fichier de cas ADAO +avec le nouveau module SALOME/ADAO, et à l'enregistrer avec un nouveau nom. + Passer de la version 7.5 à la 7.6 +++++++++++++++++++++++++++++++++ diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 8b9a8e5..79605c6 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -28,7 +28,7 @@ - +
diff --git a/src/daComposant/daCore/version.py b/src/daComposant/daCore/version.py index ec2d175..3b537b9 100644 --- a/src/daComposant/daCore/version.py +++ b/src/daComposant/daCore/version.py @@ -21,5 +21,5 @@ # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D name = "Data Assimilation Package" -version = "0.11.0" -date = "jeudi 30 avril 2015, 12:12:12 (UTC+0100)" +version = "0.12.0" +date = "vendredi 31 octobre 2015, 12:12:12 (UTC+0100)" diff --git a/src/daEficas/Makefile.am b/src/daEficas/Makefile.am index 6535581..1a35ebf 100644 --- a/src/daEficas/Makefile.am +++ b/src/daEficas/Makefile.am @@ -32,9 +32,10 @@ mypkgpython_PYTHON = \ __init__.py \ prefs_ADAO.py \ prefs.py \ - traduitADAOsansToV7_6_0.py \ - traduitADAOV7_4_0ToV7_6_0.py \ - traduitADAOV7_5_0ToV7_6_0.py \ - traduitADAOV7_5_1ToV7_6_0.py + traduitADAOsansToV7_7_0.py \ + traduitADAOV7_4_0ToV7_7_0.py \ + traduitADAOV7_5_0ToV7_7_0.py \ + traduitADAOV7_5_1ToV7_7_0.py \ + traduitADAOV7_6_0ToV7_7_0.py EXTRA_DIST = prefs_ADAO.py.in diff --git a/src/daEficas/traduitADAOV7_4_0ToV7_6_0.py b/src/daEficas/traduitADAOV7_4_0ToV7_7_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_4_0ToV7_6_0.py rename to src/daEficas/traduitADAOV7_4_0ToV7_7_0.py index ac19354..efcc551 100644 --- a/src/daEficas/traduitADAOV7_4_0ToV7_6_0.py +++ b/src/daEficas/traduitADAOV7_4_0ToV7_7_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V7_6_0" +version_out = "V7_7_0" usage="""Usage: python %prog [options] diff --git a/src/daEficas/traduitADAOV7_5_0ToV7_6_0.py b/src/daEficas/traduitADAOV7_5_0ToV7_7_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_5_0ToV7_6_0.py rename to src/daEficas/traduitADAOV7_5_0ToV7_7_0.py index ac19354..efcc551 100644 --- a/src/daEficas/traduitADAOV7_5_0ToV7_6_0.py +++ b/src/daEficas/traduitADAOV7_5_0ToV7_7_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V7_6_0" +version_out = "V7_7_0" usage="""Usage: python %prog [options] diff --git a/src/daEficas/traduitADAOV7_5_1ToV7_6_0.py b/src/daEficas/traduitADAOV7_5_1ToV7_7_0.py similarity index 99% rename from src/daEficas/traduitADAOV7_5_1ToV7_6_0.py rename to src/daEficas/traduitADAOV7_5_1ToV7_7_0.py index ac19354..efcc551 100644 --- a/src/daEficas/traduitADAOV7_5_1ToV7_6_0.py +++ b/src/daEficas/traduitADAOV7_5_1ToV7_7_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V7_6_0" +version_out = "V7_7_0" usage="""Usage: python %prog [options] diff --git a/src/daEficas/traduitADAOV7_6_0ToV7_7_0.py b/src/daEficas/traduitADAOV7_6_0ToV7_7_0.py new file mode 100644 index 0000000..7173bd4 --- /dev/null +++ b/src/daEficas/traduitADAOV7_6_0ToV7_7_0.py @@ -0,0 +1,98 @@ +#-*-coding:iso-8859-1-*- +# +# Copyright (C) 2008-2015 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 optparse +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 = "V7_7_0" + +usage="""Usage: python %prog [options] + +Typical use is: + python %prog --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( "#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: + f=open(outfile,'w') + f.write( fsrc ) + f.close() + 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 = optparse.OptionParser(usage=usage) + + parser.add_option('-i','--infile', dest="infile", + help="Le fichier COMM en entree, a traduire") + parser.add_option('-o','--outfile', dest="outfile", default='out.comm', + help="Le fichier COMM en sortie, traduit") + + options, args = parser.parse_args() + if len(options.infile) == 0: + print + parser.print_help() + print + sys.exit(1) + + traduc(options.infile,options.outfile) + +if __name__ == '__main__': + main() diff --git a/src/daEficas/traduitADAOsansToV7_6_0.py b/src/daEficas/traduitADAOsansToV7_7_0.py similarity index 99% rename from src/daEficas/traduitADAOsansToV7_6_0.py rename to src/daEficas/traduitADAOsansToV7_7_0.py index ac19354..efcc551 100644 --- a/src/daEficas/traduitADAOsansToV7_6_0.py +++ b/src/daEficas/traduitADAOsansToV7_7_0.py @@ -32,7 +32,7 @@ from Traducteur.inseremocle import * from Traducteur.movemocle import * from Traducteur.renamemocle import * -version_out = "V7_6_0" +version_out = "V7_7_0" usage="""Usage: python %prog [options] -- 2.39.2