launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22248
[Merge] lp:~maxiberta/launchpad/rename-googlesearch-as-sitesearch into lp:launchpad
Maximiliano Bertacchini has proposed merging lp:~maxiberta/launchpad/rename-googlesearch-as-sitesearch into lp:launchpad.
Commit message:
Rename lp.services.googlesearch as lp.services.sitesearch.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~maxiberta/launchpad/rename-googlesearch-as-sitesearch/+merge/341521
Rename lp.services.googlesearch as lp.services.sitesearch. This is the first step towards migrating the site search to Bing Custom Search.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~maxiberta/launchpad/rename-googlesearch-as-sitesearch into lp:launchpad.
=== modified file 'lib/lp/app/browser/root.py'
--- lib/lp/app/browser/root.py 2017-11-18 13:29:18 +0000
+++ lib/lp/app/browser/root.py 2018-03-16 14:33:02 +0000
@@ -39,7 +39,7 @@
from lp.registry.interfaces.product import IProductSet
from lp.services.config import config
from lp.services.features import getFeatureFlag
-from lp.services.googlesearch.interfaces import (
+from lp.services.sitesearch.interfaces import (
GoogleResponseError,
ISearchService,
)
=== modified file 'lib/lp/app/browser/tests/launchpad-search-pages.txt'
--- lib/lp/app/browser/tests/launchpad-search-pages.txt 2018-02-02 10:02:16 +0000
+++ lib/lp/app/browser/tests/launchpad-search-pages.txt 2018-03-16 14:33:02 +0000
@@ -642,7 +642,7 @@
the first 20 items are None. Only the last 5 items are PageMatches.
>>> from lp.app.browser.root import WindowedList
- >>> from lp.services.googlesearch import GoogleSearchService
+ >>> from lp.services.sitesearch import GoogleSearchService
>>> google_search = GoogleSearchService()
>>> page_matches = google_search.search(terms='bug', start=20)
=== modified file 'lib/lp/scripts/runlaunchpad.py'
--- lib/lp/scripts/runlaunchpad.py 2017-12-19 17:16:38 +0000
+++ lib/lp/scripts/runlaunchpad.py 2018-03-16 14:33:02 +0000
@@ -19,7 +19,7 @@
from lp.services.config import config
from lp.services.daemons import tachandler
-from lp.services.googlesearch import googletestservice
+from lp.services.sitesearch import googletestservice
from lp.services.mailman import runmailman
from lp.services.osutils import ensure_directory_exists
from lp.services.pidfile import (
=== modified file 'lib/lp/services/config/schema-lazr.conf'
--- lib/lp/services/config/schema-lazr.conf 2018-01-31 01:19:06 +0000
+++ lib/lp/services/config/schema-lazr.conf 2018-03-16 14:33:02 +0000
@@ -763,15 +763,14 @@
distroseries: experimental
pocketrelease: experimental
-
[google_test_service]
# Run a web service stub that simulates the Google search service.
# Where are our canned XML responses stored?
-canned_response_directory: lib/lp/services/googlesearch/tests/data/
+canned_response_directory: lib/lp/services/sitesearch/tests/data/
# Which file maps service URLs to the XML that the server returns?
-mapfile: lib/lp/services/googlesearch/tests/data/mapping.txt
+mapfile: lib/lp/services/sitesearch/tests/data/googlesearchservice-mapping.txt
# Where should the service log files live?
log: logs/google-stub.log
@@ -779,7 +778,6 @@
# Do we actually want to run the service?
launch: False
-
[google]
# client_id is the unique id Launchpad was issued by Google.
# datatype: string
=== modified file 'lib/lp/services/configure.zcml'
--- lib/lp/services/configure.zcml 2015-09-18 01:32:20 +0000
+++ lib/lp/services/configure.zcml 2018-03-16 14:33:02 +0000
@@ -11,7 +11,7 @@
<include package=".feeds" />
<include package=".fields" />
<include package=".geoip" />
- <include package=".googlesearch" />
+ <include package=".sitesearch" />
<include package=".gpg" />
<include package=".identity" />
<include package=".inlinehelp" file="meta.zcml" />
=== renamed directory 'lib/lp/services/googlesearch' => 'lib/lp/services/sitesearch'
=== modified file 'lib/lp/services/sitesearch/__init__.py'
--- lib/lp/services/googlesearch/__init__.py 2016-04-19 14:23:22 +0000
+++ lib/lp/services/sitesearch/__init__.py 2018-03-16 14:33:02 +0000
@@ -24,7 +24,7 @@
from zope.interface import implementer
from lp.services.config import config
-from lp.services.googlesearch.interfaces import (
+from lp.services.sitesearch.interfaces import (
GoogleResponseError,
GoogleWrongGSPVersion,
ISearchResult,
=== modified file 'lib/lp/services/sitesearch/configure.zcml'
--- lib/lp/services/googlesearch/configure.zcml 2011-03-07 16:32:12 +0000
+++ lib/lp/services/sitesearch/configure.zcml 2018-03-16 14:33:02 +0000
@@ -6,18 +6,18 @@
xmlns="http://namespaces.zope.org/zope">
<class
- class="lp.services.googlesearch.PageMatch">
- <allow interface="lp.services.googlesearch.interfaces.ISearchResult" />
+ class="lp.services.sitesearch.PageMatch">
+ <allow interface="lp.services.sitesearch.interfaces.ISearchResult" />
</class>
<class
- class="lp.services.googlesearch.PageMatches">
- <allow interface="lp.services.googlesearch.interfaces.ISearchResults" />
+ class="lp.services.sitesearch.PageMatches">
+ <allow interface="lp.services.sitesearch.interfaces.ISearchResults" />
</class>
<securedutility
- class="lp.services.googlesearch.GoogleSearchService"
- provides="lp.services.googlesearch.interfaces.ISearchService">
- <allow interface="lp.services.googlesearch.interfaces.ISearchService" />
+ class="lp.services.sitesearch.GoogleSearchService"
+ provides="lp.services.sitesearch.interfaces.ISearchService">
+ <allow interface="lp.services.sitesearch.interfaces.ISearchService" />
</securedutility>
</configure>
=== modified file 'lib/lp/services/sitesearch/doc/google-searchservice.txt'
--- lib/lp/services/googlesearch/doc/google-searchservice.txt 2015-03-11 11:59:27 +0000
+++ lib/lp/services/sitesearch/doc/google-searchservice.txt 2018-03-16 14:33:02 +0000
@@ -20,7 +20,7 @@
>>> from zope.component import getUtility
>>> from zope.interface.verify import verifyObject
- >>> from lp.services.googlesearch.interfaces import (
+ >>> from lp.services.sitesearch.interfaces import (
... ISearchService)
>>> google_search = getUtility(ISearchService)
@@ -38,7 +38,7 @@
argument of start. The terms are the same as the text that would be
entered in Google search form; the terms should not be escaped.
- >>> from lp.services.googlesearch.interfaces import (
+ >>> from lp.services.sitesearch.interfaces import (
... ISearchResults)
>>> first_page_matches = google_search.search(terms='bug')
@@ -127,8 +127,8 @@
set. It is created by passing a title, url, and a summary. It is
an implementation of ISearchResult.
- >>> from lp.services.googlesearch.interfaces import ISearchResult
- >>> from lp.services.googlesearch import PageMatch
+ >>> from lp.services.sitesearch.interfaces import ISearchResult
+ >>> from lp.services.sitesearch import PageMatch
>>> page_match = PageMatch(
... u'Unicode Titles in Launchpad',
@@ -161,7 +161,7 @@
configuration may set a testing site.
>>> from lp.services.config import config
- >>> from lp.services.googlesearch import GoogleSearchService
+ >>> from lp.services.sitesearch import GoogleSearchService
>>> google_search = GoogleSearchService()
>>> config.google.site == google_search.site
=== modified file 'lib/lp/services/sitesearch/doc/google-service-stub.txt.disabled'
--- lib/lp/services/googlesearch/doc/google-service-stub.txt.disabled 2011-12-29 05:29:36 +0000
+++ lib/lp/services/sitesearch/doc/google-service-stub.txt.disabled 2018-03-16 14:33:02 +0000
@@ -14,7 +14,7 @@
determines which XML files will be returned when a specific URL is
accessed.
- >>> from lp.services.googlesearch.googletestservice import (
+ >>> from lp.services.sitesearch.googletestservice import (
... url_to_xml_map)
>>> routes = url_to_xml_map()
=== renamed file 'lib/lp/services/googlesearch/tests/data/mapping.txt' => 'lib/lp/services/sitesearch/tests/data/googlesearchservice-mapping.txt'
=== modified file 'lib/lp/services/sitesearch/tests/googleserviceharness.py'
--- lib/lp/services/googlesearch/tests/googleserviceharness.py 2012-06-29 08:40:05 +0000
+++ lib/lp/services/sitesearch/tests/googleserviceharness.py 2018-03-16 14:33:02 +0000
@@ -14,7 +14,7 @@
import os
import signal
-from lp.services.googlesearch import googletestservice
+from lp.services.sitesearch import googletestservice
class GoogleServiceTestSetup:
@@ -27,7 +27,7 @@
# to the docstring above. Note that the test that uses this setup,
# google-service-stub.txt, is also disabled. See test_doc.py.
"""
- >>> from lp.services.googlesearch.googletestservice import (
+ >>> from lp.services.sitesearch.googletestservice import (
... service_is_available)
>>> from lp.services.config import config
=== modified file 'lib/lp/services/sitesearch/tests/test_google.py'
--- lib/lp/services/googlesearch/tests/test_google.py 2016-04-19 14:23:22 +0000
+++ lib/lp/services/sitesearch/tests/test_google.py 2018-03-16 14:33:02 +0000
@@ -12,8 +12,8 @@
HTTPError,
)
-from lp.services.googlesearch import GoogleSearchService
-from lp.services.googlesearch.interfaces import GoogleResponseError
+from lp.services.sitesearch import GoogleSearchService
+from lp.services.sitesearch.interfaces import GoogleResponseError
from lp.services.timeout import TimeoutError
from lp.testing import TestCase
from lp.testing.layers import LaunchpadFunctionalLayer
=== modified file 'lib/lp/services/sitesearch/tests/test_googleharness.py'
--- lib/lp/services/googlesearch/tests/test_googleharness.py 2011-03-07 16:32:12 +0000
+++ lib/lp/services/sitesearch/tests/test_googleharness.py 2018-03-16 14:33:02 +0000
@@ -6,5 +6,5 @@
def test_suite():
return doctest.DocTestSuite(
- 'lp.services.googlesearch.tests.googleserviceharness',
+ 'lp.services.sitesearch.tests.googleserviceharness',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
=== modified file 'lib/lp/services/sitesearch/tests/test_googleservice.py'
--- lib/lp/services/googlesearch/tests/test_googleservice.py 2018-01-02 10:54:31 +0000
+++ lib/lp/services/sitesearch/tests/test_googleservice.py 2018-03-16 14:33:02 +0000
@@ -12,7 +12,7 @@
import os
import unittest
-from lp.services.googlesearch import googletestservice
+from lp.services.sitesearch import googletestservice
from lp.services.pidfile import pidfile_path
=== modified file 'lib/lp/services/sitesearch/tests/test_pagematch.py'
--- lib/lp/services/googlesearch/tests/test_pagematch.py 2012-01-01 02:58:52 +0000
+++ lib/lp/services/sitesearch/tests/test_pagematch.py 2018-03-16 14:33:02 +0000
@@ -5,7 +5,7 @@
__metaclass__ = type
-from lp.services.googlesearch import PageMatch
+from lp.services.sitesearch import PageMatch
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
=== modified file 'lib/lp/testing/layers.py'
--- lib/lp/testing/layers.py 2016-12-22 16:32:38 +0000
+++ lib/lp/testing/layers.py 2018-03-16 14:33:02 +0000
@@ -113,7 +113,7 @@
)
from lp.services.database.interfaces import IStore
from lp.services.database.sqlbase import session_store
-from lp.services.googlesearch.tests.googleserviceharness import (
+from lp.services.sitesearch.tests.googleserviceharness import (
GoogleServiceTestSetup,
)
from lp.services.job.tests import celery_worker
=== modified file 'setup.py'
--- setup.py 2018-02-26 12:22:07 +0000
+++ setup.py 2018-03-16 14:33:02 +0000
@@ -288,7 +288,7 @@
'lp.services.twistedsupport.plugincache:main',
'combine-css = lp.scripts.utilities.js.combinecss:main',
'googletestservice = '
- 'lp.services.googlesearch.googletestservice:main',
+ 'lp.services.sitesearch.googletestservice:main',
'harness = lp.scripts.harness:python',
'iharness = lp.scripts.harness:ipython',
'ipy = IPython.frontend.terminal.ipapp:launch_new_instance',
Follow ups