diff --git a/src/matchbox/common/hash.py b/src/matchbox/common/hash.py index fe4610d..3150f95 100644 --- a/src/matchbox/common/hash.py +++ b/src/matchbox/common/hash.py @@ -14,7 +14,7 @@ T = TypeVar("T") HashableItem = TypeVar("HashableItem", bytes, bool, str, int, float, bytearray) -HASH_FUNC = hashlib.sha1 +HASH_FUNC = hashlib.sha256 def dataset_to_hashlist(dataset: Source, model_hash: bytes) -> list[dict[str, Any]]: diff --git a/src/matchbox/server/postgresql/utils/insert.py b/src/matchbox/server/postgresql/utils/insert.py index cb2e9a9..3d9ba75 100644 --- a/src/matchbox/server/postgresql/utils/insert.py +++ b/src/matchbox/server/postgresql/utils/insert.py @@ -113,7 +113,7 @@ def insert_model( Args: model: Name of the new model left: Name of the left parent model - right: Name of the left parent model. Same as left in a link job + right: Name of the right parent model. Same as left in a link job description: Model description engine: SQLAlchemy engine instance @@ -139,7 +139,8 @@ def insert_model( session.flush() def _create_closure_entries(parent_model: Models) -> None: - """Create closure entries for the new model.""" + """Create closure entries for the new model, i.e. mappings between + nodes and any of their direct or indirect parents""" session.add( ModelsFrom( parent=parent_model.hash, diff --git a/test/client/test_linkers.py b/test/client/test_linkers.py index 0c30d0f..5b75f6f 100644 --- a/test/client/test_linkers.py +++ b/test/client/test_linkers.py @@ -37,7 +37,6 @@ def test_linkers( 1. That the input data is as expected 2. That the data is linked correctly 3. That the linked probabilities are inserted correctly - 4. That the correct number of clusters are resolved 4. That the correct number of clusters are resolved and inserted correctly """ # i. Ensure database is ready, collect fixtures, perform any special linker cleaning