bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

[l10nstats] improve progress graph on team page and dashboard

RESOLVED FIXED

Status

Webtools
Elmo
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Pike, Assigned: Pike)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

2 years ago
Right now, the sparklines don't show something that's easy to decipher as a sparkline graph.

I've got some improvements in hand, the first one being that I can actually start the graph at the start of time, instead of somewhere in the middle.
(Assignee)

Comment 1

2 years ago
Created attachment 8757477 [details]
animated gif, with full-time graph
Assignee: nobody → l10n
Status: NEW → ASSIGNED
(Assignee)

Comment 2

2 years ago
Created attachment 8758705 [details] [review]
quite a few changes, in separate commits

This is enough of a change that it's worth to get a review, I think.

Also, Janis, I'd like to get your feedback in particular on https://github.com/Pike/elmo/blob/3a2afb94953fe89d991f9c758db8065a102de424/apps/l10nstats/management/commands/progress.py#L133-137 from https://github.com/mozilla/elmo/pull/15/commits/3a2afb94953fe89d991f9c758db8065a102de424:

Locale.objects
  .filter(code__in=locales)
  .filter(run__srctime__lt=startdate, run__tree__code=tree)
  .annotate(mr=Max('run'))

to get the last .run for a particular tree that's older than startdate for each Locale.

Is the ORM generating a working query here by design, or by coincidence, or is that a bug?

Also, I'm still on 1.4. Yeah, I know.

On to the actual changes:

I'm getting the starttime right.
I'm scaling better, the previous version was off and weird, actually.
For locales that weren't active, I didn't generate any graph at all (looking at you, gaia)
For debugging, I allow for an optional argument to just create graphs for some trees. Really nice if you want to create bigger images to see details
Changed from showing completion to changed/total. Same data, really, just that completion is an integer for percentage, and doesn't change at all for active locales.
Attachment #8758705 - Flags: review?(m)
Attachment #8758705 - Flags: feedback?(jezdez)
(Assignee)

Comment 3

2 years ago
Created attachment 8758706 [details]
how progress.png looks now
Comment on attachment 8758705 [details] [review]
quite a few changes, in separate commits

Nice work. r+

I only looked at the first commit tough (pick correct start data):
https://github.com/mozilla/elmo/pull/15/commits/3a2afb94953fe89d991f9c758db8065a102de424

You could use canvas instead of generating the image file.
Attachment #8758705 - Flags: review?(m) → review+

Comment 5

2 years ago
Commits pushed to develop at https://github.com/mozilla/elmo

https://github.com/mozilla/elmo/commit/3a2afb94953fe89d991f9c758db8065a102de424
bug 1276329, pick correct start data

https://github.com/mozilla/elmo/commit/e2438eea9c33cb9631bdb634e0338a6d4e75113f
bug 1276329, better scale function for progress sparklines

The scale function now doesn't modify values in place, so we can
use the original values for coloring.

https://github.com/mozilla/elmo/commit/be1a3c8b16689b80a25ecc316fc21db44ca32ab8
bug 1276329, show progress sparklines for inactive locales

If a locale hasn't been active in the past 6 weeks, we
didn't draw a progress sparkline at all.

https://github.com/mozilla/elmo/commit/d32d46e525be3dbfc807f42ddc63be92597ef2da
bug 1276329, allow to create progress just for some trees

This is useful when debugging, and you just want to look at
specific data.

https://github.com/mozilla/elmo/commit/f8b1d0064f4c97453c7d424ecf8620291b5fa0d0
bug 1276329, show changed/total instead of completion -> more granular

completion is just a SmallIntegerField, so locales that update
frequently don't change that number. changed/total is the same
thing, but more fine-grained, so use that.
(Assignee)

Comment 6

2 years ago
This isn't on prod yet, but marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Attachment #8758705 - Flags: feedback?(jezdez)
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1014497
You need to log in before you can comment on or make changes to this bug.