File: helping_with_testing.patch

package info (click to toggle)
python-seqcluster 1.2.9%2Bds-5
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 113,636 kB
  • sloc: python: 5,308; makefile: 184; sh: 122; javascript: 55
file content (43 lines) | stat: -rw-r--r-- 1,713 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: a couple of verbosity switches added to help with the
 identification of a problem. This has now been resolved. This patch
 should be removed in one fo the next versions.
Auuthor: Steffen Moeller <moeller@debian.org>
Index: python-seqcluster/seqcluster/create_report.py
===================================================================
--- python-seqcluster.orig/seqcluster/create_report.py
+++ python-seqcluster/seqcluster/create_report.py
@@ -30,6 +30,6 @@ def report(args):
     logger.info("Creating profile (%s)" % profilesDir)
     data = make_profile(data, profilesDir, args)
     logger.info("Creating database")
-    make_database(data, "seqcluster.db", args.out)
+    make_database(data, "seqcluster.db", args.out, True)
 
     logger.info("Done. Download https://github.com/lpantano/seqclusterViz/archive/master.zip to browse the output.")
Index: python-seqcluster/seqcluster/db/__init__.py
===================================================================
--- python-seqcluster.orig/seqcluster/db/__init__.py
+++ python-seqcluster/seqcluster/db/__init__.py
@@ -107,9 +107,21 @@ def _close(con):
     if con:
         con.close()
 
-def make_database(data, name="seqcluster.db", out_dir="database"):
+def make_database(data, name="seqcluster.db", out_dir="database", verbose=False):
     out_dir = safe_dirs(out_dir)
     op.abspath(out_dir)
+
+    if verbose:
+        logger.info("make_database creates_db at %s" %  op.join(out_dir, name))
+
     con = _create_db(op.join(out_dir, name))
+
+    if verbose:
+        logger.info("make_database inserts data")
+
     _insert_data(con, data)
+
+    if verbose:
+        logger.info("make_database closes connection")
+
     _close(con)