← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/contact-launchpad-2 into lp:launchpad/devel

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/contact-launchpad-2 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #617270 Task tooltip says "The project's license has not been specified"
  https://bugs.launchpad.net/bugs/617270


This is my branch to remove the license summary from the product formatter.

    lp:~sinzui/launchpad/contact-launchpad-2
    Diff size: 264
    Launchpad bug:
          https://bugs.launchpad.net/bugs/617270
    Test command: ./bin/test -vv \
        -t site-search -t xx-bugtracker -t xx-no-launchpadder \
        -t xx-branch-index -t xx-creating-branches -t xx-productset \
        -t xx-productseries-index -t stories/translationgroups \
        -t xx-branch-edit
    Pre-implementation: discussed with bac many months ago.
    Target release: 10.10


Remove the license summary from the product formatter
-----------------------------------------------------

The pillar formatter annotates products with a license summary and tooltip.
But who is the message for? Most user cannot change a project's license,
and the message does not actually say the license needs changing. The
unreviewed message means someone needs to review...the backlog of 'unreviewed'
projects was cleared earlier this year. Most of the 'unspecified' licenses
are unmaintained projects (and we have a separate plan to fix them). As for
proprietary, there are 15 projects we are waiting one and have contacted
the owners. In summary, the message is unclear and irreverent.

The annotation interfere with the tooltips on listings, and make them hard
to read.


Rules
-----

    * Remove the rule to wrap products with a licenses message.
    * Removed th cruft in the tests.


QA
--

    * Visit https://edge.launchpad.net/projects/+review-licenses
    * Verify the listed projects do not have (unreviewed), (unspecified),
      or (proprietary).


Lint
----

Linting changed files:
  lib/canonical/launchpad/webapp/tales.py
  lib/lp/app/stories/launchpad-root/site-search.txt
  lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
  lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt
  lib/lp/code/stories/branches/xx-branch-edit.txt
  lib/lp/code/stories/branches/xx-branch-index.txt
  lib/lp/code/stories/branches/xx-creating-branches.txt
  lib/lp/registry/stories/product/xx-productset.txt
  lib/lp/registry/stories/productseries/xx-productseries-index.txt
  lib/lp/translations/stories/translationgroups/15-product-translation-group.txt

^ Lint hates these files. There is a lot of indentation and line length
issues. I can fix them before I land my branch.


Test
----

Removed the cruft from these tests.

    * lib/lp/app/stories/launchpad-root/site-search.txt
    * lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
    * lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt
    * lib/lp/code/stories/branches/xx-branch-edit.txt
    * lib/lp/code/stories/branches/xx-branch-index.txt
    * lib/lp/code/stories/branches/xx-creating-branches.txt
    * lib/lp/registry/stories/product/xx-productset.txt
    * lib/lp/registry/stories/productseries/xx-productseries-index.txt
    * lib/lp/translations/stories/translationgroups/15-*.txt


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

Deleted the rule to add a summary of the license from the project.

    * lib/canonical/launchpad/webapp/tales.py
-- 
https://code.launchpad.net/~sinzui/launchpad/contact-launchpad-2/+merge/36670
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/contact-launchpad-2 into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/webapp/tales.py'
--- lib/canonical/launchpad/webapp/tales.py	2010-08-30 11:46:44 +0000
+++ lib/canonical/launchpad/webapp/tales.py	2010-09-26 22:20:59 +0000
@@ -1302,12 +1302,6 @@
             html = (u'<a href="%s" class="bg-image" '
                      'style="background-image: url(%s)">%s</a>') % (
                 url, custom_icon, summary)
-        if IProduct.providedBy(context):
-            license_status = context.license_status
-            if license_status != LicenseStatus.OPEN_SOURCE:
-                html = '<span title="%s">%s (%s)</span>' % (
-                        license_status.description, html,
-                        license_status.title)
         return html
 
 

=== modified file 'lib/lp/app/stories/launchpad-root/site-search.txt'
--- lib/lp/app/stories/launchpad-root/site-search.txt	2010-04-23 13:50:57 +0000
+++ lib/lp/app/stories/launchpad-root/site-search.txt	2010-09-26 22:20:59 +0000
@@ -58,7 +58,7 @@
     Pages matching "firefox" in Launchpad
     >>> print_search_results()
     Exact matches
-    Mozilla Firefox (Unspecified)
+    Mozilla Firefox
     The Mozilla Firefox web browser
     Registered by Sample Person
     on 2004-09-24
@@ -125,7 +125,7 @@
     Pages matching "launchpad" in Launchpad
     >>> print_search_results()
     Exact matches
-    Launchpad (Unspecified)
+    Launchpad
     Launchpad is a catalogue of libre software projects and products.
     ...
     Registered by Sample Person  on 2006-11-24
