search*: Type origin_search(...) -> PagedResult[Dict]
Returned paginated result with PagedResult object.
The result per page is kept as a Dict because it could be enriched. It'd be less effort to enrich it with Dict instead of a model object Origin (that has very little chance to grow new interesting fields).
Impacts swh-web (swh-web!1011 (closed))
grep -r 'origin_search(' */swh/** | grep -v "swh-storage"
swh-search/swh/search/elasticsearch.py: def origin_search(
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="foobar")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="barb")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="bar")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="barbaz")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="qu")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="qux")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="foo bar baz")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="foobar", with_visit=True)
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="foobar", with_visit=True)
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(url_pattern="foobar", with_visit=True)
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="foo")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="foo bar")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="bar baz")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="foo bar baz")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="foo")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="foo bar")
swh-search/swh/search/tests/test_search.py: actual_page = self.search.origin_search(metadata_pattern="bar baz")
swh-search/swh/search/tests/test_cli.py: actual_page = swh_search.origin_search(url_pattern="foobar")
swh-search/swh/search/tests/test_cli.py: actual_page = swh_search.origin_search(url_pattern="foobar", with_visit=True)
swh-search/swh/search/tests/test_cli.py: actual_page = swh_search.origin_search(url_pattern="foobar", with_visit=False)
swh-search/swh/search/tests/test_cli.py: actual_page = swh_search.origin_search(url_pattern="foobar", with_visit=True)
swh-search/swh/search/in_memory.py: def origin_search(
swh-web/swh/web/api/views/origin.py:def api_origin_search(request, url_pattern):
swh-web/swh/web/common/service.py: results = search.origin_search(
swh-web/swh/web/common/service.py: origins_raw = storage.origin_search(
swh-web/swh/web/assets/src/bundles/browse/origin-search.js: baseSearchUrl = new URL(Urls.api_1_origin_search(searchQueryText), window.location);
swh-web/swh/web/tests/api/views/test_origin.py:def test_api_origin_search(api_client, mocker, backend):
Related to T645
Test Plan
tox
Migrated from D3657 (view on Phabricator)