← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~fmarier/launchpad/remove-freshmeat into lp:launchpad

 

François Marier has proposed merging lp:~fmarier/launchpad/remove-freshmeat into lp:launchpad.

Commit message:
Remove freshmeat links from products and project groups.

Requested reviews:
  William Grant (wgrant)
Related bugs:
  Bug #1366517 in Launchpad itself: "Freshmeat links are no longer useful"
  https://bugs.launchpad.net/launchpad/+bug/1366517

For more details, see:
https://code.launchpad.net/~fmarier/launchpad/remove-freshmeat/+merge/233820

= Summary =

Freshmeat is now deprecated and the links are no longer usefuls.

= Proposed fix =

The freshmeat links are no longer visible.

= Implementation details =

Links are now hidden from the UI and RDF metadata, new products get an empty freshmeatproject and the API docs show those fields as deprecated.

= LOC Rationale =

Net decrease in LOC!

= Tests =

bin/test -vvt lib/lp/registry/stories/product/xx-product-index.txt

= Demo and Q/A =

- Visit an existing project page with a freshmeat link already set. You shouldn't see it anymore.
- Click on the RDF metadata. The freshmeat link shouldn't be included.
- Edit the project details. You shouldn't see an option to add a freshmeat link.
- Repeat the above for a project group page.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/browser/product.py
  lib/lp/registry/browser/project.py
  lib/lp/registry/interfaces/product.py
  lib/lp/registry/interfaces/projectgroup.py
  lib/lp/registry/model/product.py
  lib/lp/registry/stories/product/xx-product-index.txt
  lib/lp/registry/templates/product-rdf.pt
  lib/lp/registry/templates/project-rdf.pt
-- 
https://code.launchpad.net/~fmarier/launchpad/remove-freshmeat/+merge/233820
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2014-02-26 05:35:04 +0000
+++ lib/lp/registry/browser/product.py	2014-09-08 21:29:33 +0000
@@ -943,13 +943,6 @@
         return self.context.license_status != LicenseStatus.OPEN_SOURCE
 
     @property
-    def freshmeat_url(self):
-        if self.context.freshmeatproject:
-            return ("http://freshmeat.net/projects/%s";
-                % self.context.freshmeatproject)
-        return None
-
-    @property
     def sourceforge_url(self):
         if self.context.sourceforgeproject:
             return ("http://sourceforge.net/projects/%s";
@@ -960,7 +953,6 @@
     def has_external_links(self):
         return (self.context.homepageurl or
                 self.context.sourceforgeproject or
-                self.context.freshmeatproject or
                 self.context.wikiurl or
                 self.context.screenshotsurl or
                 self.context.downloadurl)
@@ -975,7 +967,6 @@
         from lp.services.webapp.menu import MenuLink
         urls = [
             ('Sourceforge project', self.sourceforge_url),
-            ('Freshmeat record', self.freshmeat_url),
             ('Wiki', self.context.wikiurl),
             ('Screenshots', self.context.screenshotsurl),
             ('External downloads', self.context.downloadurl),
@@ -993,7 +984,7 @@
     def should_display_homepage(self):
         return (self.context.homepageurl and
                 self.context.homepageurl not in
-                    [self.freshmeat_url, self.sourceforge_url])
+                    [self.sourceforge_url])
 
     def requestCountry(self):
         return ICountry(self.request, None)
@@ -1340,7 +1331,6 @@
         "homepageurl",
         "information_type",
         "sourceforgeproject",
-        "freshmeatproject",
         "wikiurl",
         "screenshotsurl",
         "downloadurl",
@@ -1781,7 +1771,7 @@
     product = None
     field_names = ['name', 'displayname', 'title', 'summary',
                    'description', 'homepageurl', 'sourceforgeproject',
-                   'freshmeatproject', 'wikiurl', 'screenshotsurl',
+                   'wikiurl', 'screenshotsurl',
                    'downloadurl', 'programminglang',
                    'licenses', 'license_info']
     custom_widget(

=== modified file 'lib/lp/registry/browser/project.py'
--- lib/lp/registry/browser/project.py	2014-02-26 04:47:33 +0000
+++ lib/lp/registry/browser/project.py	2014-09-08 21:29:33 +0000
@@ -390,7 +390,7 @@
         'displayname', 'title', 'summary', 'description',
         'bug_reporting_guidelines', 'bug_reported_acknowledgement',
         'homepageurl', 'bugtracker', 'sourceforgeproject',
-        'freshmeatproject', 'wikiurl']
+        'wikiurl']
 
     @action('Change Details', name='change')
     def edit(self, action, data):

