From 6f7619fc363f2b313b24b641c54b3f042ebdc328 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Wed, 4 Nov 2026 15:40:13 +0100 Subject: [PATCH] Allow for middle names and initials when matching a Person with existence_match="normalized" With existence_match="normalized", a Person that has no ORCID match is now looked for by name allowing for middle names that appear in only one of the given names, and for initials in place of names, so "James Maxwell" and "J. Clerk Maxwell" both find an existing "James Clerk Maxwell". The first given names must correspond, so "Clerk Maxwell" does not. Family names must still be equivalent, ignoring case, accents and whitespace. If several people match, one whose given names match exactly (ignoring case) is preferred, then one whose given names are equivalent. As before, the stored names are adopted, so saving does not remove a stored middle name. The matching is done in Person's override of _find_matching_instances() and _adopt_matched_values(), in builder/additional_methods, with new helpers split_given_names(), given_names_compatible() and build_given_name_regex() in fairgraph.utility.name_matching. --- builder/additional_methods/Person.py.txt | 66 +++++++++++++++- builder/update_openminds.py | 8 ++ doc/creatingupdating.rst | 9 +++ doc/release_notes.rst | 2 + fairgraph/openminds/v4/core/actors/person.py | 75 +++++++++++++++++- fairgraph/openminds/v5/core/actors/person.py | 75 +++++++++++++++++- fairgraph/utility/name_matching.py | 81 ++++++++++++++++++++ test/test_name_matching.py | 80 +++++++++++++++++++ test/test_openminds_core.py | 73 ++++++++++++++++++ 9 files changed, 466 insertions(+), 3 deletions(-) diff --git a/builder/additional_methods/Person.py.txt b/builder/additional_methods/Person.py.txt index 5fedc3a7..4a0ba8b9 100644 --- a/builder/additional_methods/Person.py.txt +++ b/builder/additional_methods/Person.py.txt @@ -23,9 +23,73 @@ return person def _find_matching_instances(self, client, in_spaces=None, existence_match="equals"): - # with existence_match="normalized", look for the same ORCID before looking for the same name + # with existence_match="normalized", look for the same ORCID before looking for the same name, + # and allow for middle names and initials in the given names if existence_match == "normalized": instances = self._find_by_identifiers(client, ("ORCID",), in_spaces=in_spaces) if instances: return instances + if ( + isinstance(self.given_name, str) + and split_given_names(self.given_name) + and isinstance(self.family_name, str) + and self.family_name.strip() + ): + return self._find_by_compatible_names(client, in_spaces=in_spaces) return super()._find_matching_instances(client, in_spaces=in_spaces, existence_match=existence_match) + + def _find_by_compatible_names(self, client, in_spaces=None): + """ + Look for people with an equivalent family name (see `names_equivalent()`) and compatible given names + (see `given_names_compatible()`), so that "James Maxwell", "James C. Maxwell" and "J. Clerk Maxwell" + are all found from "James Clerk Maxwell". + + If exactly one of them has the same given names (ignoring case), only that one is returned; + otherwise, if exactly one has equivalent given names, only that one; otherwise all of them. + """ + query_filter = { + "given_name": Regex(build_given_name_regex(self.given_name)), + "family_name": Regex(build_normalized_regex(self.family_name)), + } + compatible = [] + equivalent = [] + exact = [] + for instance in self._run_minimal_query(client, query_filter, in_spaces=in_spaces): + data = client.instance_from_full_uri(instance["@id"], use_cache=True, release_status="any") + if data is None: + continue + stored_values = self.__class__._deserialize_data(data) + stored_given_name = stored_values.get("given_name", None) + stored_family_name = stored_values.get("family_name", None) + if not (isinstance(stored_given_name, str) and isinstance(stored_family_name, str)): + continue + if not ( + names_equivalent(stored_family_name, self.family_name) + and given_names_compatible(stored_given_name, self.given_name) + ): + continue + compatible.append(instance) + if names_equivalent(stored_given_name, self.given_name): + equivalent.append(instance) + if ( + stored_given_name.lower() == self.given_name.lower() + and stored_family_name.lower() == self.family_name.lower() + ): + exact.append(instance) + for candidates in (exact, equivalent): + if len(candidates) == 1: + return candidates + return compatible + + def _adopt_matched_values(self, data, existence_match): + super()._adopt_matched_values(data, existence_match) + # with existence_match="normalized", the given names may differ by more than names_equivalent() allows + if existence_match == "normalized": + stored_given_name = self.__class__._deserialize_data(data).get("given_name", None) + if ( + isinstance(stored_given_name, str) + and isinstance(self.given_name, str) + and stored_given_name != self.given_name + and given_names_compatible(stored_given_name, self.given_name) + ): + self.given_name = stored_given_name diff --git a/builder/update_openminds.py b/builder/update_openminds.py index be287297..e39b6955 100644 --- a/builder/update_openminds.py +++ b/builder/update_openminds.py @@ -773,6 +773,14 @@ def get_controlled_terms_table(type_): "CommonCoordinateSpaceVersion": preamble_for_download, "CommonCoordinateFrameworkVersion": preamble_for_download, "AnatomicalAtlasVersion": preamble_for_download, + "Person": """from fairgraph.queries import Regex +from fairgraph.utility.name_matching import ( + build_given_name_regex, + build_normalized_regex, + given_names_compatible, + names_equivalent, + split_given_names, +)""", "ScholarlyArticle": """from fairgraph.utility import as_list from .publication_issue import PublicationIssue from .periodical import Periodical""", diff --git a/doc/creatingupdating.rst b/doc/creatingupdating.rst index f70bb398..ce7e9bb4 100644 --- a/doc/creatingupdating.rst +++ b/doc/creatingupdating.rst @@ -66,6 +66,15 @@ an ORCID or a ROR ID, respectively, in :attr:`digital_identifiers` are first loo and by name only if no node has it. A node found by its identifier is updated with the local names if they differ. +When looking for a :class:`Person` by name with ``existence_match="normalized"``, the given names may +also differ by middle names that appear in only one of them, and by initials in place of names, +so "James Maxwell", "James C. Maxwell" and "J. Clerk Maxwell" all find an existing "James Clerk Maxwell". +The first given names must correspond, however: "Clerk Maxwell" does not. Family names must still match +as described above. If several nodes match, one whose given names match exactly (ignoring case) is preferred, +then one whose given names differ only in case, accents or whitespace. As before, the object takes the +names stored in the Knowledge Graph, so saving "James Maxwell" does not remove the middle name of an existing +"James Clerk Maxwell". + Saving child nodes ================== diff --git a/doc/release_notes.rst b/doc/release_notes.rst index f5fa41b2..39f8b9d1 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -15,6 +15,8 @@ Matching names when saving "Émilie du Châtelet" rather than creating a duplicate. If several instances match, one that matches exactly (ignoring case) is preferred. In this mode, :class:`~fairgraph.openminds.core.Person` and :class:`~fairgraph.openminds.core.Organization` are first looked for by ORCID or ROR ID, respectively. + A :class:`~fairgraph.openminds.core.Person` is then looked for by name allowing for middle names and initials, + so "James Maxwell" and "J. Clerk Maxwell" both find an existing "James Clerk Maxwell". The default, ``existence_match="equals"``, is unchanged (`#184 `_). diff --git a/fairgraph/openminds/v4/core/actors/person.py b/fairgraph/openminds/v4/core/actors/person.py index 6e98c9c3..d152a1b3 100644 --- a/fairgraph/openminds/v4/core/actors/person.py +++ b/fairgraph/openminds/v4/core/actors/person.py @@ -8,6 +8,15 @@ from openminds.v4.core import Person as OMPerson from fairgraph import KGObject +from fairgraph.queries import Regex +from fairgraph.utility.name_matching import ( + build_given_name_regex, + build_normalized_regex, + given_names_compatible, + names_equivalent, + split_given_names, +) + class Person(KGObject, OMPerson): """ @@ -237,9 +246,73 @@ def me(cls, client, allow_multiple=False, follow_links=None): return person def _find_matching_instances(self, client, in_spaces=None, existence_match="equals"): - # with existence_match="normalized", look for the same ORCID before looking for the same name + # with existence_match="normalized", look for the same ORCID before looking for the same name, + # and allow for middle names and initials in the given names if existence_match == "normalized": instances = self._find_by_identifiers(client, ("ORCID",), in_spaces=in_spaces) if instances: return instances + if ( + isinstance(self.given_name, str) + and split_given_names(self.given_name) + and isinstance(self.family_name, str) + and self.family_name.strip() + ): + return self._find_by_compatible_names(client, in_spaces=in_spaces) return super()._find_matching_instances(client, in_spaces=in_spaces, existence_match=existence_match) + + def _find_by_compatible_names(self, client, in_spaces=None): + """ + Look for people with an equivalent family name (see `names_equivalent()`) and compatible given names + (see `given_names_compatible()`), so that "James Maxwell", "James C. Maxwell" and "J. Clerk Maxwell" + are all found from "James Clerk Maxwell". + + If exactly one of them has the same given names (ignoring case), only that one is returned; + otherwise, if exactly one has equivalent given names, only that one; otherwise all of them. + """ + query_filter = { + "given_name": Regex(build_given_name_regex(self.given_name)), + "family_name": Regex(build_normalized_regex(self.family_name)), + } + compatible = [] + equivalent = [] + exact = [] + for instance in self._run_minimal_query(client, query_filter, in_spaces=in_spaces): + data = client.instance_from_full_uri(instance["@id"], use_cache=True, release_status="any") + if data is None: + continue + stored_values = self.__class__._deserialize_data(data) + stored_given_name = stored_values.get("given_name", None) + stored_family_name = stored_values.get("family_name", None) + if not (isinstance(stored_given_name, str) and isinstance(stored_family_name, str)): + continue + if not ( + names_equivalent(stored_family_name, self.family_name) + and given_names_compatible(stored_given_name, self.given_name) + ): + continue + compatible.append(instance) + if names_equivalent(stored_given_name, self.given_name): + equivalent.append(instance) + if ( + stored_given_name.lower() == self.given_name.lower() + and stored_family_name.lower() == self.family_name.lower() + ): + exact.append(instance) + for candidates in (exact, equivalent): + if len(candidates) == 1: + return candidates + return compatible + + def _adopt_matched_values(self, data, existence_match): + super()._adopt_matched_values(data, existence_match) + # with existence_match="normalized", the given names may differ by more than names_equivalent() allows + if existence_match == "normalized": + stored_given_name = self.__class__._deserialize_data(data).get("given_name", None) + if ( + isinstance(stored_given_name, str) + and isinstance(self.given_name, str) + and stored_given_name != self.given_name + and given_names_compatible(stored_given_name, self.given_name) + ): + self.given_name = stored_given_name diff --git a/fairgraph/openminds/v5/core/actors/person.py b/fairgraph/openminds/v5/core/actors/person.py index fa09f460..5d6cf6b5 100644 --- a/fairgraph/openminds/v5/core/actors/person.py +++ b/fairgraph/openminds/v5/core/actors/person.py @@ -8,6 +8,15 @@ from openminds.v5.core import Person as OMPerson from fairgraph import KGObject +from fairgraph.queries import Regex +from fairgraph.utility.name_matching import ( + build_given_name_regex, + build_normalized_regex, + given_names_compatible, + names_equivalent, + split_given_names, +) + class Person(KGObject, OMPerson): """ @@ -195,9 +204,73 @@ def me(cls, client, allow_multiple=False, follow_links=None): return person def _find_matching_instances(self, client, in_spaces=None, existence_match="equals"): - # with existence_match="normalized", look for the same ORCID before looking for the same name + # with existence_match="normalized", look for the same ORCID before looking for the same name, + # and allow for middle names and initials in the given names if existence_match == "normalized": instances = self._find_by_identifiers(client, ("ORCID",), in_spaces=in_spaces) if instances: return instances + if ( + isinstance(self.given_name, str) + and split_given_names(self.given_name) + and isinstance(self.family_name, str) + and self.family_name.strip() + ): + return self._find_by_compatible_names(client, in_spaces=in_spaces) return super()._find_matching_instances(client, in_spaces=in_spaces, existence_match=existence_match) + + def _find_by_compatible_names(self, client, in_spaces=None): + """ + Look for people with an equivalent family name (see `names_equivalent()`) and compatible given names + (see `given_names_compatible()`), so that "James Maxwell", "James C. Maxwell" and "J. Clerk Maxwell" + are all found from "James Clerk Maxwell". + + If exactly one of them has the same given names (ignoring case), only that one is returned; + otherwise, if exactly one has equivalent given names, only that one; otherwise all of them. + """ + query_filter = { + "given_name": Regex(build_given_name_regex(self.given_name)), + "family_name": Regex(build_normalized_regex(self.family_name)), + } + compatible = [] + equivalent = [] + exact = [] + for instance in self._run_minimal_query(client, query_filter, in_spaces=in_spaces): + data = client.instance_from_full_uri(instance["@id"], use_cache=True, release_status="any") + if data is None: + continue + stored_values = self.__class__._deserialize_data(data) + stored_given_name = stored_values.get("given_name", None) + stored_family_name = stored_values.get("family_name", None) + if not (isinstance(stored_given_name, str) and isinstance(stored_family_name, str)): + continue + if not ( + names_equivalent(stored_family_name, self.family_name) + and given_names_compatible(stored_given_name, self.given_name) + ): + continue + compatible.append(instance) + if names_equivalent(stored_given_name, self.given_name): + equivalent.append(instance) + if ( + stored_given_name.lower() == self.given_name.lower() + and stored_family_name.lower() == self.family_name.lower() + ): + exact.append(instance) + for candidates in (exact, equivalent): + if len(candidates) == 1: + return candidates + return compatible + + def _adopt_matched_values(self, data, existence_match): + super()._adopt_matched_values(data, existence_match) + # with existence_match="normalized", the given names may differ by more than names_equivalent() allows + if existence_match == "normalized": + stored_given_name = self.__class__._deserialize_data(data).get("given_name", None) + if ( + isinstance(stored_given_name, str) + and isinstance(self.given_name, str) + and stored_given_name != self.given_name + and given_names_compatible(stored_given_name, self.given_name) + ): + self.given_name = stored_given_name diff --git a/fairgraph/utility/name_matching.py b/fairgraph/utility/name_matching.py index 6d1bf3e8..23499bdb 100644 --- a/fairgraph/utility/name_matching.py +++ b/fairgraph/utility/name_matching.py @@ -304,3 +304,84 @@ def names_equivalent(stored: str, local: str) -> bool: return matches_name( collapse_whitespace(stored), collapse_whitespace(local), "equals", case_sensitive=False, ignore_accents=True ) + + +def split_given_names(value: str) -> List[str]: + """ + Split a string containing one or more given names into its parts, in the form in which they are compared + by `given_names_compatible()`: without case, accents or full stops. + + Names are separated by whitespace, by hyphens, or by the full stop after an initial, + so "J.-P." and "Jean-Pierre" both have two parts, and so do "J.E." and "J. E.". + """ + tokens = re.split(r"[\s\-‐‑–]+|(?<=\.)", value) + parts = [] + for token in tokens: + token = remove_accents(token.casefold()).strip(".") + if token: + parts.append(token) + return parts + + +def _given_name_parts_compatible(a: str, b: str) -> bool: + """Whether two parts of a given name may be the same name: they are equal, or one is the initial of the other.""" + if a == b: + return True + if len(a) == 1: + return b.startswith(a) + if len(b) == 1: + return a.startswith(b) + return False + + +def _is_ordered_subset(shorter: List[str], longer: List[str]) -> bool: + """Whether each of `shorter` corresponds to a different item of `longer`, in the same order.""" + if not shorter: + return True + for index, part in enumerate(longer): + if _given_name_parts_compatible(shorter[0], part) and _is_ordered_subset(shorter[1:], longer[index + 1 :]): + return True + return False + + +def given_names_compatible(stored: str, local: str) -> bool: + """ + Whether two strings of given names may belong to the same person, allowing for middle names that appear + in only one of them, and for initials in place of names. + + The first names must correspond: they must be the same (ignoring case, accents and full stops), + or one must be the initial of the other. Each of the remaining names in the string with fewer of them + must correspond in the same way to one of the remaining names in the other, in the same order. + So "James" and "J. Clerk" are both compatible with "James Clerk", but "Clerk" is not, + and neither is "James K.". + """ + stored_parts = split_given_names(stored) + local_parts = split_given_names(local) + if not (stored_parts and local_parts): + return False + if not _given_name_parts_compatible(stored_parts[0], local_parts[0]): + return False + shorter, longer = sorted((stored_parts[1:], local_parts[1:]), key=len) + return _is_ordered_subset(shorter, longer) + + +def build_given_name_regex(value: str) -> str: + """ + Build a regular expression for use as a KG `REGEX` filter, which selects the stored given names that + `given_names_compatible()` might consider compatible with `value`: those starting with the same letter, + ignoring case and accents. It is a pre-filter, whose results are checked with `given_names_compatible()`. + """ + parts = split_given_names(value) + if not parts: + raise ValueError(f"No given name found in {value!r}") + single, multi = _fold_maps() + # both cases are listed, in case the KG ignores case only for unaccented letters + initials = {parts[0][0], parts[0][0].upper()} + alternatives = set(initials) + for initial in initials: + alternatives |= single.get(initial, set()) + # a stored name may begin with a special letter that folds onto two letters, e.g. "Æ" -> "AE" + alternatives |= { + character for folded, characters in multi.items() if folded[0] in initials for character in characters + } + return r"^\s*" + "[" + "".join(re.escape(alternative) for alternative in sorted(alternatives)) + "]" diff --git a/test/test_name_matching.py b/test/test_name_matching.py index abf428a0..7d1e94b7 100644 --- a/test/test_name_matching.py +++ b/test/test_name_matching.py @@ -39,12 +39,15 @@ from fairgraph.utility.name_matching import ( MAX_WITHIN_LENGTH, build_name_regex, + build_given_name_regex, build_normalized_regex, + given_names_compatible, matches_name, names_equivalent, narrow_by_name, normalize_name, remove_accents, + split_given_names, ) @@ -312,3 +315,80 @@ def test_matches_any_property_or_list_item(self): c = self.Named(name="nucleus raphé magnus") assert narrow_by_name([a, b, c], "raphe nuclei", ["name", "synonyms"], ignore_accents=True) == [a, b] assert narrow_by_name([a, b, c], "raphé", ["name"], match="contains") == [a, c] + + +class TestSplitGivenNames: + @pytest.mark.parametrize( + "text,expected", + [ + ("James", ["james"]), + ("James Clerk", ["james", "clerk"]), + (" James C. ", ["james", "c"]), + ("J.C.", ["j", "c"]), + ("J. C.", ["j", "c"]), + ("J C", ["j", "c"]), + ("Jean-Pierre", ["jean", "pierre"]), + ("J.-P.", ["j", "p"]), + ("Émilie", ["emilie"]), + ("", []), + (" . ", []), + ], + ) + def test_split(self, text, expected): + assert split_given_names(text) == expected + + +class TestGivenNamesCompatible: + @pytest.mark.parametrize( + "stored,local,expected", + [ + ("James", "James", True), + ("James", "James C.", True), + ("James C.", "James", True), + ("James C.", "James C", True), + ("J C", "J.C.", True), + ("James Clerk", "J. Clerk", True), + ("J. C.", "J. Clerk", True), + ("James Clerk", "J.C.", True), + ("James Clerk", "James", True), + ("Augusta", "A. Ada", True), + ("Augusta Ada", "Ada", False), + ("Clerk", "J. Clerk", False), + ("James K.", "James C.", False), + ("Jane", "John", False), + ("J.-P.", "Jean-Pierre", True), + ("Émilie", "emilie", True), + ("James Clerk", "Clerk James", False), + ("", "James", False), + ], + ) + def test_compatible(self, stored, local, expected): + assert given_names_compatible(stored, local) is expected + assert given_names_compatible(local, stored) is expected + + def test_an_initial_can_match_any_of_several_names(self): + # a greedy match of "C." against "Charles" would leave nothing for "Clerk" + assert given_names_compatible("James Charles Clerk", "James C. Clerk") + + +class TestBuildGivenNameRegex: + @pytest.mark.parametrize( + "local,stored,expected", + [ + ("James", "James Clerk", True), + ("J.", "james", True), + ("James", " J. C.", True), + ("Emilie", "Émilie", True), + ("Émilie", "Emilie", True), + ("Émilie", "ÉMILIE", True), + ("Aethel", "Æthel", True), + ("James", "Clerk James", False), + ("Emilie", "Amelie", False), + ], + ) + def test_matches_names_with_the_same_initial(self, local, stored, expected): + assert kg_search(build_given_name_regex(local), stored) is expected + + def test_requires_a_given_name(self): + with pytest.raises(ValueError): + build_given_name_regex(" ") diff --git a/test/test_openminds_core.py b/test/test_openminds_core.py index 67da6b2a..5a56baa5 100644 --- a/test/test_openminds_core.py +++ b/test/test_openminds_core.py @@ -1955,6 +1955,79 @@ def test_exists_normalized_falls_back_to_names_without_an_orcid_match(mock_clien assert person.id == CHATELET_ID +MAXWELL_ID = "https://kg.ebrains.eu/api/instances/89012345-f012-3456-789a-bcdef0123456" +OTHER_MAXWELL_ID = "https://kg.ebrains.eu/api/instances/90123456-0123-4567-89ab-cdef01234567" + + +@pytest.mark.parametrize( + "stored,local", + [ + ("James Clerk", "James"), + ("James", "James Clerk"), + ("James C.", "James C"), + ("James Clerk", "J. Clerk"), + ("J. C.", "James Clerk"), + ], +) +def test_exists_normalized_allows_for_middle_names_and_initials(mock_client, stored, local): + _seed_named_person(mock_client, stored, "Maxwell", person_id=MAXWELL_ID) + person = omcore.Person(given_name=local, family_name="Maxwell") + assert not person.exists(mock_client) + assert person.exists(mock_client, existence_match="normalized") + assert person.id == MAXWELL_ID + # the stored given name is adopted + assert person.given_name == stored + + +def test_exists_normalized_requires_the_first_given_names_to_correspond(mock_client): + _seed_named_person(mock_client, "Clerk", "Maxwell", person_id=MAXWELL_ID) + person = omcore.Person(given_name="J. Clerk", family_name="Maxwell") + assert not person.exists(mock_client, existence_match="normalized") + + +def test_exists_normalized_does_not_match_different_middle_names(mock_client): + _seed_named_person(mock_client, "James K.", "Maxwell", person_id=MAXWELL_ID) + person = omcore.Person(given_name="James C.", family_name="Maxwell") + assert not person.exists(mock_client, existence_match="normalized") + + +def test_save_normalized_does_not_overwrite_a_fuller_given_name(mock_client): + _seed_named_person(mock_client, "James Clerk", "Maxwell", person_id=MAXWELL_ID) + person = omcore.Person(given_name="James", family_name="Maxwell") + log = ActivityLog() + person.save(mock_client, space="common", existence_match="normalized", activity_log=log) + assert person.id == MAXWELL_ID + assert person.given_name == "James Clerk" + assert [entry.type for entry in log.entries] == ["no-op"] + assert mock_client.updates == [] + + +def test_exists_normalized_prefers_the_exact_given_name(mock_client): + _seed_named_person(mock_client, "James C.", "Maxwell", person_id=MAXWELL_ID) + _seed_named_person(mock_client, "James", "Maxwell", person_id=OTHER_MAXWELL_ID) + person = omcore.Person(given_name="james", family_name="Maxwell") + assert person.exists(mock_client, existence_match="normalized") + assert person.id == OTHER_MAXWELL_ID + + +def test_exists_normalized_prefers_the_equivalent_given_name(mock_client): + _seed_named_person(mock_client, "Émilie", "du Châtelet") + _seed_named_person(mock_client, "Émilie Gabrielle", "du Châtelet", person_id=OTHER_MAXWELL_ID) + person = omcore.Person(given_name="Emilie", family_name="du Chatelet") + assert person.exists(mock_client, existence_match="normalized") + assert person.id == CHATELET_ID + + +def test_exists_normalized_raises_if_an_initial_matches_several_people(mock_client): + _seed_named_person(mock_client, "James", "Maxwell", person_id=MAXWELL_ID) + _seed_named_person(mock_client, "Jane", "Maxwell", person_id=OTHER_MAXWELL_ID) + with pytest.raises(Exception, match="not specific enough"): + omcore.Person(given_name="J.", family_name="Maxwell").exists(mock_client, existence_match="normalized") + person = omcore.Person(given_name="J.", family_name="Maxwell") + assert person.exists(mock_client, existence_match="normalized", ignore_duplicates=True) + assert person.id in (MAXWELL_ID, OTHER_MAXWELL_ID) + + def test_exists_equals_ignores_the_orcid(mock_client): _seed_named_person(mock_client, "Gabrielle Émilie", "Le Tonnelier de Breteuil", orcid_id=CHATELET_ORCID_ID) person = omcore.Person(