Skip to content

Commit

Permalink
relocate and docstring a CL ver; refs #21
Browse files Browse the repository at this point in the history
  • Loading branch information
ajschumacher committed Jul 4, 2015
1 parent 33f5aef commit 5210da9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mergic/mergic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def check(partition):
return len(all_items)


def check_(args):
"""Check a partition loaded from a file at the command line"""
data = json.loads(args.partition.read())
n = check(data)
print "{} items in {} groups".format(n, len(data))


def link_items(group_of, links):
"""Put items that are linked into the same group.
Expand All @@ -72,12 +79,6 @@ def link_items(group_of, links):
group_of[thing] = union


def check_(args):
data = json.loads(args.partition.read())
n = check(data)
print "{} items in {} groups".format(n, len(data))


def diff_(args):
data1 = json.loads(args.first.read())
check(data1)
Expand Down

0 comments on commit 5210da9

Please sign in to comment.