Skip to content

Commit

Permalink
Merge pull request #223 from FAIRmat-NFDI/namefit-docs
Browse files Browse the repository at this point in the history
Add edge cases to namefit documentation
  • Loading branch information
lukaspie authored Aug 30, 2024
2 parents 9d4af2f + cc046e0 commit 98d6784
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev_tools/tests/test_nxdl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ def test_namefitting(hdf_name, concept_name, should_fit):
("test_name", "test_name", 18),
("test_other", "test_name", -1),
("my_fancy_yet_long_name", "my_SOME_name", 8),
("something", "XXXX", 0),
("something", "OTHER", 1),
],
)
def test_namefitting_scores(hdf_name, concept_name, score):
Expand Down
2 changes: 2 additions & 0 deletions dev_tools/utils/nxdl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def get_nx_namefit(hdf_name: str, name: str, name_any: bool = False) -> int:
* `get_nx_namefit("my_other_name", "TEST_name")` returns 5
* `get_nx_namefit("test_name", "test_name")` returns 18
* `get_nx_namefit("test_other", "test_name")` returns -1
* `get_nx_namefit("something", "XXXX")` returns 0
* `get_nx_namefit("something", "OTHER")` returns 1
Args:
hdf_name (str): The hdf_name, containing the name of the HDF5 node.
Expand Down

0 comments on commit 98d6784

Please sign in to comment.