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 +
+++ lib/lp/app/browser/root.py 2018-03-16 14:33:02 +
@@ -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 +
+++ lib/lp/app/browser/tests/launchpad-search-pages.txt 2018-03-16 14:33:02 +
@@ -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 +
+++ lib/lp/scripts/runlaunchpad.py 2018-03-16 14:33:02 +
@@ -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 +
+++ lib/lp/services/config/schema-lazr.conf 2018-03-16 14:33:02 +
@@ -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 +
+++ lib/lp/services/configure.zcml 2018-03-16 14:33:02 +
@@ -11,7 +11,7 @@
-
+
=== 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 +
+++ lib/lp/services/sitesearch/__init__.py 2018-03-16 14:33:02 +
@@ -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 +
+++ lib/lp/services/sitesearch/configure.zcml 2018-03-16 14:33:02 +
@@ -6,18 +6,18 @@
xmlns="http://namespaces.zope.org/zope;>
-
+class="lp.services.sitesearch.PageMatch">
+
-
+class="lp.services.sitesearch.PageMatches">
+
-
+class="lp.services.sitesearch.GoogleSearchService"
+provides="lp.services.sitesearch.interfaces.ISearchService">
+
=== modified file 'lib/lp/services/sitesearch/doc/google-searchservice.txt'
--- lib/lp/services/googlesearch/doc/google-searchservice.txt 2015-03-11 11:59:27 +
+++ lib/lp/services/sitesearch/doc/google-searchservice.txt 2018-03-16 14:33:02 +
@@ -20,7 +20,7 @@
>>> from zope.component import getUtility