-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate.py
More file actions
31 lines (24 loc) · 748 Bytes
/
generate.py
File metadata and controls
31 lines (24 loc) · 748 Bytes
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
from svg_wheel import generate_svg_wheel
from utils import (
PLATFORMS,
annotate_wheels,
get_top_packages,
save_to_file,
)
TO_CHART = 360
def main(to_chart: int = TO_CHART) -> None:
packages = get_top_packages()
packages = annotate_wheels(packages, to_chart)
save_to_file(packages, "results.json")
for platform in PLATFORMS:
generate_svg_wheel(packages, to_chart, platform)
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument(
"-n", "--number", type=int, default=TO_CHART, help="number of packages to chart"
)
args = parser.parse_args()
main(args.number)