Skip to content

Commit

Permalink
Merge pull request #144 from pepkit/schams2.0
Browse files Browse the repository at this point in the history
added namespace to search
  • Loading branch information
khoroshevskyi authored Jul 25, 2024
2 parents bc97704 + c978a5d commit 7fe1bc3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pepdbagent/modules/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def _add_condition(
search_query = or_(
Schemas.name.ilike(sql_search_str),
Schemas.description.ilike(sql_search_str),
Schemas.namespace.ilike(sql_search_str),
)
statement = statement.where(search_query)
if namespace:
Expand Down
2 changes: 1 addition & 1 deletion pepdbagent/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def schema_path_converter(schema_path: str) -> Tuple[str, str]:
if "/" in schema_path:
namespace, name = schema_path.split("/")
return namespace, name
raise RegistryPathError(f"Error in: '{schema_path}'")
raise RegistryPathError(f"Incorrect schema registry path: '{schema_path}'")


def tuple_converter(value: Union[tuple, list, str, None]) -> tuple:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
not PEPDBAgentContextManager().db_setup(),
reason="DB is not setup",
)
class TestSamples:
class TestSchemas:

@pytest.mark.parametrize(
"namespace, name",
Expand Down

0 comments on commit 7fe1bc3

Please sign in to comment.