Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
majsan committed Feb 6, 2024
1 parent a51e740 commit 1cce55e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions karp-backend/src/karp/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from karp.lex_infrastructure import GenericLexInfrastructure, LexInfrastructure
from karp.search_infrastructure import (
GenericSearchInfrastructure,
Es6SearchIndexMod,
)
from karp.main import config, modules
Expand Down Expand Up @@ -77,7 +76,6 @@ def _setup_dependency_injection(
ElasticSearchMod(es_url),
LexInfrastructure(),
GenericLexInfrastructure(),
GenericSearchInfrastructure(),
],
auto_bind=False,
)
Expand Down
2 changes: 0 additions & 2 deletions karp-backend/src/karp/main/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from karp.lex.application.repositories import ResourceRepository
from karp.lex_infrastructure import ResourceQueries, GenericEntryViews
from karp.resource_commands import ResourceCommands
from karp.search.generic_resources import GenericResourceViews
from karp.search_commands import SearchCommands
from karp.search_infrastructure.repositories.es6_indicies import Es6Index

Expand Down Expand Up @@ -85,7 +84,6 @@ def entry_commands(
session: Session,
resources: ResourceRepository,
index: Es6Index,
resource_views: GenericResourceViews,
) -> EntryCommands:
return EntryCommands(
session=session,
Expand Down
12 changes: 0 additions & 12 deletions karp-backend/src/karp/search/generic_resources.py

This file was deleted.

9 changes: 0 additions & 9 deletions karp-backend/src/karp/search_infrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,16 @@
import injector
import logging

from karp.lex.application.repositories import ResourceRepository

from karp.search_infrastructure.queries import (
Es6SearchService,
)
from karp.search_infrastructure.repositories.es6_indicies import Es6Index
from karp.search_infrastructure.elasticsearch6 import Es6MappingRepository
from karp.search.generic_resources import GenericResourceViews


logger = logging.getLogger(__name__)


class GenericSearchInfrastructure(injector.Module): # noqa: D101
@injector.provider
def get_resource_config(self, resources: ResourceRepository) -> GenericResourceViews:
return GenericResourceViews(resources=resources)


class Es6SearchIndexMod(injector.Module): # noqa: D101
def __init__(self, index_prefix: Optional[str] = None) -> None: # noqa: D107
self._index_prefix = index_prefix or ""
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Pytest entry point."""


import pytest # noqa: I001
import injector
import pytest # pyre-ignore # noqa: F811
from sqlalchemy import create_engine
Expand All @@ -10,7 +9,6 @@
from alembic.config import main as alembic_main # noqa: F401

from tests.unit.lex.adapters import InMemoryLexInfrastructure
from karp.search_infrastructure import GenericSearchInfrastructure
from karp.main.modules import CommandsMod
from karp.lex_infrastructure import GenericLexInfrastructure

Expand Down Expand Up @@ -45,7 +43,6 @@ def integration_ctx() -> adapters.IntegrationTestContext:
CommandsMod(),
GenericLexInfrastructure(),
InMemoryLexInfrastructure(),
GenericSearchInfrastructure(),
search_adapters.InMemorySearchInfrastructure(),
],
auto_bind=False,
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/search/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from karp.lex_infrastructure import GenericLexInfrastructure
from karp.main.modules import CommandsMod
from karp.search_infrastructure import GenericSearchInfrastructure
from tests.unit.lex.adapters import InMemoryLexInfrastructure

from . import adapters
Expand All @@ -16,7 +15,6 @@ def search_unit_ctx() -> adapters.SearchUnitTestContext:
CommandsMod(),
GenericLexInfrastructure(),
InMemoryLexInfrastructure(),
GenericSearchInfrastructure(),
adapters.InMemorySearchInfrastructure(),
],
auto_bind=False,
Expand Down

0 comments on commit 1cce55e

Please sign in to comment.