From 747d1551dfc0d19dbc7e9fdba6c02de752b675bd Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Fri, 12 May 2023 20:45:32 +0200 Subject: [PATCH] Diagnostic and documentation update --- doc/en/snippets/ModuleCompatibility.rst | 2 +- doc/en/snippets/ModuleValidation.rst | 7 ++++--- doc/fr/snippets/ModuleCompatibility.rst | 2 +- doc/fr/snippets/ModuleValidation.rst | 8 ++++---- src/daComposant/daCore/Aidsm.py | 4 ++++ src/daComposant/daCore/PlatformInfo.py | 22 ++++++++++++++++++++++ 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/doc/en/snippets/ModuleCompatibility.rst b/doc/en/snippets/ModuleCompatibility.rst index 747d7ea..a7f1831 100644 --- a/doc/en/snippets/ModuleCompatibility.rst +++ b/doc/en/snippets/ModuleCompatibility.rst @@ -14,7 +14,7 @@ versions within the range described below. :header: "Tool", "Minimal version", "Reached version" :widths: 20, 10, 10 - Python, 3.6.5, 3.10.10 + Python, 3.6.5, 3.10.11 Numpy, 1.14.3, 1.24.3 Scipy, 0.19.1, 1.10.1 MatplotLib, 2.2.2, 3.7.1 diff --git a/doc/en/snippets/ModuleValidation.rst b/doc/en/snippets/ModuleValidation.rst index 67d02e1..0f39a12 100644 --- a/doc/en/snippets/ModuleValidation.rst +++ b/doc/en/snippets/ModuleValidation.rst @@ -1,8 +1,9 @@ Each version of the ADAO module is validated within the framework of SALOME, and is therefore compatible with the environment implicitly defined by the -|release| version of SALOME identical to that of ADAO. The validation versions -are indicated here for information purposes only, knowing that, in case of -doubt, the SALOME version sheet [Salome]_ is the official validation version. +corresponding |release| version of SALOME identical to that of ADAO for the +current document. The validation versions are indicated here for information +purposes only, knowing that, in case of doubt, the SALOME version sheet +[Salome]_ is the official validation version. .. csv-table:: Validation versions of support tools for ADAO :header: "Tool", "Version" diff --git a/doc/fr/snippets/ModuleCompatibility.rst b/doc/fr/snippets/ModuleCompatibility.rst index 245acd9..65e897f 100644 --- a/doc/fr/snippets/ModuleCompatibility.rst +++ b/doc/fr/snippets/ModuleCompatibility.rst @@ -15,7 +15,7 @@ l'étendue décrite ci-dessous. :header: "Outil", "Version minimale", "Version atteinte" :widths: 20, 10, 10 - Python, 3.6.5, 3.10.10 + Python, 3.6.5, 3.10.11 Numpy, 1.14.3, 1.24.3 Scipy, 0.19.1, 1.10.1 MatplotLib, 2.2.2, 3.7.1 diff --git a/doc/fr/snippets/ModuleValidation.rst b/doc/fr/snippets/ModuleValidation.rst index 1fffbc3..1e46ca8 100644 --- a/doc/fr/snippets/ModuleValidation.rst +++ b/doc/fr/snippets/ModuleValidation.rst @@ -1,9 +1,9 @@ Chaque version du module ADAO est validée dans le cadre de SALOME, et elle est donc compatible avec l'environnement implicitement défini par la version -|release| de SALOME identique à celle d'ADAO. Les versions de validation sont -indiquées ici pour information uniquement sachant que, en cas de doute, c'est -la fiche de version de SALOME [Salome]_ qui fait foi pour les versions -officielles de validation. +correspondante |release| de SALOME identique à celle d'ADAO pour le présent +document. Les versions de validation sont indiquées ici pour information +uniquement sachant que, en cas de doute, c'est la fiche de version de SALOME +[Salome]_ qui indique les versions officielles de validation. .. csv-table:: Versions de validation des outils support pour ADAO :header: "Outil", "Version" diff --git a/src/daComposant/daCore/Aidsm.py b/src/daComposant/daCore/Aidsm.py index 57885e0..7e5d913 100644 --- a/src/daComposant/daCore/Aidsm.py +++ b/src/daComposant/daCore/Aidsm.py @@ -851,6 +851,10 @@ class Aidsm(object): msg = self.dump(None, "SimpleReportInPlainTxt") return msg + def sysinfo(self, title=""): + msg = PlatformInfo.PlatformInfo().getAllInformation(" ", title) + return msg + def prepare_to_pickle(self): "Retire les variables non pickelisables, avec recopie efficace" if self.__adaoObject['AlgorithmParameters'] is not None: diff --git a/src/daComposant/daCore/PlatformInfo.py b/src/daComposant/daCore/PlatformInfo.py index 7279509..2c0e4bf 100644 --- a/src/daComposant/daCore/PlatformInfo.py +++ b/src/daComposant/daCore/PlatformInfo.py @@ -137,6 +137,28 @@ class PlatformInfo(object): __msg += "\n%s%30s : %s" %(__prefix,"os.path.expanduser",os.path.expanduser('~')) return __msg # + def getApplicationInformation(self, __prefix=""): + __msg = "" + __msg += "\n%s%30s : %s" %(__prefix,"ADAO version",self.getVersion()) + __msg += "\n" + __msg += "\n%s%30s : %s" %(__prefix,"Python version",self.getPythonVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"Numpy version",self.getNumpyVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"Scipy version",self.getScipyVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"NLopt version",self.getNloptVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"MatplotLib version",self.getMatplotlibVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"GnuplotPy version",self.getGnuplotVersion()) + __msg += "\n%s%30s : %s" %(__prefix,"Sphinx version",self.getSphinxVersion()) + return __msg + # + def getAllInformation(self, __prefix="", __title="Whole system information"): + __msg = "" + if len(__title)>0: + __msg += "\n"+"="*80+"\n"+__title+"\n"+"="*80+"\n" + __msg += self.getSystemInformation(__prefix) + __msg += "\n" + __msg += self.getApplicationInformation(__prefix) + return __msg + # def getPythonVersion(self): "Retourne la version de python disponible" return ".".join([str(x) for x in sys.version_info[0:3]]) # map(str,sys.version_info[0:3])) -- 2.39.2