Skip to content

Commit

Permalink
docstrings everywhere; closes #21
Browse files Browse the repository at this point in the history
Will have to keep docstrings up through continuing work, but now at
least everything has one! 👏
  • Loading branch information
ajschumacher committed Jul 5, 2015
1 parent 0d04b0a commit 87a041b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mergic/mergic.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def apply_diff_(args):


def table_(args):
"""Print out a two-column 'merge table' at the command line."""
data = json.loads(args.partition.read())
check(data)
writer = csv.writer(sys.stdout)
Expand All @@ -239,6 +240,7 @@ def table_(args):


def _calc_(self, args):
"""Calculate possible groupings and print out a summary."""
try:
with open('.mergic_cache', 'rb') as f:
cache = pickle.load(f)
Expand Down Expand Up @@ -280,6 +282,7 @@ def _calc_(self, args):


def _make_(self, args):
"""Generate and print out a partition at a cutoff."""
if self.links_at is None:
self.calc(args)
links_at = self.links_at
Expand All @@ -296,6 +299,7 @@ def _make_(self, args):


def _script(self):
"""Parse command-line arguments and expose functionality."""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='command')

Expand Down Expand Up @@ -385,6 +389,7 @@ def __init__(self, distance='stock', key_method='longest'):


def script():
"""Run a default mergic Blender at the command line."""
blender = Blender()
blender.script()

Expand Down

0 comments on commit 87a041b

Please sign in to comment.