[geneagrapher] 143/226: Renaming Geneagrapher methods to follow conventions.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Jul 11 17:10:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository geneagrapher.

commit cf5e00483e3f598cb801ab54bd53b06c8dcdf3e0
Author: David Alber <alber.david at gmail.com>
Date:   Sat Oct 29 17:14:10 2011 -0700

    Renaming Geneagrapher methods to follow conventions.
---
 geneagrapher/geneagrapher.py | 12 ++++++------
 geneagrapher/ggrapher.py     |  6 +++---
 tests/tests.py               | 12 ++++++------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/geneagrapher/geneagrapher.py b/geneagrapher/geneagrapher.py
index bcfcf7c..667329c 100644
--- a/geneagrapher/geneagrapher.py
+++ b/geneagrapher/geneagrapher.py
@@ -16,7 +16,7 @@ class Geneagrapher:
         self.verbose = False
         self.write_filename = None
 
-    def parseInput(self):
+    def parse_input(self):
         """
         Parse command-line information.
         """
@@ -51,7 +51,7 @@ class Geneagrapher:
         for arg in args:
             self.leaf_ids.append(int(arg))
         
-    def buildGraph(self):
+    def build_graph(self):
         """
         Populate the graph member by grabbing the mathematician
         pages and extracting relevant data.
@@ -113,7 +113,7 @@ class Geneagrapher:
                     self.graph.addNode(name, institution, year, id, advisors, descendants)
                     descendant_grab_queue += descendants
                     
-    def generateDotFile(self):
+    def generate_dot_file(self):
         dotfile = self.graph.generateDotFile(self.get_ancestors, self.get_descendants)
         if self.write_filename is not None:
             outfile = open(self.write_filename, "w")
@@ -125,9 +125,9 @@ class Geneagrapher:
 if __name__ == "__main__":
     geneagrapher = Geneagrapher()
     try:
-        geneagrapher.parseInput()
+        geneagrapher.parse_input()
     except SyntaxError, e:
         print geneagrapher.parser.get_usage()
         print e
-    geneagrapher.buildGraph()
-    geneagrapher.generateDotFile()
+    geneagrapher.build_graph()
+    geneagrapher.generate_dot_file()
diff --git a/geneagrapher/ggrapher.py b/geneagrapher/ggrapher.py
index a059270..bb17024 100644
--- a/geneagrapher/ggrapher.py
+++ b/geneagrapher/ggrapher.py
@@ -5,9 +5,9 @@ def ggrapher():
     the ggrapher script is run."""
     ggrapher = geneagrapher.Geneagrapher()
     try:
-        ggrapher.parseInput()
+        ggrapher.parse_input()
     except SyntaxError, e:
         print ggrapher.parser.get_usage()
         print e
-    ggrapher.buildGraph()
-    ggrapher.generateDotFile()
+    ggrapher.build_graph()
+    ggrapher.generate_dot_file()
diff --git a/tests/tests.py b/tests/tests.py
index 3543bfc..d061c76 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -414,17 +414,17 @@ class TestGeneagrapherMethods(unittest.TestCase):
         self.assertEquals(self.ggrapher.write_filename, None)
         
     def test002_parse_empty(self):
-        # Test parseInput() with no arguments.
+        # Test parse_input() with no arguments.
         sys.argv = ['geneagrapher']
-        self.assertRaises(SyntaxError, self.ggrapher.parseInput)
+        self.assertRaises(SyntaxError, self.ggrapher.parse_input)
         
     def test003_parse_default(self):
-        # Test parseInput() with no options.
+        # Test parse_input() with no options.
         sys.argv = ['geneagrapher', '3']
         self.ggrapher.get_ancestors = False
         self.ggrapher.get_descendents = True
         self.ggrapher.write_filename = "filler"
-        self.ggrapher.parseInput()
+        self.ggrapher.parse_input()
         self.assertEquals(self.ggrapher.get_ancestors, False)
         self.assertEquals(self.ggrapher.get_descendants, False)
         self.assertEquals(self.ggrapher.verbose, False)
@@ -432,9 +432,9 @@ class TestGeneagrapherMethods(unittest.TestCase):
         self.assertEquals(self.ggrapher.leaf_ids, [3])
 
     def test004_parse_options(self):
-        # Test parseInput() with options.
+        # Test parse_input() with options.
         sys.argv = ['geneagrapher', '--with-ancestors', '--with-descendants', '--file=filler', '--verbose', '3', '43']
-        self.ggrapher.parseInput()
+        self.ggrapher.parse_input()
         self.assertEquals(self.ggrapher.get_ancestors, True)
         self.assertEquals(self.ggrapher.get_descendants, True)
         self.assertEquals(self.ggrapher.verbose, True)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/geneagrapher.git



More information about the debian-science-commits mailing list