@@ -147,7 +147,7 @@
     >>> search_for('firefox')
     >>> print_search_results()
     Exact matches
-    Mozilla Firefox (Unspecified)
+    Mozilla Firefox
     The Mozilla Firefox web browser
     Registered by Sample Person
     on 2004-09-24

=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt'
--- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt	2010-06-23 01:24:54 +0000
+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt	2010-09-26 22:20:59 +0000
@@ -695,7 +695,7 @@
   registered bug tracker in the project's &ldquo;Change
   details&rdquo; page.
   the Mozilla Project
-  Jokosher (Unspecified)
+  Jokosher
 
 
 == Info portlet ==

=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt'
--- lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt	2010-03-16 22:07:45 +0000
+++ lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt	2010-09-26 22:20:59 +0000
@@ -13,7 +13,7 @@
     ...     'http://bugs.launchpad.dev/alsa-utils/+filebug')
     >>> for message in find_tags_by_class(user_browser.contents, 'highlight-message'):
     ...     print extract_text(message)
-    alsa-utils (Unspecified) does not use Launchpad as its bug tracker.
+    alsa-utils does not use Launchpad as its bug tracker.
 
 But it's packaged in Ubuntu and Debian, and we suggest those packages
 for filing bugs:
@@ -35,7 +35,7 @@
     ...     'http://bugs.launchpad.dev/gnomebaker/+filebug')
     >>> for message in find_tags_by_class(user_browser.contents, 'highlight-message'):
     ...     print extract_text(message)
-    gnomebaker (Unspecified) does not use Launchpad as its bug tracker.
+    gnomebaker does not use Launchpad as its bug tracker.
     >>> user_browser.getLink("linking them for us.") is not None
     True
 
@@ -80,7 +80,7 @@
     ...     "http://launchpad.dev/products/alsa-utils/+filebug";)
     >>> for message in find_tags_by_class(user_browser.contents, 'highlight-message'):
     ...     print extract_text(message)
-    alsa-utils (Unspecified) does not use Launchpad as its bug tracker.
+    alsa-utils does not use Launchpad as its bug tracker.
 
 
 == Distros ==

=== modified file 'lib/lp/code/stories/branches/xx-branch-edit.txt'
--- lib/lp/code/stories/branches/xx-branch-edit.txt	2010-08-23 05:06:49 +0000
+++ lib/lp/code/stories/branches/xx-branch-edit.txt	2010-09-26 22:20:59 +0000
@@ -70,7 +70,7 @@
     >>> print extract_text(find_tag_by_id(
     ...     browser.contents, 'branch-info'))
     Branch information...
-    Project: GNOME Terminal (Unspecified)...
+    Project: GNOME Terminal ...
     Status: Experimental
     Location: http://trekkies.example.com/gnome-terminal/klingon
     Last mirrored: ...

=== modified file 'lib/lp/code/stories/branches/xx-branch-index.txt'
--- lib/lp/code/stories/branches/xx-branch-index.txt	2010-05-19 17:03:40 +0000
+++ lib/lp/code/stories/branches/xx-branch-index.txt	2010-09-26 22:20:59 +0000
@@ -174,7 +174,7 @@
     >>> print extract_text(get_branch_details_table())
     Branch information
     Owner: Sample Person
-    Project: GNOME Terminal (Unspecified)
+    Project: GNOME Terminal
     Status: Development
 
     >>> print extract_text(get_branch_management_portlet())
@@ -226,7 +226,7 @@
     >>> print extract_text(get_branch_details_table())
     Branch information
     Owner: Sample Person
-    Project: GNOME Terminal (Unspecified)
+    Project: GNOME Terminal
     Status: Development
     Location: http://example.com/gnome-terminal/main
     Last mirrored: Not mirrored yet

=== modified file 'lib/lp/code/stories/branches/xx-creating-branches.txt'
--- lib/lp/code/stories/branches/xx-creating-branches.txt	2010-08-23 05:06:49 +0000
+++ lib/lp/code/stories/branches/xx-creating-branches.txt	2010-09-26 22:20:59 +0000
@@ -39,7 +39,7 @@
     >>> print_branch_info(browser)
     Branch information
     Owner: Sample Person
-    Project: Redfish (Unspecified)
+    Project: Redfish
     Status: Development
 
 
@@ -73,7 +73,7 @@
     >>> print_branch_info(browser)
     Branch information
     Owner: Sample Person
-    Project: Redfish (Unspecified)
+    Project: Redfish
     Status: Development
     Location: http://example.com/mirrored-branch
     Last mirrored: Not mirrored yet
@@ -98,7 +98,7 @@
     >>> print_branch_info(browser)
     Branch information
     Owner: Sample Person
-    Project: Redfish (Unspecified)
+    Project: Redfish
     Status: Development
     Location: http://example.com/remote-branch
 

