Create a tinyDB populated with Repo data


In [ ]:
import os
from tinydb import TinyDB
import pandas as pd
import time
from DashPykpi.kpistats import KpiStats, GitURLs, GraphKPIs

In [ ]:
# Use a list of URLS fetched from the GitURLs class
url_fetch = GitURLs()
urls = url_fetch.urls
print("Retrieved {0} urls.".format(len(urls)))

In [ ]:
# These projects don't exist anymore and break get_repo_stats
urls.remove('https://github.com/UCL/ucl')
urls.remove('https://github.com/UCL-RITS/ucl-rits')

In [ ]:
# Run the code to generate a dababase if needed...
test = KpiStats(urls=urls)
test.work(verbose=False, debug=False, status=True)

Plotting area


In [ ]:
from bokeh.charts import show, output_notebook
output_notebook()

In [ ]:
bk = GraphKPIs()
show(bk.weekly_activity(per_repo=False, verbose=True, bin=4))

In [ ]: