Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
7 changes: 5 additions & 2 deletions knowledge_graph/querying.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import functools
from typing import Callable, Dict, FrozenSet, Iterable, Optional, Tuple

import deprecated
import gamla

from . import (
Expand Down Expand Up @@ -195,9 +196,11 @@ def find_exactly(text: str):
)


title_or_node_id = gamla.first(
get_node_title, storage.node_id, exception_type=NodeTitleMissing
@deprecated.deprecated(
reason="ID can be anything, which makes this function unexpected. Use `get_node_title` or 'node_id' instead."
)
def title_or_node_id(node: storage.Node) -> str:
return gamla.first(get_node_title, storage.node_id, exception_type=NodeTitleMissing)(node)


@gamla.curry
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
packages=setuptools.find_namespace_packages(),
install_requires=[
"dataclasses_json==0.5.7",
"immutables",
"deprecated",
"immutables>=0.18",
"pytest",
"phonenumbers",
],
Expand Down