-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
29 lines (20 loc) · 909 Bytes
/
run.py
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
"""
Show an animation of the Huntington–Hill apportionment method.
usage: python3.8 run.py [-h] -f FILE [-d]
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Path to CSV state population data
-d, --debug Show the plot instead of writing to file
"""
from source import bar_chart
from argparse import ArgumentParser
if __name__ == "__main__":
parser: ArgumentParser = ArgumentParser(
prog="python3.8 run.py",
description="Show an animation of the Huntington–Hill apportionment method")
parser.add_argument("-f", "--file", required=True,
help="Path to CSV state population data")
parser.add_argument("-d", "--debug", action="store_true",
help="Show the plot instead of writing to file")
args = parser.parse_args()
bar_chart.main(args.file, args.debug)