=== modified file 'lib/lp/registry/stories/product/xx-productset.txt'
--- lib/lp/registry/stories/product/xx-productset.txt	2009-12-24 01:41:54 +0000
+++ lib/lp/registry/stories/product/xx-productset.txt	2010-09-26 22:20:59 +0000
@@ -110,75 +110,6 @@
     True
 
 
-Project list shows license status
-=================================
-
-The project list will show (Proprietary) next to projects with a
-proprietary license, (Unspecified) next to projects without
-any license and (Unreviewed) next to projects with an unreviewed
-Other/OpenSource license.
-
-First, add a product with a Other/Open Source license.
-
-    >>> user_browser.open('http://launchpad.dev/products/+new')
-    >>> user_browser.getControl('URL').value = 'other-open-source'
-    >>> user_browser.getControl('Name').value = 'Other-Open-Source Product'
-    >>> user_browser.getControl('Title').value = 'title'
-    >>> user_browser.getControl('Summary').value = 'summary'
-    >>> user_browser.getControl('Continue').click()
-
-    >>> user_browser.getControl(name='field.description').value = 'description'
-    >>> user_browser.getControl(name='field.licenses').value = [
-    ...     'OTHER_OPEN_SOURCE']
-    >>> user_browser.getControl(name='field.license_info').value = 'foo'
-    >>> user_browser.getControl('Complete Registration').click()
-    >>> print user_browser.url
-    http://launchpad.dev/other-open-source
-
-    >>> user_browser.open('http://launchpad.dev/projects/+all')
-    >>> div = find_tag_by_id(user_browser.contents, 'product-listing')
-    >>> for subdiv in div.next.findNextSiblings('div'):
-    ...     pillar = subdiv.find()
-    ...     print ''.join(pillar.findAll(text=True))
-    ...     print '     ', pillar.get('title')
-    Other-Open-Source Product (Unreviewed)
-          This project&rsquo;s license has not been reviewed.
-    Obsolete Junk
-          None
-    Launchpad Translations (Unspecified)
-          This project&rsquo;s license has not been specified.
-    Mega Money Maker (Proprietary)
-          This project&rsquo;s license is proprietary.
-    Derby
-          None
-
-
-If an open source project adds a proprietary license then the project
-will be displayed as proprietary.
-
-    >>> user_browser.open('http://launchpad.dev/other-open-source')
-    >>> user_browser.getLink('Change details').click()
-    >>> user_browser.getControl(name='field.licenses').value = [
-    ...     'OTHER_OPEN_SOURCE', 'OTHER_PROPRIETARY']
-    >>> user_browser.getControl('Change').click()
-    >>> user_browser.open('http://launchpad.dev/projects/+all')
-    >>> div = find_tag_by_id(user_browser.contents, 'product-listing')
-    >>> for subdiv in div.next.findNextSiblings('div'):
-    ...     pillar = subdiv.find()
-    ...     print ''.join(pillar.findAll(text=True))
-    ...     print '     ', pillar.get('title')
-    Other-Open-Source Product (Proprietary)
-          This project&rsquo;s license is proprietary.
-    Obsolete Junk
-          None
-    Launchpad Translations (Unspecified)
-          This project&rsquo;s license has not been specified.
-    Mega Money Maker (Proprietary)
-          This project&rsquo;s license is proprietary.
-    Derby
-          None
-
-
 View all projects
 =================
 

=== modified file 'lib/lp/registry/stories/productseries/xx-productseries-index.txt'
--- lib/lp/registry/stories/productseries/xx-productseries-index.txt	2010-05-19 05:47:50 +0000
+++ lib/lp/registry/stories/productseries/xx-productseries-index.txt	2010-09-26 22:20:59 +0000
@@ -13,7 +13,7 @@
 
     >>> print extract_text(find_tag_by_id(content, 'series-details'))
     Series information
-    Project: Mozilla Firefox (Unspecified)
+    Project: Mozilla Firefox
     Series: trunk
     Project drivers: Sample Person
     Release manager: None

=== modified file 'lib/lp/translations/stories/translationgroups/15-product-translation-group.txt'
--- lib/lp/translations/stories/translationgroups/15-product-translation-group.txt	2010-08-24 22:23:17 +0000
+++ lib/lp/translations/stories/translationgroups/15-product-translation-group.txt	2010-09-26 22:20:59 +0000
@@ -34,7 +34,7 @@
     >>> print extract_text(
     ...     find_tag_by_id(netapplet_owner_browser.contents,
     ...                    'translation-permissions'))
-    NetApplet (Unspecified) is translated with Open permissions.
+    NetApplet is translated with Open permissions.
 
 Now let's make sure we can see the page to let us change translation
 group and permissions.