Skip to content

Commit

Permalink
✨ (context) Add make_fingerprint_id to context
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Sep 6, 2024
1 parent 1535176 commit 192bf05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion investigraph/model/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from anystore.io import smart_write
from followthemoney.util import make_entity_id
from ftmq.util import join_slug
from ftmq.util import join_slug, make_fingerprint_id
from nomenklatura.entity import CE, CompositeEntity
from prefect import get_run_logger
from prefect.exceptions import MissingContextError
Expand Down Expand Up @@ -77,6 +77,10 @@ def make_id(self, *args, **kwargs) -> str:
prefix = kwargs.pop("prefix", self.prefix)
return join_slug(make_entity_id(*args), prefix=prefix)

def make_fingerprint_id(self, *args, **kwargs) -> str:
prefix = kwargs.pop("prefix", self.prefix)
return join_slug(make_fingerprint_id(*args), prefix=prefix)

def make_cache_key(self, *args: Iterable[str]) -> str:
return join_slug(*args, sep="#")

Expand Down

0 comments on commit 192bf05

Please sign in to comment.