Improved plotting for angular.

This commit is contained in:
Michael Herzberg 2019-01-16 19:24:03 +00:00
parent 3f43a02d9d
commit 829f3214b3
5 changed files with 5897 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,200 @@
1.7.5,2018-10-04 14:59:37 +0100
1.7.4,2018-09-07 09:57:37 +0100
1.7.3,2018-08-03 13:35:40 +0200
1.7.2,2018-06-12 16:34:38 +0300
1.7.1,2018-06-08 16:26:22 +0300
1.7.0,2018-05-11 10:31:53 +0200
1.7.0-rc.0,2018-04-19 10:07:41 +0200
1.6.10,2018-04-17 18:35:33 +0200
1.6.9,2018-02-02 11:19:32 +0100
1.6.8,2017-12-18 15:17:56 +0100
1.6.7,2017-11-24 18:44:04 +0100
1.6.6,2017-08-18 15:12:44 +0200
1.6.5,2017-07-03 22:34:52 +0300
1.6.4,2017-03-31 10:48:25 +0200
1.6.3,2017-03-08 12:44:24 +0100
1.6.2,2017-02-05 17:58:25 +0200
1.6.1,2016-12-23 10:38:58 +0000
1.6.0,2016-12-08 11:07:52 +0000
1.6.0-rc.2,2016-11-24 21:30:56 +0000
1.6.0-rc.1,2016-11-21 13:27:47 +0000
1.6.0-rc.0,2016-10-27 20:28:09 +0100
1.5.11,2017-01-12 11:22:40 +0200
1.5.10,2016-12-16 12:27:04 +0200
1.5.9,2016-11-24 09:27:57 +0000
1.5.8,2016-07-22 16:01:46 +0100
1.5.7,2016-06-14 08:08:25 -0700
1.5.6,2016-05-25 17:00:13 +0100
1.5.5,2016-04-15 14:09:39 +0100
1.5.4,2016-04-14 09:13:48 +0100
1.5.3,2016-03-25 20:01:45 +0000
1.5.2,2016-03-18 15:37:43 -0700
1.5.1,2016-03-14 14:45:29 +0000
1.5.0,2016-02-05 10:04:17 +0000
1.5.0-rc.2,2016-01-28 09:51:01 +0000
1.5.0-rc.1,2016-01-15 20:31:08 +0000
1.5.0-rc.0,2015-12-09 13:50:58 +0000
1.5.0-beta.2,2015-11-17 15:57:27 -0800
1.5.0-beta.1,2015-09-29 13:59:34 -0700
1.5.0-beta.0,2015-09-17 13:42:10 +0100
1.4.14,2016-10-11 14:11:08 +0100
1.4.13,2016-10-10 22:02:52 +0100
1.4.12,2016-06-07 10:44:56 +0200
1.4.11,2016-05-24 16:44:11 +0200
1.4.10,2016-03-14 17:27:49 -0400
1.4.9,2016-01-20 10:11:04 -0800
1.4.8,2015-11-19 14:52:56 -0800
1.4.7,2015-09-29 13:54:51 -0700
1.4.6,2015-09-14 22:43:55 +0200
1.4.5,2015-08-28 12:06:35 -0700
1.4.4,2015-08-13 11:15:10 -0700
1.4.3,2015-07-14 18:26:10 -0700
1.4.2,2015-07-02 14:36:49 +0300
1.4.1,2015-06-15 20:50:59 +0200
1.4.0,2015-05-26 17:34:50 -0700
1.4.0-rc.2,2015-05-07 14:33:28 -0700
1.4.0-rc.1,2015-04-24 11:26:10 -0700
1.4.0-rc.0,2015-04-10 10:44:35 -0700
1.4.0-beta.6,2015-03-15 21:00:39 +0000
1.4.0-beta.5,2015-02-24 17:22:13 +0000
1.4.0-beta.4,2015-02-07 10:26:21 +0000
1.4.0-beta.3,2015-02-03 19:46:22 +0100
1.4.0-beta.2,2015-01-26 14:50:48 -0800
1.4.0-beta.1,2015-01-20 19:42:59 +0100
1.4.0-beta.0,2015-01-14 20:44:32 +0000
1.2.32,2016-10-11 13:48:38 +0100
1.2.31,2016-10-11 07:48:26 +0100
1.2.30,2016-07-20 23:17:37 +0300
1.2.29,2015-09-29 13:18:52 -0700
1.2.28,2014-12-13 21:28:02 -0500
1.2.27,2014-11-20 14:34:26 -0800
1.2.26,2014-10-02 09:46:40 -0700
1.2.25,2014-09-16 15:05:22 -0700
1.2.24,2014-09-09 16:21:16 -0700
1.2.23,2014-08-22 15:56:49 -0700
1.2.22,2014-08-11 17:04:40 +0100
1.2.21,2014-07-25 09:01:43 -0700
1.2.20,2014-07-11 11:26:39 -0700
1.2.19,2014-06-30 16:58:15 -0700
1.2.18,2014-06-13 13:55:33 -0700
1.2.17,2014-06-06 20:13:16 +0100
1.2.16,2014-04-03 14:42:19 -0700
1.2.15,2014-03-21 14:58:48 -0700
1.3.20,2015-09-29 13:54:03 -0700
1.3.19,2015-09-15 13:34:09 +0100
1.3.18,2015-08-18 15:14:56 -0700
1.3.17,2015-07-01 12:16:14 -0700
1.3.16,2015-06-05 13:29:27 -0700
1.3.15,2015-03-15 21:01:49 +0000
1.3.14,2015-02-24 17:22:45 +0000
1.3.13,2015-02-07 19:21:53 +0100
1.3.12,2015-02-02 14:03:17 +0000
1.3.11,2015-01-26 14:20:52 -0800
1.3.10,2015-01-20 19:31:56 +0100
1.3.9,2015-01-13 14:29:29 -0500
1.3.8,2014-12-19 13:22:00 -0800
1.3.7,2014-12-15 13:46:21 +0000
1.3.6,2014-12-08 16:29:39 -0500
1.3.5,2014-12-01 19:54:14 +0100
1.3.4,2014-11-25 00:05:18 +0100
1.3.3,2014-11-17 09:32:21 -0800
1.3.2,2014-11-07 13:22:01 -0500
1.3.1,2014-10-31 12:28:58 -0400
1.3.0,2014-10-13 15:27:20 -0700
1.3.0-rc.5,2014-10-08 15:51:30 -0700
1.3.0-rc.4,2014-10-01 17:37:40 -0700
1.3.0-rc.3,2014-09-23 18:47:24 -0700
1.3.0-rc.2,2014-09-16 14:52:25 -0700
1.3.0-rc.1,2014-09-09 15:45:51 -0700
1.3.0-rc.0,2014-08-29 21:22:46 -0400
1.3.0-beta.19,2014-08-22 15:57:26 -0700
1.3.0-beta.18,2014-08-11 16:54:40 +0100
1.3.0-beta.17,2014-07-25 16:37:53 +0100
1.3.0-beta.16,2014-07-18 12:18:26 -0700
1.3.0-beta.15,2014-07-11 11:15:42 -0700
1.3.0-beta.14,2014-06-30 09:52:32 -0700
1.3.0-beta.13,2014-06-16 10:47:09 -0700
1.3.0-beta.12,2014-06-13 13:41:18 -0700
1.3.0-beta.11,2014-06-06 20:22:50 +0100
1.3.0-beta.10,2014-05-23 15:08:36 -0700
1.3.0-beta.9,2014-05-16 15:14:12 -0700
1.3.0-beta.8,2014-05-09 14:42:26 +0100
1.3.0-beta.7,2014-04-25 15:00:17 -0700
1.3.0-beta.6,2014-04-21 15:57:08 -0700
1.3.0-beta.5,2014-04-03 14:46:15 -0700
1.3.0-beta.4,2014-03-28 17:43:17 -0400
1.3.0-beta.3,2014-03-21 11:16:35 -0700
1.3.0-beta.2,2014-03-14 16:26:40 -0700
1.3.0-beta.1,2014-03-07 16:23:14 -0800
1.2.14,2014-03-01 09:51:19 -0800
1.2.13,2014-02-14 16:41:02 -0800
1.2.12,2014-02-07 17:00:28 -0500
1.2.11,2014-02-03 09:40:03 -0800
1.2.10,2014-01-24 15:28:28 -0800
1.2.9,2014-01-15 10:02:10 -0800
1.2.8,2014-01-10 12:37:49 -0800
1.2.7,2014-01-03 10:28:30 -0800
1.2.6,2013-12-19 15:50:07 -0800
1.2.5,2013-12-13 10:52:13 -0800
1.2.4,2013-12-06 13:14:56 -0500
1.2.3,2013-11-27 10:04:59 +0000
1.2.2,2013-11-22 09:05:42 -0800
1.2.1,2013-11-14 22:33:20 -0800
1.2.0,2013-11-08 09:40:09 -0800
1.2.0-rc.3,2013-10-14 10:36:23 -0700
1.2.0-rc.2,2013-09-04 14:50:39 +0200
1.2.0rc1,2013-08-13 11:50:32 -0700
1.1.5,2013-05-22 01:05:11 -0700
1.1.4,2013-04-03 18:54:52 -0700
1.1.3,2013-02-20 12:54:44 -0800
1.1.2,2013-01-23 10:54:35 -0800
1.1.1,2012-11-27 01:45:35 +0100
1.1.0,2012-09-04 11:11:09 -0700
1.0.8,2013-08-22 11:20:23 -0700
1.0.7,2013-05-22 01:05:53 -0700
1.0.6,2013-04-04 10:48:05 -0700
1.0.5,2013-02-20 12:58:02 -0800
1.0.4,2013-01-23 10:57:51 -0800
1.0.3,2012-11-27 01:44:46 +0100
1.0.2,2012-09-04 11:08:40 -0700
1.0.1,2012-06-25 09:30:57 -0700
1.0.0,2012-06-14 10:50:22 -0700
1.0.0rc12,2012-06-12 01:46:02 -0700
1.0.0rc11,2012-06-11 00:03:01 -0700
1.0.0rc10,2012-05-23 21:05:21 -0700
1.0.0rc9,2012-05-14 22:13:15 -0700
1.0.0rc8,2012-05-07 00:09:20 -0700
1.0.0rc7,2012-04-30 16:32:45 -0700
1.0.0rc6,2012-04-20 15:06:39 -0700
1.0.0rc5,2012-04-12 03:56:28 -0700
1.0.0rc4,2012-04-05 11:46:36 -0700
1.0.0rc3,2012-03-29 16:10:40 -0700
1.0.0rc2,2012-03-20 15:38:57 -0700
g3-v1.0.0rc1,2012-03-16 12:06:29 -0700
1.0.0rc1,2012-03-14 01:00:46 -0700
0.10.6,2012-01-17 13:54:18 -0800
0.10.5,2011-11-08 04:29:07 -0800
0.10.4,2011-10-22 21:39:39 -0700
0.10.3,2011-10-14 08:31:39 -0700
0.10.2,2011-10-08 09:18:19 -0700
0.10.1,2011-09-09 01:01:46 -0700
0.10.0,2011-09-02 11:32:29 -0700
0.9.19,2011-08-21 01:12:34 -0700
0.9.18,2011-07-29 16:30:24 -0700
0.9.17,2011-06-30 09:10:59 -0700
0.9.16,2011-06-07 16:11:01 -0700
0.9.15,2011-04-11 14:23:26 -0700
0.9.14,2011-04-01 12:26:04 -0700
0.9.13,2011-03-13 22:48:26 -0700
0.9.12,2011-03-03 23:14:43 -0800
0.9.11,2011-02-08 17:47:31 -0800
0.9.10,2011-01-26 23:51:06 -0800
0.9.9,2011-01-13 22:08:27 -0800
0.9.7,2010-12-10 17:08:52 -0800
0.9.6,2010-12-06 21:11:10 -0800
0.9.5,2010-11-25 10:11:26 -0800
0.9.4,2010-11-18 22:40:01 -0800
0.9.3,2010-11-10 22:15:16 -0800
0.9.2,2010-11-03 13:06:45 -0700
0.9.1,2010-10-26 22:18:25 -0700
0.9.0,2010-10-20 15:51:36 -0700

