This also:
- fixes slight inconsistencies we had.
- add tests to ensure signatures match (ala storage but in a dedicated tests because fixture hell)
Related to T2516
Differential D3685
swh.search: Define an interface for search backends and use it ardumont on Aug 2 2020, 11:11 AM. Authored by
Details
This also:
Related to T2516 tox
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D3685 (id=12975)Could not rebase; Attempt merge onto d285cd3f3b... Updating d285cd3..2cbd837 Fast-forward requirements-test.txt | 1 + swh/search/__init__.py | 53 +++++++++++++++------- swh/search/api/client.py | 6 +-- swh/search/api/server.py | 6 +-- swh/search/elasticsearch.py | 9 +--- swh/search/in_memory.py | 6 +-- swh/search/interface.py | 54 ++++++++++++++++++++++- swh/search/tests/conftest.py | 2 +- swh/search/tests/test_api_client.py | 6 +-- swh/search/tests/test_in_memory.py | 4 +- swh/search/tests/test_init.py | 88 +++++++++++++++++++++++++++++++++++++ 11 files changed, 194 insertions(+), 41 deletions(-) create mode 100644 swh/search/tests/test_init.py Changes applied before testcommit 2cbd837e9a631478f68810528139980d41b5c3a9 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:09:33 2020 +0200 swh.search: Define an interface for search backends and use it Related to T645 commit 58faacb5e95dc3bd9a55ec39c8bf06287b75879d Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:05:07 2020 +0200 swh.search.get_search: Simplify instantiation This aligns with other get_* functions. This also adds tests to this part. This is preparatory work to improve and type properly this module without duplication. Related to T645 See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/31/ for more details. Comment Actions You can remove docstrings from elasticsearch.py.
Comment Actions Drop elasticsearch docstrings which are now defined in the interface (I thought Comment Actions Build is green Patch application report for D3685 (id=12979)Could not rebase; Attempt merge onto d285cd3f3b... Updating d285cd3..d040806 Fast-forward requirements-test.txt | 1 + swh/search/__init__.py | 53 ++++++++++++++++------- swh/search/api/client.py | 6 +-- swh/search/api/server.py | 6 +-- swh/search/elasticsearch.py | 9 +--- swh/search/in_memory.py | 6 +-- swh/search/interface.py | 54 ++++++++++++++++++++++- swh/search/tests/conftest.py | 2 +- swh/search/tests/test_api_client.py | 6 +-- swh/search/tests/test_in_memory.py | 4 +- swh/search/tests/test_init.py | 86 +++++++++++++++++++++++++++++++++++++ 11 files changed, 192 insertions(+), 41 deletions(-) create mode 100644 swh/search/tests/test_init.py Changes applied before testcommit d0408062a6889aa3db2eb55cce282da170ec5da3 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:09:33 2020 +0200 swh.search: Define an interface for search backends and use it Related to T645 commit 46af49019c220ad4f398944bf43130bd26288cda Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:05:07 2020 +0200 swh.search.get_search: Simplify instantiation This aligns with other get_* functions. This also adds tests to this part. This is preparatory work to improve and type properly this module without duplication. Related to T645 See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/34/ for more details. Comment Actions Build is green Patch application report for D3685 (id=12980)Could not rebase; Attempt merge onto d285cd3f3b... Updating d285cd3..56f9458 Fast-forward requirements-test.txt | 1 + swh/search/__init__.py | 53 ++++++++++++++++------- swh/search/api/client.py | 6 +-- swh/search/api/server.py | 6 +-- swh/search/elasticsearch.py | 27 +----------- swh/search/in_memory.py | 6 +-- swh/search/interface.py | 54 ++++++++++++++++++++++- swh/search/tests/conftest.py | 2 +- swh/search/tests/test_api_client.py | 6 +-- swh/search/tests/test_in_memory.py | 4 +- swh/search/tests/test_init.py | 86 +++++++++++++++++++++++++++++++++++++ 11 files changed, 192 insertions(+), 59 deletions(-) create mode 100644 swh/search/tests/test_init.py Changes applied before testcommit 56f94586de0683d28559be34b2db791466f5d76c Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:09:33 2020 +0200 swh.search: Define an interface for search backends and use it Related to T645 commit 46af49019c220ad4f398944bf43130bd26288cda Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Sun Aug 2 11:05:07 2020 +0200 swh.search.get_search: Simplify instantiation This aligns with other get_* functions. This also adds tests to this part. This is preparatory work to improve and type properly this module without duplication. Related to T645 See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/35/ for more details. |