=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py	2013-02-13 14:17:19 +0000
+++ lib/lp/registry/interfaces/product.py	2014-09-08 21:29:33 +0000
@@ -574,7 +574,7 @@
         TextLine(
             title=_('Freshmeat Project'),
             required=False, description=_("""The Freshmeat project name for
-                this project, if it is in freshmeat.""")),
+                this project, if it is in freshmeat. [DEPRECATED]""")),
         exported_as='freshmeat_project')
 
     homepage_content = Text(

=== modified file 'lib/lp/registry/interfaces/projectgroup.py'
--- lib/lp/registry/interfaces/projectgroup.py	2013-01-07 02:40:55 +0000
+++ lib/lp/registry/interfaces/projectgroup.py	2014-09-08 21:29:33 +0000
@@ -244,7 +244,8 @@
         TextLine(
             title=_("Freshmeat Project Name"),
             description=_("The Freshmeat project name for this "
-                          "project group, if it is in Freshmeat."),
+                          "project group, if it is in Freshmeat. "
+                          "[DEPRECATED]"),
             required=False),
         exported_as="freshmeat_project")
 

=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py	2013-10-24 01:32:09 +0000
+++ lib/lp/registry/model/product.py	2014-09-08 21:29:33 +0000
@@ -1842,7 +1842,7 @@
             displayname=displayname, title=title, project=project,
             summary=summary, description=description, homepageurl=homepageurl,
             screenshotsurl=screenshotsurl, wikiurl=wikiurl,
-            downloadurl=downloadurl, freshmeatproject=freshmeatproject,
+            downloadurl=downloadurl, freshmeatproject=None,
             sourceforgeproject=sourceforgeproject,
             programminglang=programminglang,
             project_reviewed=project_reviewed,

=== modified file 'lib/lp/registry/stories/product/xx-product-index.txt'
--- lib/lp/registry/stories/product/xx-product-index.txt	2013-09-27 04:13:23 +0000
+++ lib/lp/registry/stories/product/xx-product-index.txt	2014-09-08 21:29:33 +0000
@@ -33,7 +33,6 @@
 
     >>> tomcat = Product.selectOneBy(name="tomcat")
     >>> tomcat.homepageurl = "http://home.page/";
-    >>> tomcat.freshmeatproject = "fm-tomcat"
     >>> tomcat.sourceforgeproject = "sf-tomcat"
     >>> tomcat.wikiurl = "http://wiki.url/";
     >>> tomcat.screenshotsurl = "http://screenshots.url/";
@@ -53,7 +52,6 @@
     ...     print extract_text(link), link['href']
     Home page http://home.page/
     Sourceforge project http://sourceforge.net/projects/sf-tomcat
-    Freshmeat record http://freshmeat.net/projects/fm-tomcat
     Wiki http://wiki.url/
     Screenshots http://screenshots.url/
     External downloads http://download.url/
@@ -61,8 +59,7 @@
     >>> print extract_text(find_tag_by_id(content, 'product-languages'))
     Programming Languages: C++,Xenon and Purple
 
-When the freshmeat or sourceforge URLs are identical to the homepage, we
-omit the homepage:
+When the sourceforge URL is identical to the homepage, we omit the homepage:
 
     >>> login(ANONYMOUS)
 
@@ -79,27 +76,6 @@
     >>> for link in external_links.findAll('a'):
     ...     print extract_text(link), link['href']
     Sourceforge project http://sourceforge.net/projects/sf-tomcat
-    Freshmeat record http://freshmeat.net/projects/fm-tomcat
-    Wiki http://wiki.url/
-    Screenshots http://screenshots.url/
-    External downloads http://download.url/
-
-    >>> login(ANONYMOUS)
-
-    >>> tomcat = Product.selectOneBy(name="tomcat")
-    >>> tomcat.homepageurl = "http://freshmeat.net/projects/fm-tomcat";
-
-    >>> logout()
-    >>> flush_database_updates()
-    >>> transaction.commit()
-
-    >>> browser.open('http://launchpad.dev/tomcat')
-    >>> content = find_main_content(browser.contents)
-    >>> external_links = find_tag_by_id(content, 'external-links')
-    >>> for link in external_links.findAll('a'):
-    ...     print extract_text(link), link['href']
-    Sourceforge project http://sourceforge.net/projects/sf-tomcat
-    Freshmeat record http://freshmeat.net/projects/fm-tomcat
     Wiki http://wiki.url/
     Screenshots http://screenshots.url/
     External downloads http://download.url/

=== modified file 'lib/lp/registry/templates/product-rdf.pt'
--- lib/lp/registry/templates/product-rdf.pt	2011-05-31 18:29:59 +0000
+++ lib/lp/registry/templates/product-rdf.pt	2014-09-08 21:29:33 +0000
@@ -25,10 +25,6 @@
             1970-01-01 00:00:00
         </lp:creationDate>
         <lp:homepage tal:attributes="rdf:resource context/homepageurl" />
-        <lp:freshmeatProject tal:condition="context/freshmeatproject"
-                             tal:content="context/freshmeatproject">
-            freshmeatproject
-        </lp:freshmeatProject>
         <lp:sourceforgeProject tal:condition="context/sourceforgeproject"
                              tal:content="context/sourceforgeproject">
             sourceforgeproject

=== modified file 'lib/lp/registry/templates/project-rdf.pt'
--- lib/lp/registry/templates/project-rdf.pt	2010-10-15 16:28:56 +0000
+++ lib/lp/registry/templates/project-rdf.pt	2014-09-08 21:29:33 +0000
@@ -27,10 +27,6 @@
         <lp:homepage tal:attributes="rdf:resource context/homepageurl" />
         <lp:wiki tal:condition="context/wikiurl"
                  tal:attributes="rdf:resource context/wikiurl" />
-        <lp:freshmeatProject tal:condition="context/freshmeatproject"
-                             tal:content="context/freshmeatproject">
-            freshmeatproject
-        </lp:freshmeatProject>
         <lp:sourceforgeProject tal:condition="context/sourceforgeproject"
                              tal:content="context/sourceforgeproject">
             sourceforgeproject


Follow ups