View File

@ -0,0 +1,8 @@
start with current version & never update
start with outdated version & never update
update frequently
downgrade
angular is transitive dep
own dep

View File

@ -0,0 +1,96 @@
import sys
import datetime
from dateutil import parser
from distutils.version import LooseVersion
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.patches as mpatches
def get_cmap(n, name='hsv'):
'''Returns a function that maps each index in 0, 1, ..., n-1 to a distinct
RGB color; the keyword argument name must be a standard mpl colormap name.'''
return plt.cm.get_cmap(name, n)
plt.figure(figsize=(20, 100))
data = {}
with open(sys.argv[1]) as f:
for line in f.readlines()[0:5000]:
line = line.strip()
extid, ts, vers = line.split(",")
if extid not in data:
data[extid] = {}
data[extid][parser.parse(ts).date()] = vers
startdate = datetime.date(year=2017, month=2, day=1)
enddate = datetime.date(year=2018, month=12, day=13)
NOT_IN_STORE = "NO DATA"
converted_data = {}
versions = set()
for extid, tups in data.items():
days_version_tups = [(0, NOT_IN_STORE)]
for ts, vers in sorted(tups.items()):
if vers != "None":
versions.add(vers)
#if vers != days_version_tups[-1][1]:
days_version_tups += [((ts - startdate).days, vers)]
converted_data[extid] = days_version_tups
converted_data["angular_updates"] = [(0, NOT_IN_STORE)]
version_release = {}
with open(sys.argv[2]) as f:
for line in f.readlines():
line = line.strip()
vers, ts_str = line.split(",")
ts = parser.parse(ts_str).date()
version_release[vers] = ts
if startdate < ts and ts < enddate:
converted_data["angular_updates"] += [((ts - startdate).days, vers)]
converted_data["angular_updates"].sort()
colors = {}
for i, version in enumerate(sorted(versions, key=version_release.get)):
#colors[version] = get_cmap(len(versions))(i)
colors[version] = plt.cm.jet(1. * i / ((len(versions)) - 1))
for version, color in colors.items():
print(f"{version}: {color}")
bottoms = np.arange(len(converted_data))
sorted_data = sorted(list(converted_data.items()), key=lambda x: min(map(lambda y: y[1], x[1])))
for i in range(len(converted_data.items())):
extid, tups = sorted_data[i]
for j in range(len(tups)):
days, vers = tups[j]
if j + 1 == len(tups):
next_days = (enddate - startdate).days
else:
next_days = tups[j + 1][0]
print(f"{extid}: {days}")
#print(f"{vers} and {colors[vers]}")
color = "w"
if vers in colors:
color = colors[vers]
plt.bar(days, 0.8, width=next_days - days, bottom=bottoms[i],
color=color, orientation="horizontal", label=vers, linewidth=1, edgecolor="black")
plt.yticks(bottoms, map(lambda x: x[0], sorted(list(converted_data.items()), key=lambda x: min(map(lambda y: y[1], x[1])))))
patchList = []
for version, color in sorted(colors.items(), key=lambda x: LooseVersion(x[0])):
data_key = mpatches.Patch(color=color, label=version)
patchList.append(data_key)
plt.legend(handles=patchList, loc="best", bbox_to_anchor=(1.0, 1.00))
plt.subplots_adjust(right=0.85)
plt.savefig("out.pdf")