Skip to content

Commit

Permalink
fix sand-drepr dependency injection and python version
Browse files Browse the repository at this point in the history
  • Loading branch information
Binh Vu committed Aug 19, 2024
1 parent ef07f76 commit d8442bf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
Empty file added extensions/sand_drepr/README.md
Empty file.
2 changes: 1 addition & 1 deletion extensions/sand_drepr/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "3.9"
python = "^3.9"
drepr-v2 = "^1.3.4"

[build-system]
Expand Down
1 change: 1 addition & 0 deletions sand/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def use_container(config_file: Optional[Path | str] = None):
"sand.models",
"sand.extensions.assistants",
"sand.extensions.search",
"sand_drepr.main",
"sand.deserializer",
"sand.serializer",
"sand.helpers",
Expand Down
2 changes: 1 addition & 1 deletion sand/extensions/search/default_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import List, Mapping, TypeVar

from dependency_injector.wiring import Provide, inject

from sand.extension_interface.search import IEntitySearch, IOntologySearch, SearchResult
from sand.models.entity import Entity
from sand.models.ontology import OntClass, OntProperty
Expand Down Expand Up @@ -44,6 +43,7 @@ def local_search(self, mapping: Mapping[str, T], search_text: str) -> list[T]:
label = object.label.lower()
if all(token in label for token in query_tokens):
search_results.append(object)

return search_results

def find_class_by_name(self, search_text: str) -> List[SearchResult]:
Expand Down

0 comments on commit d8442bf

Please sign in to comment.