mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
Adding roadmap for 2.7
This commit is contained in:
parent
06bcd3cc4e
commit
16ebf8db42
3 changed files with 49 additions and 34 deletions
|
@ -3,6 +3,7 @@
|
||||||
import json
|
import json
|
||||||
import BeautifulSoup
|
import BeautifulSoup
|
||||||
|
|
||||||
|
roadmaps = { "2.6.x": 11, "2.7.x": 13 }
|
||||||
|
|
||||||
status_filters = {
|
status_filters = {
|
||||||
"all": None,
|
"all": None,
|
||||||
|
@ -14,10 +15,12 @@ status_filters = {
|
||||||
|
|
||||||
def parse_issues():
|
def parse_issues():
|
||||||
|
|
||||||
soup = BeautifulSoup.BeautifulSoup(open("data/raw_roadmapissues.xml").read())
|
|
||||||
|
|
||||||
issues = []
|
issues = []
|
||||||
|
|
||||||
|
for roadmap in sorted(roadmaps.keys()):
|
||||||
|
|
||||||
|
soup = BeautifulSoup.BeautifulSoup(open("data/raw_"+roadmap+"_issues.xml").read())
|
||||||
|
|
||||||
for issue in soup.issues:
|
for issue in soup.issues:
|
||||||
cleaned_issue = {}
|
cleaned_issue = {}
|
||||||
cleaned_issue["id"] = issue.id.text
|
cleaned_issue["id"] = issue.id.text
|
||||||
|
@ -25,6 +28,7 @@ def parse_issues():
|
||||||
cleaned_issue["status"] = issue.status["name"]
|
cleaned_issue["status"] = issue.status["name"]
|
||||||
cleaned_issue["type"] = issue.tracker["name"]
|
cleaned_issue["type"] = issue.tracker["name"]
|
||||||
cleaned_issue["subject"] = issue.subject.text
|
cleaned_issue["subject"] = issue.subject.text
|
||||||
|
cleaned_issue["roadmap"] = roadmap
|
||||||
cleaned_issue["p"] = priority(cleaned_issue)
|
cleaned_issue["p"] = priority(cleaned_issue)
|
||||||
|
|
||||||
issues.append(cleaned_issue)
|
issues.append(cleaned_issue)
|
||||||
|
@ -34,9 +38,10 @@ def parse_issues():
|
||||||
return issues
|
return issues
|
||||||
|
|
||||||
|
|
||||||
def filtered_issues(issues, status_filter=None, type_filter=None):
|
def filtered_issues(issues, roadmap, status_filter=None, type_filter=None):
|
||||||
|
|
||||||
|
issues_filtered = [ issue for issue in issues if issue["roadmap"] == roadmap ]
|
||||||
|
|
||||||
issues_filtered = issues
|
|
||||||
if status_filter != None:
|
if status_filter != None:
|
||||||
issues_filtered = [ issue for issue in issues_filtered if issue["status"] in status_filter]
|
issues_filtered = [ issue for issue in issues_filtered if issue["status"] in status_filter]
|
||||||
|
|
||||||
|
@ -69,7 +74,7 @@ def priority(issue):
|
||||||
elif (issue["status"]):
|
elif (issue["status"]):
|
||||||
p += 10
|
p += 10
|
||||||
|
|
||||||
|
p -= sorted(roadmaps.keys()).index(issue["roadmap"]) / 10
|
||||||
|
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
@ -78,20 +83,25 @@ def main():
|
||||||
# Parse issues...
|
# Parse issues...
|
||||||
issues = parse_issues()
|
issues = parse_issues()
|
||||||
|
|
||||||
|
|
||||||
# Build summary
|
# Build summary
|
||||||
summary = {}
|
summary = {}
|
||||||
|
for roadmap in roadmaps:
|
||||||
|
summary[roadmap] = {}
|
||||||
|
|
||||||
# First add issues by status
|
# First add issues by status
|
||||||
|
for roadmap in roadmaps:
|
||||||
for status_name, status_filter in status_filters.items():
|
for status_name, status_filter in status_filters.items():
|
||||||
summary[status_name] = filtered_issues(issues, status_filter)
|
summary[roadmap][status_name] = filtered_issues(issues, roadmap, status_filter)
|
||||||
|
|
||||||
|
print summary
|
||||||
|
|
||||||
# The compute percent
|
# The compute percent
|
||||||
|
for roadmap in roadmaps:
|
||||||
for status_name, status_filter in status_filters.items():
|
for status_name, status_filter in status_filters.items():
|
||||||
if (status_name != "all"):
|
if (status_name != "all"):
|
||||||
n = summary[status_name]
|
n = summary[roadmap][status_name]
|
||||||
p = float("{0:.1f}".format(100 * n / summary["all"]))
|
p = float("{0:.1f}".format(100 * n / summary[roadmap]["all"]))
|
||||||
summary[status_name] = (n,p)
|
summary[roadmap][status_name] = (n,p)
|
||||||
|
|
||||||
# (Meh)
|
# (Meh)
|
||||||
summary = { "summary": summary }
|
summary = { "summary": summary }
|
||||||
|
|
|
@ -3,12 +3,15 @@
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
roadmaps = { "2.6.x": 11, "2.7.x": 13 }
|
||||||
|
|
||||||
def get_roadmapissues():
|
def get_roadmapissues():
|
||||||
|
|
||||||
roadmapissues = requests.get("https://dev.yunohost.org/issues.xml?fixed_version_id=11&status_id=*&limit=100", verify=False)
|
for roadmap, id in roadmaps.items():
|
||||||
|
|
||||||
|
issues = requests.get("https://dev.yunohost.org/issues.xml?fixed_version_id="+str(id)+"&status_id=*&limit=100", verify=False)
|
||||||
|
|
||||||
with open("data/raw_roadmapissues.xml", "w") as f:
|
with open("data/raw_"+roadmap+"_issues.xml", "w") as f:
|
||||||
f.write(roadmapissues.text)
|
f.write(issues.text)
|
||||||
|
|
||||||
get_roadmapissues()
|
get_roadmapissues()
|
||||||
|
|
|
@ -56,28 +56,30 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>2.6.x</h3>
|
{% for roadmap, summary in data.summary.items() %}
|
||||||
|
<h3>{{ roadmap }}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-offset-1 col-md-10">
|
<div class="col-md-offset-1 col-md-10">
|
||||||
|
|
||||||
<div class="issue-legend">All ({{data.summary.all}} issues) </div>
|
<div class="issue-legend">All ({{summary.all}} issues) </div>
|
||||||
<div class="bs-component">
|
<div class="bs-component">
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar progress-bar-success" style="width:
|
<div class="progress-bar progress-bar-success" style="width:
|
||||||
{{data.summary.done[1]}}%">{{data.summary.done[0]}} done</div>
|
{{summary.done[1]}}%">{{summary.done[0]}} done</div>
|
||||||
<div class="progress-bar progress-bar-warning" style="width:
|
<div class="progress-bar progress-bar-warning" style="width:
|
||||||
{{data.summary.ongoing[1]}}%">{{data.summary.ongoing[0]}}
|
{{summary.ongoing[1]}}%">{{summary.ongoing[0]}}
|
||||||
ongoing</div>
|
ongoing</div>
|
||||||
<div class="progress-bar progress-bar-none" style="width:
|
<div class="progress-bar progress-bar-none" style="width:
|
||||||
{{data.summary.new[1]}}%">{{data.summary.new[0]}} new</div>
|
{{summary.new[1]}}%">{{summary.new[0]}} new</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue