Merge lp:~jcsackett/launchpad/series-need-usage-attributes-643902 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11604 | ||||
Proposed branch: | lp:~jcsackett/launchpad/series-need-usage-attributes-643902 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
383 lines (+195/-31) 7 files modified
lib/lp/registry/adapters.py (+7/-19) lib/lp/registry/configure.zcml (+7/-8) lib/lp/registry/interfaces/distroseries.py (+2/-1) lib/lp/registry/interfaces/productseries.py (+2/-1) lib/lp/registry/model/distroseries.py (+50/-1) lib/lp/registry/model/productseries.py (+51/-1) lib/lp/registry/tests/test_service_usage.py (+76/-0) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/series-need-usage-attributes-643902 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+36145@code.launchpad.net |
Commit message
Adds usage attributes (e.g. blueprints_usage, codehosting_usage) to productseries and distroseries.
Description of the change
Summary
=======
Adds the usage attributes to productseries and distroseries, largely as a mirror of the attributes on the series related pillar.
Proposed Fix
============
Add the usage attributes as properties to the series.
Pre-implementation notes
=======
Spoke with Curtis Hovey (sinzui) and jtv about what was needed in usage attributes on the series, especially for translations.
Implementation details
=======
As in proposed fix.
Translations use the current status of templates to determine usage; however, that is overridden by requirements in the translations application (see bug 605924). That requirement will be resolve by lp:~jcsackett/launchpad/unknown-translations-service-643545, which is dependent on this branch.
Tests
=====
bin/test -t test_service_usage
Demo and Q/A
============
Currently usage of the various series should see no change from this branch.
Lint
====
Output:
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
417: E301 expected 1 blank line, found 2
458: E301 expected 1 blank line, found 0
./lib/lp/
364: E301 expected 1 blank line, found 2
708: E301 expected 1 blank line, found 2
Both errors related to lint's issue with comments and blank lines
From IRC:
<gmb> jcsackett, On line 177 you say "# If translations_usage is set for the Product, respect it" but then you reference self.distributi on.translations _usage. I'm assuming you need to s/Product/ Distribution in the comment.
<jcsackett> gmb: you're correct. making the change.
<gmb> Same on line 241
jcsackett, You need to add some comments or docstrings to the start of your tests explaining what they test (you should phrase this as a statement of expected behaviour, e.g. "The frobnob goes boing." rather than "Test that the frobnob goes boing."
Other than that, r=me.