Skip to content

Commit c145201

Browse files
committed
Fix -m all with the newer analyses
Signed-off-by: Vadim Markovtsev <[email protected]>
1 parent ef90cf1 commit c145201

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

Diff for: python/labours/labours.py

+20-4
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,11 @@ def show_sentiment_stats(args, name, resample, start_date, data):
13001300
overall_neg = sum(2 * (d[1].Value - 0.5) for d in data if d[1].Value > 0.5)
13011301
title = "%s sentiment +%.1f -%.1f δ=%.1f" % (
13021302
name, overall_pos, overall_neg, overall_pos - overall_neg)
1303-
deploy_plot(title, args.output, args.background)
1303+
if args.mode == "all" and args.output:
1304+
output = get_plot_path(args.output, "sentiment")
1305+
else:
1306+
output = args.output
1307+
deploy_plot(title, output, args.background)
13041308

13051309

13061310
def show_devs(args, name, start_date, end_date, people, days, max_people=50):
@@ -1397,7 +1401,11 @@ def show_devs(args, name, start_date, end_date, people, days, max_people=50):
13971401
axes[-1].set_facecolor((1.0,) * 3 + (0.0,))
13981402

13991403
title = ("%s commits" % name) if not args.output else ""
1400-
deploy_plot(title, args.output, args.background)
1404+
if args.mode == "all" and args.output:
1405+
output = get_plot_path(args.output, "time_series")
1406+
else:
1407+
output = args.output
1408+
deploy_plot(title, output, args.background)
14011409

14021410

14031411
def order_commits(chosen_people, days, people):
@@ -1518,7 +1526,11 @@ def show_devs_efforts(args, name, start_date, end_date, people, days, max_people
15181526
legend = pyplot.legend(loc=2, ncol=2, fontsize=args.font_size)
15191527
apply_plot_style(pyplot.gcf(), pyplot.gca(), legend, args.background,
15201528
args.font_size, args.size or "16,10")
1521-
deploy_plot("Efforts through time (changed lines of code)", args.output, args.background)
1529+
if args.mode == "all" and args.output:
1530+
output = get_plot_path(args.output, "efforts")
1531+
else:
1532+
output = args.output
1533+
deploy_plot("Efforts through time (changed lines of code)", output, args.background)
15221534

15231535

15241536
def show_old_vs_new(args, name, start_date, end_date, people, days):
@@ -1545,7 +1557,11 @@ def show_old_vs_new(args, name, start_date, end_date, people, days):
15451557
pyplot.legend(loc=2, fontsize=args.font_size)
15461558
for tick in chain(pyplot.gca().xaxis.get_major_ticks(), pyplot.gca().yaxis.get_major_ticks()):
15471559
tick.label.set_fontsize(args.font_size)
1548-
deploy_plot("Additions vs changes", args.output, args.background)
1560+
if args.mode == "all" and args.output:
1561+
output = get_plot_path(args.output, "old_vs_new")
1562+
else:
1563+
output = args.output
1564+
deploy_plot("Additions vs changes", output, args.background)
15491565

15501566

15511567
def show_languages(args, name, start_date, end_date, people, days):

Diff for: python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
description="Python companion for github.com/src-d/hercules to visualize the results.",
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",
18-
version="10.4.1",
18+
version="10.4.2",
1919
license="Apache-2.0",
2020
author="source{d}",
2121
author_email="[email protected]",

0 commit comments

Comments
 (0)