Merge lp://qastaging/~dpm/launchpad/translations-exporter into lp://qastaging/launchpad
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~dpm/launchpad/translations-exporter |
Merge into: | lp://qastaging/launchpad |
Diff against target: |
335 lines (+315/-0) 3 files modified
cronscripts/translations-export-stats.py (+25/-0) lib/lp/services/config/schema-lazr.conf (+6/-0) lib/lp/translations/scripts/export_stats.py (+284/-0) |
To merge this branch: | bzr merge lp://qastaging/~dpm/launchpad/translations-exporter |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email:
|
Description of the change
This is a result of the request on RT #55759 to move the Ubuntu translations exporter script [1] into the Launchpad tree.
As it's my first ever Launchpad merge proposal, I'm submitting this as work in progress to get some initial feedback if overall what I'm trying to do and the code looks good. I'll start working on the tests once that's been reviewed and I'm certain I'm doing the right thing :).
In short, this code is thought to be run daily to provide a tarball with an export of Ubuntu translations stats. The data is fetched by querying the Launchpad database. The data will then be used to produce the translations coverage report at release time [2] and also to provide a list of of priority templates to help the community focus on the most important translations to complete, as well as producing graphs of their progress.
There are some TODO comments in the code for a couple of areas I was not sure how to go about. The most important one is the fact that the tarballs that are generated with the database dump are uploaded to Librarian, but as they are not listed anywhere in Launchpad, I have no way of knowing their URL in advance when I'll want to fetch them. I thought perhaps a URL alias such as the ones we use for https:/
Thanks.
[1] https:/
[2] http://
Unmerged revisions
- 15945. By David Planella
-
Converted Ubuntu translations export script to a LaunchpadCronScript
- 15944. By David Planella
-
Added exporter script, without modifications
- 15943. By David Planella
-
Switched to use Launchpad config
- 15942. By David Planella
-
Added wrapper for translations export script
Hi David,
firstly, a few general remarks:
- The big obstacle: "thou shalt not increase the LOC count for (the branch /dev.launchpad. net/PolicyAndPr ocess/Maintenan ceCosts? highlight= %28loc% 29
you are landing code in) unless" (quoted from
https:/
See the wiki page for more details -- you can either try to convice
somebody in charge that this is a good change, or you can "compess" the
existing LP code base first.
Personally, I think this script would be worth to add, but I am not the
project lead...
> This is a result of the request on RT #55759 to move the Ubuntu translations /translations. launchpad. net/ubuntu/ hardy/+ latest- full-language- pack stats-export) . I could not really figure
> exporter script [1] into the Launchpad tree.
>
> As it's my first ever Launchpad merge proposal, I'm submitting this as work
> in progress to get some initial feedback if overall what I'm trying to do
> and the code looks good. I'll start working on the tests once that's been
> reviewed and I'm certain I'm doing the right thing :).
>
> In short, this code is thought to be run daily to provide a tarball with an
> export of Ubuntu translations stats. The data is fetched by querying the
> Launchpad database. The data will then be used to produce the translations
> coverage report at release time [2] and also to provide a list of of
> priority templates to help the community focus on the most important
> translations to complete, as well as producing graphs of their progress.
>
> There are some TODO comments in the code for a couple of areas I was not
> sure how to go about. The most important one is the fact that the tarballs
> that are generated with the database dump are uploaded to Librarian, but as
> they are not listed anywhere in Launchpad, I have no way of knowing their
> URL in advance when I'll want to fetch them. I thought perhaps a URL alias
> such as the ones we use for
> https:/
> could be useful (e.g. .../+latest-
> out how to do it. Any pointers? Or other approaches?
Such a URL would mean that the Librarian data would have to be fed through
the app server in order to reach the client.
But the core problem is that a Librarian file that is not referenced from translation_ statistics would do the job.
anywhere will be deleted by a cron job. So we need a column in some LP
DB table that points to the LibraryFileAlias. I think a new column
DistroSeries.
Adding this column requires a separate branch and merge proposal, /dev.launchpad. net/PolicyAndPr ocess/DatabaseS chemaChangesPro cess
see https:/
This may look a bit scary, but just adding a column is not difficult.
But I suspect that the column will need an index so that the garbo job
that deletes unreferenced LFA records can run efficiently. But stub
ask stub if my suspicion is right. Anyway, the index should be added
in a separate branch.
database/ schema/ patch-2209- 28-1.sql and database/ schema/ patch-2209- 28-2.sql
are an example for such a DB schema change.
And once the DB column exists, you can add a new property to the Python
class DistroSeries and export it to the API.
> /launchpad. net/lp- get-ul10nstats/ people. canonical. com/~dpm/ stats/ubuntu- 12...
> Thanks.
>
> [1] https:/
> [2] http://