diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2021-04-21 11:41:09 +0100 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2021-04-21 11:41:09 +0100 |
commit | 3a959e21856452d3c4654f707a706f196494f961 (patch) | |
tree | e14d98fc0c05e6e18a2b42f50504eb41efe671c1 | |
parent | ed0b928764ba1cf2b4658d689d9595315dcf3815 (diff) |
Atlassian -> Mavenlink.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rwxr-xr-x | bin/sse-auto-report | 666 |
1 files changed, 467 insertions, 199 deletions
diff --git a/bin/sse-auto-report b/bin/sse-auto-report index 6add2d6..69ac8ec 100755 --- a/bin/sse-auto-report +++ b/bin/sse-auto-report @@ -6,6 +6,10 @@ # (Almost) fully automatic monthly report generator # +# Don't rumble on if a tool fails +set -e +set -x + # # General prep # @@ -28,6 +32,7 @@ then full_year_since=`date -d"-$(($day - 1)) days -1 year 00:00:00" +"%Y-%m-%d %H:%M:%S"` double_year_since=`date -d"-$(($day - 1)) days -2 year 00:00:00" +"%Y-%m-%d %H:%M:%S"` + title="Quarterly" tag="quarterly" quantum="quarter" else # monthly @@ -36,11 +41,12 @@ else # monthly until=`date -d"-$day days 23:59:59" +"%Y-%m-%d %H:%M:%S"` full_year_since=`date -d"-$(($day - 1)) days -1 year 00:00:00" +"%Y-%m-%d %H:%M:%S"` double_year_since=`date -d"-$(($day - 1)) days -2 year 00:00:00" +"%Y-%m-%d %H:%M:%S"` + title="Monthly" tag="monthly" quantum="month" fi -echo "Generating report from $since until $until" +echo "Generating report from $since until $until ($full_year_since, $double_year_since)" echo if [ -z $SSE_DATA_DIR ] @@ -60,260 +66,523 @@ cd $SSE_DATA_DIR # Generate the monthly report template and the "solutions" graphs # -printf "Grabbing JIRA monthly activity ..." -[ -e tmp/jira-activity.json ] || \ - glance fetch --since "$full_year_since" > tmp/jira-activity.json -printf " done\n" - -printf "Generating JIRA activity graphs ." - -glance chart --card-tracker fig-1.1-card_tracker.png \ - --since "$full_year_since" --until "$until" tmp/jira-activity.json -printf "." - -glance filter tmp/jira-activity.json \ - --worklog-since "$full_year_since" --worklog-until "$until" --no-worklog | \ -glance chart \ - --barchart \ - --effort-by-member fig-1.4-effort_by_month_and_member.png \ - --effort-by-component fig-1.7-effort_by_month_and_category.png -printf "." +maventool filter \ + --people 'Daniel Thompson,Leo Yan,Loic Poulain,Sumit Garg' \ + ../../all_time_entries.csv \ +| maventool scale \ + --from 'time in hours' \ + --to 'time in days' \ + --factor 1/8 \ + > sse_time_entries.json -glance filter tmp/jira-activity.json \ - --worklog-since "$since" --worklog-until "$until" --no-worklog | \ -glance chart \ - --piechart \ - --count-by-member fig-1.2-cards_per_member.png \ - --effort-by-member fig-1.5-effort_per_member.png \ - --effort-by-component fig-1.8-effort_by_category.png -printf "." - -glance filter tmp/jira-activity.json \ - --worklog-since "$full_year_since" --worklog-until "$until" --no-worklog | \ -glance chart \ - --piechart \ - --count-by-member fig-1.3-cards_per_member-full_year.png \ - --effort-by-member fig-1.6-effort_per_member-full_year.png \ - --effort-by-component fig-1.9-effort_by_category-full_year.png -printf "." +# +# Bring everything together as a HTML document +# -printf " done\n" +cat > ${tag}_report.html <<EOF +<html> +<head> +<title>SSE $title Report `date -d "$until" +"%Y.%m"`</title> +</head> +<body> -printf "Generating JIRA activity report ..." -glance filter --worklog-since "$since" --worklog-until "$until" \ - --no-worklog tmp/jira-activity.json | \ -glance monthly > tmp/monthly.html -sed -i -e '/^<\/*html>$/d' -e '/^<\/*head>$/d' -e '/^<title>/d' -e '/^<\/*body>/d' tmp/monthly.html -printf " done\n" +<p> +Google Docs conversion checklist: +<p> -# -# Grab LDTS data for this month -# +<ul> +<li>Convert the Title from "Heading 1" to "Title" +<li>Replace links above with a real TOC</li> +<li>Select any item of regular text and "Add space after paragraph" and "Update Normal Text to match"</li> +<li>Visit every table and remove the space after every paragraph again (sigh)</li> +<li>Update the CALCULATED MANUALLY fields.</li> +</ul> -printf "Grabbing LDTS monthly activity ..." -[ -e tmp/ldtstool-pull.empty ] || \ - ldtstool pull > tmp/ldtstool-pull.empty -printf " done\n" +<h1>Summary</h1> -printf "Generating LDTS activity graphs ." +<p> +This report is 100% auto-generated and does not have an executive summary. +</p> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$double_year_since" --until "$until" | \ -ldtstool chart --output "fig-2.1-ldts-by_month_by_member.png" -printf "." +<h1>Dashboard</h1> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$since" --until "$until" | \ -ldtstool piechart --by-member --output "fig-2.2-ldts-by_member.png" -printf "." +<p>Support and Solutions Engineering is a multi-functional team that +contributes to a wide variety of activity both for members and for members and +for Developer Services customers.</p> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$double_year_since" --until "$until" | \ -ldtstool piechart --by-member --output "fig-2.3-ldts-by_member-full_year.png" -printf "." +<p>The dashboard provides an at-a-glance summary of the allocation between +major activities by the team. Figures 1 and 2 shows the effort applied across +the team this quarter in all areas of the business. Figure 2 is complimented by +a diagram that summarized the last 12 months as a comparison. The legend in +figure 1 applies to all three figures. The total effort is graphed in man/days +and, as expected, the totals approximately match the headcount of the team.</p> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$double_year_since" --until "$until" | \ -ldtstool chart --by-category --output "fig-2.4-ldts-by_month_by_category.png" -printf "." +<p><table border="0"> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --barchart \ + --effort-by-category fig-1-effort_by_month_and_category.png) + <img src="fig-1-effort_by_month_and_category.png"> + </td> + </tr> + <tr> + <td><strong>Figure 1</strong>: Effort summary organised by month and cateogry</td> + </tr> +</table></p> +<p><table border="0"> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$since" --until "$until" \ + --piechart \ + --effort-by-category fig-2-effort_by_category.png) + <img src="fig-2-effort_by_category.png"> + </td> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --piechart \ + --effort-by-category fig-3-effort_by_category-full_year.png) + <img src="fig-3-effort_by_category-full_year.png"> + </td> + </tr> + <tr> + <td><strong>Figure 2</strong>: Allocations this $quantum</td> + <td><strong>Figure 3</strong>: Allocations over the last 12 months</td> + </tr> +</table></p> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$since" --until "$until" | \ -ldtstool piechart --by-category --output "fig-2.5-ldts-by_category.png" -printf "." +<p>It is currently difficult to allocate team effort recorded against +Internal Projects to specific team responsibilities. Therefore it is +so it is fortunate that it only consumed +$(maventool collate sse_time_entries.json \ + --since "$since" --until "$until" \ + --field 'category' --percent \ +| maventool count \ + --category 'Internal' --field 'time in hours percent' --format '{:.1f}%') +of the effort this $quantum.</p> + +<p>Currently the Internal Projects include team overhead (meetings, upstream +maintenance) together with business development-and-proposals and some R&D +activities (mostly the development of training materials). This is only a minor +problem when the overall effort in this area is low. To help better understand +how the Internal Projects are recorded the effort by SSE is broken down in +figures 4, 5 and 6.</p> + +<p><table border="0"> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --project Internal \ + --barchart \ + --effort-by-task fig-4-effort_by_month_and_task.png) + <img src="fig-4-effort_by_month_and_task.png"> + </td> + </tr> + <tr> + <td><strong>Figure 4</strong>: Internal Projects, broken down by month and category</td> + </tr> +</table></p> +<p><table border="0"> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$since" --until "$until" \ + --project Internal \ + --piechart \ + --effort-by-task fig-5-effort_by_task.png) + <img src="fig-5-effort_by_task.png"> + </td> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --project Internal \ + --piechart \ + --effort-by-task fig-6-effort_by_task-full_year.png) + <img src="fig-6-effort_by_task-full_year.png"> + </td> + </tr> + <tr> + <td><strong>Figure 5</strong>: Internal Projects, this $quantum</td> + <td><strong>Figure 6</strong>: Internal Projects, last 12 months</td> + </tr> +</table></p> -ldtstool dump | ldtstool filter --restrict created --member \ - --since "$double_year_since" --until "$until" | \ - ldtstool piechart --by-category --output "fig-2.6-ldts-by_category-full_year.png" -printf "." +<h1>Member activities</h1> -ldtstool dump | ldtstool filter --restrict created --community \ - --since "$double_year_since" --until "$until" | \ -ldtstool chart --by-category --output "fig-2.7-community-by_month_by_category.png" -printf "." +<p>Activities on behalf of members are tracked in the Support & Solutions +Project within Mavenlink and consist of LDTS and premium services activities +together with management overhead for the team.</p> -printf " done\n" +<p>The premium services activities include limited 96Boards forum support for +boards promoted by club/core members.</p> -printf "Generating LDTS activity report ..." -ldtstool dump | ldtstool filter --since "$since" --until "$until" | \ - ldtstool monthly > tmp/ldts.html -printf " done\n" +<p>Figures 4, 5 and 6 (below) zoom in on the effort applied across the team on +behalf of Linaro members. These topics include LDTS and 96Boards forum support +together with various premium services projects. Also included is management +overhead for the team. The total effort is graphed in man/days.</p> -# -# Slurp up posts by the team on the forum -# +<p><table> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --project 'Support & Solutions' \ + --barchart \ + --simplify 9 \ + --effort-by-task fig-7-effort_by_month_and_task.png) + <img src="fig-7-effort_by_month_and_task.png"> + </td> + </tr> + <tr> + <td><strong>Figure 7</strong>: Effort summary organised by month and task</td> + </tr> +</table></p> -# The output of pull --verbose is naturally compatible with our own output -96btool pull --verbose - -96btool dump | 96btool filter --since "$double_year_since" \ - --until "$until" > tmp/96boards-all.json - -for i in danielt leo-yan Loic vchong -do - printf "Grabbing 96Boards data for $i ..." - cat tmp/96boards-all.json | 96btool filter --user $i > tmp/96b-$i.json - printf " %d posts\n" `cat tmp/96b-$i.json | 96btool filter --since "$since" --until "$until" | 96btool count` -done - -96btool filter --user ldts-atsuka --until "2017-01-01" \ - tmp/96boards-all.json > tmp/96b-ldts-atsuka.json -96btool filter --user ldts --until "2017-08-01" \ - tmp/96boards-all.json > tmp/96b-ldts.json - -printf "Generating 96boards activity report ..." -cat tmp/96b-*.json | 96btool merge > tmp/96boards.json -cat tmp/96boards.json | 96btool filter --since "$since" | 96btool monthly > tmp/96boards.html - -printf " done\n" - -printf "Generating 96boards activity graphs ..." -cat tmp/96boards.json | 96btool chart --output fig-3.1-96b_by_month.png -cat tmp/96boards.json | 96btool piechart --output fig-3.3-96b_pie_of_the_year.png -cat tmp/96boards.json | 96btool filter --since "$since" | 96btool piechart --output fig-3.2-96b_pie_of_the_month.png -cat tmp/96boards-all.json | 96btool chart --output fig-3.4-96b_by_month.png -cat tmp/96boards-all.json | 96btool piechart --output fig-3.6-96b_pie_of_the_year.png -cat tmp/96boards-all.json | 96btool filter --since "$since" | 96btool piechart --output fig-3.5-96b_pie_of_the_month.png -printf " done\n" +<p><table> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$since" --until "$until" \ + --project 'Support & Solutions' \ + --piechart \ + --simplify 3 \ + --effort-by-task fig-8-effort_by_task.png) + <img src="fig-8-effort_by_task.png"> + </td> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --project 'Support & Solutions' \ + --piechart \ + --simplify 3 \ + --effort-by-task fig-9-effort_by_task-full_year.png) + <img src="fig-9-effort_by_task-full_year.png"> + </td> + </tr> + <tr> + <td><strong>Figure 8</strong>: Member activity this $quantum</td> + <td><strong>Figure 9</strong>: Member activity, last 12 months.</td> + </tr> +</table></p> -# -# Bring everything together as a HTML document -# +<p>In the above graphs the Other category is a miscellany of small tasks. On +the barchart any topic that did not occupy more than 10% in a single month is +accounted as Other and, within the pie charts, any wedge representing less than +3% has been combined. This ensures that large tasks are clearly visible in the +above graphs. The following table shows the raw data for figure 5 (activity +this $quantum) but the Other category has been fully expanded allowing all +activity to be seen.</p> -printf "\nGenerating report ..." +<p><table> + <tr> + <td><strong>Task</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Proportion</strong></td> + </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --project 'Support & Solutions' \ + --field 'task/deliverable' \ + --percent | \ +maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td><a href="https://linaro.mavenlink.com/stories/relevance?search={task/deliverable}&usingDefaultFilters=false&columnSet=Info">{task/deliverable}</a></td><td>{time in days:.1f}</td><td>{time in days percent:.1f}%</td></tr>') +</table></p> -cat > ${tag}_report.html <<EOF -<html> -<head> -<title>LSSE `date -d "$until" +"%Y.%m"` Monthly Report</title> -</head> -<body> -<h1>LSSE `date -d "$until" +"%Y.%m"` Monthly Report</h1> +<h1>Developer Services</h1> -<p>This report is 100% auto-generated and does not have an executive summary</p> +<p>SSE provides staff for both T&M contracts and fixed price contracts (in the +case of SSE this is primarily fixed price training).</p> -<h1>Activity Breakdown</h1> +<p>Figures 10, 11 and 12 (below) summarize the overall contribution to Developer +Services by SSE team members and covers both T&M and fixed price activity.</p> -<h2>Solutions Engineering</h2> <p><table> - <tr><td><img src="fig-1.1-card_tracker.png"></td></tr> - <tr><td><strong>Figure 1.1</strong>: Summary of issues created and completed over the last 12 months.</td></tr> + <tr> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" --category Fixed,Materials \ + --barchart \ + --simplify 10 \ + --effort-by-project fig-10-effort_by_month_and_project.png) + <img src="fig-10-effort_by_month_and_project.png"> + </td> + </tr> + <tr><td><strong>Figure 10</strong>: Effort summary organised by month and by project</td></tr> </table></p> <p><table> <tr> - <td><img src="fig-1.2-cards_per_member.png" width="400" height="300"></td> - <td><img src="fig-1.3-cards_per_member-full_year.png" width="400" height="300"></td> + <td> + $(maventool chart sse_time_entries.json \ + --since "$since" --until "$until" \ + --category Fixed,Materials \ + --piechart \ + --simplify 3 \ + --effort-by-project fig-11-effort_by_project.png) + <img src="fig-11-effort_by_project.png"> + </td> + <td> + $(maventool chart sse_time_entries.json \ + --since "$full_year_since" --until "$until" \ + --category Fixed,Materials \ + --piechart \ + --simplify 3 \ + --effort-by-project fig-12-effort_by_project-full_year.png) + <img src="fig-12-effort_by_project-full_year.png"> + </td> </tr> <tr> - <td><strong>Figure 1.2</strong>: Issues worked on this $quantum</td> - <td><strong>Figure 1.3</strong>: Issues worked on over the last 12 months.</td> + <td><strong>Figure 11</strong>: Services effort this $quantum</td> + <td><strong>Figure 12</strong>: Services effort, last 12 months</td> </tr> </table></p> -<p>Figure 1.1 shows the new issues vs completed issues tackled by the SSE -team during the previous months. Each issue represents a unit of work -that is visible to a member. Figures 1.2 and 1.3 show the issues that -have been worked on this $quantum which members the work was for. None of -the above graphs indicate the level of effort invested by the team, -instead they should represent units of work that the member is aware -of us completing.</p> +<p>In the above graphs very small activities have been recorded in the Other +category to ensure graph readability. The overall division between T&M and +Fixed Price activities for this $quantum is:</p> <p><table> - <tr><td><img src="fig-1.4-effort_by_month_and_member.png"></td></tr> - <tr><td><strong>Figure 1.4</strong>: Effort summary organised by month and by member</td></tr> + <tr> + <td><strong>Category</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Proportion</strong></td> + </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Fixed,Materials \ + --field 'category' \ + --percent | \ +maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td>{category}</td><td>{time in days:.1f}</td><td>{time in days percent:.1f}%</td></tr>') </table></p> +<p>Zooming in on the T&M activity then effort is split as follows:</p> + <p><table> <tr> - <td><img src="fig-1.5-effort_per_member.png" width="400" height="300"></td> - <td><img src="fig-1.6-effort_per_member-full_year.png" width="400" height="300"> + <td><strong>Category</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Proportion</strong></td> </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Materials \ + --field 'project' \ + --percent | \ +maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td><a href="https://linaro.mavenlink.com/projects#?search={project}&genreFilter=on_account_by_orgs">{project}</a></td><td>{time in days:.1f}</td><td>{time in days percent:.1f}%</td></tr>') +</table></p> + +<p>Likewise the Fixed Price activity this $quantum includes:</p> + +<p><table> <tr> - <td><strong>Figure 1.5</strong>: Effort for each member this $quantum</td> - <td><strong>Figure 1.6</strong>: Effort for each member over the last 12 months</td> + <td><strong>Category</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Proportion</strong></td> </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Fixed \ + --field 'project' \ + --percent | \ +maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td><a href="https://linaro.mavenlink.com/projects#?search={project}&genreFilter=on_account_by_orgs">{project}</a></td><td>{time in days:.1f}</td><td>{time in days percent:.1f}%</td></tr>') </table></p> -<p>Figure 1.4 describes the effort applied by the team towards Solutions -Engineering (formerly known as Premium Services). It does not include -effort towards LDTS, 96Boards forum or team management and, for this -reason, total effort is not expected to track headcount within the -team. Figure 1.5 zooms in on the final column of the bar chart and -offers a more detailed breakdown whilst figure 1.6 provides a full-year -breakdown as a contrast.</p> +<h1>Appendix A - Developer Services revenue</h1> + +<p>Revenue for SSE consists of all T&M activity undertaken by SSE together with +fixed price contracts that are entirely or overwhelming-majority-staffed by +SSE.</p> + +<p>Note: <em>Within this report T&M activity is separated from Fixed Price +activity based on whether a billable rate has been set in Mavenlink. Thus for +projects that are minority-staffed by SEE (Schneider for example) the figures +below are estimates based on internal recharging rather than directly linked to +company revenue.</em></p> + +<p>The SSE revenue target is:</p> <p><table> - <tr><td><img src="fig-1.7-effort_by_month_and_category.png"></td></tr> - <tr><td><strong>Figure 1.7</strong>: Effort summary organised by month and by category</td></tr> + <tr><td>Per year</td><td>\$687,500</td> + <tr><td>Per year</td><td>\$687,500</td> + <tr><td>Per quarter</td><td>\$172,000 (approx)</td> + <tr><td>Per month</td><td>\$57,500 (approx)</td> </table></p> +<p> +Total T&M revenue this $quantum is \$ +$(maventool count sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Materials \ + --field 'subtotal') +and can be attributed to the following projects: + <p><table> <tr> - <td><img src="fig-1.8-effort_by_category.png" width="400" height="300"></td> - <td><img src="fig-1.9-effort_by_category-full_year.png" width="400" height="300"> - </tr> - <tr> - <td><strong>Figure 1.8</strong>: Effort this $quantum, by category</td> - <td><strong>Figure 1.9</strong>: Effort over last 12 months, by category</td> + <td><strong>Project</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Revenue</strong></td> </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Materials \ + --field 'project' \ +| maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td><a href="https://linaro.mavenlink.com/projects#?search={project}&genreFilter=on_account_by_orgs">{project}</a></td><td>{time in days:.1f}</td><td>{subtotal}</td></tr>') </table></p> -<p>The graph and pie charts above show the effort expended this $quantum -organised by the type of work undertaken and contrasts it with trends -over the past twelve months. The potential categories include:</p> -<p> +<p>Total fixed price revenue is CALCULATED-MANUALLY and can be attributed to the following +projects:</p> <p><table> <tr> - <td>96Boards</td> - <td>Contributions to the 96Boards programme. This category is - similar to Engineering works, but is extracted from other types - of engineering activity due to its special importance to - Linaro.</td> - </tr> - <tr> - <td>BSP Analysis</td> - <td>Review of a member's bootloader and kernel.</td> - </tr> - <tr> - <td>Engineering works</td> - <td>General engineering effort.</td> - </tr> - <tr> - <td>Training</td> - <td>Preparation, review and delivery of training materials.</td> - </tr> - <tr> - <td>Upstream Consultancy</td> - <td>Assist members in delivering software upstream. A mixture of - pre- and post-release review services, together with occasional - engagements to upstream a specific driver.<td> + <td><strong>Project</strong></td> + <td><strong>Time in man/days</strong></td> + <td><strong>Revenue</strong></td> </tr> +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --category Fixed \ + --field 'project' \ +| maventool format \ + --template '<tr><td><a href="https://linaro.mavenlink.com/projects#?search={project}&genreFilter=on_account_by_orgs">{project}</a></td><td>{time in days:.1f}</td><td>{subtotal}</td></tr>') +$(maventool collate sse_time_entries.json \ + --since "$since" \ + --until "$until" \ + --task Proposals \ + --field 'task/deliverable' \ +| maventool format \ + --sort-by 'time in days' --reverse \ + --template '<tr><td><a href="https://linaro.mavenlink.com/stories/relevance?search={task/deliverable}&usingDefaultFilters=false&columnSet=Info">{task/deliverable}</a></td><td>{time in days:.1f}</td><td>{subtotal}</td></tr>') </table></p> +Total revenue is CALCULATED-MANUALLY and this (approximately) meets the revenue target for the $quantum. +EOF + +# Inline images (and wreck some of the formatting) +pandoc -s --toc --self-contained ${tag}_report.html -o ../../${tag}_report-`date -d "$until" +"%Y-%m"`.html + +# Fixup the nastiest problems pandoc introduces! +sed -i ../../${tag}_report-`date -d "$until" +"%Y-%m"`.html \ + -e 's/^<table>/<table border=0>/' + + +# +# LEGACY... some of these tools no longer work... some are no longer relevant +# + + +#printf "Generating JIRA activity report ..." +#glance filter --worklog-since "$since" --worklog-until "$until" \ +# --no-worklog tmp/jira-activity.json | \ +#glance monthly > tmp/monthly.html +#sed -i -e '/^<\/*html>$/d' -e '/^<\/*head>$/d' -e '/^<title>/d' -e '/^<\/*body>/d' tmp/monthly.html +#printf " done\n" + +# +# Grab LDTS data for this month +# + +#printf "Grabbing LDTS monthly activity ..." +# -e tmp/ldtstool-pull.empty ] || \ +# ldtstool pull > tmp/ldtstool-pull.empty +#printf " done\n" +# +#printf "Generating LDTS activity graphs ." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$double_year_since" --until "$until" | \ +#ldtstool chart --output "fig-2.1-ldts-by_month_by_member.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$since" --until "$until" | \ +#ldtstool piechart --by-member --output "fig-2.2-ldts-by_member.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$double_year_since" --until "$until" | \ +#ldtstool piechart --by-member --output "fig-2.3-ldts-by_member-full_year.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$double_year_since" --until "$until" | \ +#ldtstool chart --by-category --output "fig-2.4-ldts-by_month_by_category.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$since" --until "$until" | \ +#ldtstool piechart --by-category --output "fig-2.5-ldts-by_category.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --member \ +# --since "$double_year_since" --until "$until" | \ +# ldtstool piechart --by-category --output "fig-2.6-ldts-by_category-full_year.png" +#printf "." +# +#ldtstool dump | ldtstool filter --restrict created --community \ +# --since "$double_year_since" --until "$until" | \ +#ldtstool chart --by-category --output "fig-2.7-community-by_month_by_category.png" +#printf "." +# +#printf " done\n" + +#printf "Generating LDTS activity report ..." +#ldtstool dump | ldtstool filter --since "$since" --until "$until" | \ +# ldtstool monthly > tmp/ldts.html +#printf " done\n" + +# +# Slurp up posts by the team on the forum +# + +# The output of pull --verbose is naturally compatible with our own output +#96btool pull --verbose + +#printf "Generating 96boards activity report ..." +#96btool dump | \ +# 96btool filter --since "$double_year_since" --until "$until" | \ +# 96btool tag --tag-with 'Linaro (other)' --usermap ~/.96btool-usermap,linaro.org | \ +# 96btool tag --tag-with 'Linaro (SSE)' --user danielt,Loic,leo-yan,sumit.garg --unique | \ +# 96btool tag --tag-with 'Linaro (SSE)' --user ldts-atsuka --until 2017-01-01 --unique | \ +# 96btool tag --tag-with 'Linaro (SSE)' --user ldts --until 2017-08-01 --unique | \ +# 96btool tag --tag-with 'Linaro (SSE)' --user vchong --until 2018-04-01 --unique | \ +# 96btool tag --tag-with 'Linaro (96Boards)' --user ric96,sdrobertw,Mani,yang --unique | \ +# 96btool tag --tag-with 'All other posts' --empty \ +# > tmp/96boards-all.json +#cat tmp/96boards-all.json | 96btool filter --since "$since" --tag 'Linaro (SSE)' | 96btool monthly > tmp/96boards.html +#printf " done\n" +# +#printf "Generating 96boards activity graphs ..." +#cat tmp/96boards-all.json | 96btool chart --by-tag --output fig-3.1-96b_by_month.png +#cat tmp/96boards-all.json | 96btool filter --since "$since" | 96btool count --by-tag | 96btool piechart --output fig-3.2-96b_pie_of_the_month.png +#cat tmp/96boards-all.json | 96btool filter --since "$full_year_since" | 96btool count --by-tag | 96btool piechart --output fig-3.3-96b_pie_of_the_year.png +#cat tmp/96boards-all.json | 96btool chart --simplify 3 --output fig-3.4-96b_by_month.png +#cat tmp/96boards-all.json | 96btool filter --since "$since" | 96btool piechart --simplify 3 --output fig-3.5-96b_pie_of_the_month.png +#cat tmp/96boards-all.json | 96btool filter --since "$full_year_since" | 96btool piechart --simplify 3 --output fig-3.6-96b_pie_of_the_year.png +#printf " done\n" +# +cat > /dev/null <<EOF <h2>Support via LDTS</h2> <p><table> @@ -370,6 +639,7 @@ the graph shows the signifiance of the Linaro toolchain to our external image.</p> <p><table> +--> <h2>96Boards Support</h2> <h3>SSE contributions to 96Boards forum</h3> @@ -424,18 +694,16 @@ to the board. <h2>Solutions Engineering</h2> -`cat tmp/monthly.html` +\$(cat tmp/monthly.html) <h2>Support via LDTS</h2> -`cat tmp/ldts.html` +\$(cat tmp/ldts.html) <h2>96Boards Support</h2> -`cat tmp/96boards.html` +\$(cat tmp/96boards.html) </body> </html> EOF - -printf " $SSE_DATA_DIR/${tag}_report.html\n" |