From 585be25e4c896f0209c6f87c4ccf05cf395faec0 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 15 Feb 2024 17:47:30 +0100 Subject: [PATCH] Matrix --- analysematrix.py | 4 ++-- chemins.py | 8 ++++---- layout.py | 6 +++--- tabcatego.py | 2 +- tableau.py | 2 +- tabsimi.py | 6 +++--- tabsplitvar.py | 2 +- tabverges.py | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/analysematrix.py b/analysematrix.py index cae6ff8..40bd5b9 100644 --- a/analysematrix.py +++ b/analysematrix.py @@ -60,7 +60,7 @@ class AnalyseMatrix : if self.parametres.get('tohistory', True) : self.time = time() - self.t1 minutes, seconds = divmod(self.time, 60) - hours, minutes = divmod(minutes, 60) + hours, minutes = divmod(minutes, 60) self.parametres['time'] = '%.0fh %.0fm %.0fs' % (hours, minutes, seconds) self.parametres['ira'] = self.pathout['Analyse.ira'] DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) @@ -94,4 +94,4 @@ class AnalyseMatrix : sleep(0.2) else : sleep(0.2) - return check_Rresult(self.ira, pid) \ No newline at end of file + return check_Rresult(self.ira, pid) diff --git a/chemins.py b/chemins.py index 9c5dee7..44f092b 100644 --- a/chemins.py +++ b/chemins.py @@ -77,7 +77,7 @@ class PathOut : f = os.path.join(self.dirout, self.d[key]).replace('\\', '\\\\') return normpath_win32(f) #return os.path.join(self.dirout, self.d[key]).replace('\\', '\\\\') - + def getF(self, key) : return self.__getitem__(key).replace('\\', '/') @@ -290,7 +290,7 @@ ChdTxtPathOut = {'TableUc1': 'TableUc1.csv', 'prof_type' : 'profil_type.csv', 'antiprof_type' : 'antiprof_type.csv', 'type_cl' : 'type_cl.csv', - 'db' : 'analyse.db', + 'db' : 'analyse'#.db, } def StatTxtPathOut(pathout): @@ -314,7 +314,7 @@ def StatTxtPathOut(pathout): 'afct_col_csv': ffr(os.path.join(pathout, 'afct_col.csv')), 'afct_facteur_csv': ffr(os.path.join(pathout, 'afct_facteur.csv')), 'ira' : ffr(os.path.join(pathout, 'Analyse.ira')), - 'db' : os.path.join(pathout, 'analyse.db'), + 'db' : os.path.join(pathout, 'analyse'), 'zipf' : ffr(os.path.join(pathout, 'zipf.png')), } return d @@ -338,7 +338,7 @@ simipath = {'mat01' : 'mat01.csv', 'liste_graph' :'liste_graph.txt', 'ira' : 'Analyse.ira', 'film' : '', - 'db' : 'analyse.db', + 'db' : 'analyse', 'corpus' : 'corpus.db', } diff --git a/layout.py b/layout.py index feaa12d..6b186e6 100644 --- a/layout.py +++ b/layout.py @@ -407,7 +407,7 @@ class OpenCHDS(): else : corpname = self.corpus.parametres['matrix_name'] if os.path.exists(self.pathout['analyse.db']) : - self.corpus.read_tableau(self.pathout['analyse.db']) + self.corpus.read_tableau(self.pathout['analyse']) clnb = parametres['clnb'] dlg = progressbar(self, maxi = 4 + clnb) self.clnb = clnb @@ -1347,7 +1347,7 @@ class DefaultMatLayout : self.tableau = tableau self.parametres = parametres if os.path.exists(self.pathout['analyse.db']) : - self.tableau.read_tableau(self.pathout['analyse.db']) + self.tableau.read_tableau(self.pathout['analyse']) self.dolayout() self.ira.nb.SetSelection(self.ira.nb.GetPageCount() - 1) self.ira.ShowAPane("Tab_content") @@ -1402,7 +1402,7 @@ class ProtoLayout(DefaultMatLayout) : class CateLayout(DefaultMatLayout) : def dolayout(self) : - self.tableau.read_tableau(self.pathout['analyse.db']) + self.tableau.read_tableau(self.pathout['analyse']) TabCate = ElCategorizator(self.ira.nb, self.pathout, self.tableau) self.ira.nb.AddPage(TabCate, ' - '.join([_('ElCaTeGoRiZaToR'), self.parametres['name']])) diff --git a/tabcatego.py b/tabcatego.py index 5f4052e..994a6b6 100644 --- a/tabcatego.py +++ b/tabcatego.py @@ -88,6 +88,6 @@ class Categorisation(AnalyseMatrix): cate['TOCATE'][val] = self.tableau.actives[val][0] with open(self.pathout['cate.json'], 'w', encoding='utf8') as f : f.write(json.dumps(cate)) - self.tableau.save_tableau(self.pathout['analyse.db']) + self.tableau.save_tableau(self.pathout['analyse']) self.dlg.Destroy() diff --git a/tableau.py b/tableau.py index 1be437b..a6d09da 100644 --- a/tableau.py +++ b/tableau.py @@ -95,7 +95,7 @@ class Tableau() : self.parametres['type'] = 'matrix' self.parametres['matrix_name'] = os.path.basename(filename) self.parametres['uuid'] = str(uuid4()) - self.parametres['shelves'] = os.path.join(self.parametres['pathout'], 'shelve.db') + self.parametres['shelves'] = os.path.join(self.parametres['pathout'], 'shelve') self.parametres['ira'] = os.path.join(self.parametres['pathout'], 'Matrix.ira') else : self.parametres = parametres diff --git a/tabsimi.py b/tabsimi.py index b805cb8..2c5ecbc 100644 --- a/tabsimi.py +++ b/tabsimi.py @@ -90,7 +90,7 @@ class DoSimi(AnalyseMatrix): self.tableau.parametres['mineff'] = 0 if not self.fromprof : dialcol = FreqDialog(self.parent, self.tableau.get_colnames(), _("Select columns"), size=(600, 250), showNA = False) - dialcol.CenterOnParent() + dialcol.CenterOnParent() res = dialcol.ShowModal() else : res = wx.ID_OK @@ -121,14 +121,14 @@ class DoSimi(AnalyseMatrix): self.paramsimi = self.make_param() self.parametres.update(self.paramsimi) #self.parametres['type'] = 'simimatrix' - if not self.pathout : + if not self.pathout : self.parametres['pathout'] = ConstructPathOut(self.parametres['pathout'], 'SimiMatrix') else : self.parametres['pathout'] = self.dirout self.pathout.createdir(self.parametres['pathout']) self.pathout.dirout = self.parametres['pathout'] self.dial.Destroy() - #self.doanalyse2() + #self.doanalyse2() else : self.dial.Destroy() self.parametres = None diff --git a/tabsplitvar.py b/tabsplitvar.py index 9cdad85..4acf31c 100644 --- a/tabsplitvar.py +++ b/tabsplitvar.py @@ -50,7 +50,7 @@ class SplitMatrixFromVar(AnalyseMatrix): tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace('*','')) if not os.path.exists(tab.pathout.dirout) : os.mkdir(tab.pathout.dirout) - tab.linecontent = newtabs[mod] + tab.linecontent = newtabs[mod] tab.make_content_simple() tab.parametres['matrix'] = tab.parametres['uuid'] self.ira.tree.OnItemAppend(tab.parametres, select = False) diff --git a/tabverges.py b/tabverges.py index 48ee844..24bcce7 100644 --- a/tabverges.py +++ b/tabverges.py @@ -72,7 +72,7 @@ class Prototypical(AnalyseMatrix) : self.parametres['typegraph'] = 'plan' self.dial.Destroy() else : - self.dial.Destroy() + self.dial.Destroy() self.parametres = None def doanalyse(self) : -- 2.7.4