Merge lp://qastaging/~sinzui/launchpad/licenses-0 into lp://qastaging/launchpad/db-devel

Proposed by Curtis Hovey
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 9715
Proposed branch: lp://qastaging/~sinzui/launchpad/licenses-0
Merge into: lp://qastaging/launchpad/db-devel
Diff against target: 258 lines (+62/-50)
5 files modified
lib/canonical/widgets/product.py (+28/-26)
lib/canonical/widgets/templates/license.pt (+2/-2)
lib/lp/registry/doc/product-widgets.txt (+12/-8)
lib/lp/registry/interfaces/product.py (+10/-3)
lib/lp/registry/windmill/tests/test_project_licenses.py (+10/-11)
To merge this branch: bzr merge lp://qastaging/~sinzui/launchpad/licenses-0
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+33916@code.qastaging.launchpad.net

Description of the change

This is my branch to add the OFL and GFDL to the recognised licenses.

    lp:~sinzui/launchpad/licenses-0
    Diff size: 259
    Launchpad bug:
          https://bugs.launchpad.net/bugs/299734
          https://bugs.launchpad.net/bugs/616229
    Test command: ./bin/test -vv \
          -t product-widgets.txt -t test_project_licenses
    Pre-implementation: ~yosch
    Target release: 10.09

Add the OFL and GFDL to the recongnised licenses
------------------------------------------------

Add the OFL and GFDL licenses to the license enums and show them in the
second block of the license widget. We are doing OFL because Mark want it.
We postponed adding GFDL (no options) until after we had a license widget
that hide the rare licenses. We do, so this is a good time to add it.

Adding enums should be trivial. It is not. I was aware that the license widget
does odd things to make the licenses appear in AJAX enabled blocked. I added
an enum to learn what would break. The javascript and windmill tests both
broke because they assume that licenses 25 and 26 are the two special
licenses :(. I decided to fix the script. Then when I was done, I decided to
add the two licenses and be done quickly. Well it was not as quick as I hoped.

Rules
-----

    * Update the JS and windmill test to use the explicit other open source
      and other proprietary. Do not guess them by they number.
    * Add the enums.
    * Include them in the second block of the license widget.

QA
--

    * Visit https://staging.launchpad.net/launchpad/+edit
    * Verify you can see OFL and GFDL listed in the second block of licenses.

Lint
----

Linting changed files:
  lib/canonical/widgets/product.py
  lib/canonical/widgets/templates/license.pt
  lib/lp/registry/doc/product-widgets.txt
  lib/lp/registry/interfaces/product.py
  lib/lp/registry/windmill/tests/test_project_licenses.py

Test
----

    * lib/lp/registry/doc/product-widgets.txt
      * It was not obvious why adding two licenses change the order of several
        licenses. The answer is that the widget is creating an order for
        3 columns, and adding 2 licenses forces some licenses to the top of
        the next column :(
    * lib/lp/registry/windmill/tests/test_project_licenses.py
      * Updated the test to explicitly locate the OTHER_OPEN_SOURCE and
        OTHER_PROPRIETARY licenses...do not assume them by their number.

Implementation
--------------

    * lib/canonical/widgets/product.py
      * Added the OFL and GFDL to the "more" section of the widget. Fixed the
        dict spacing.
    * lib/canonical/widgets/templates/license.pt
      * Updated the script to locate the OTHER_OPEN_SOURCE and
        OTHER_PROPRIETARY licenses...do not assume them by their number.
    * lib/lp/registry/interfaces/product.py
      * Added the OFL and GFDL (no options) licenses to the enums.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: