Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require keywords for all resources #928

Open
cthoyt opened this issue Aug 20, 2023 · 0 comments
Open

Require keywords for all resources #928

cthoyt opened this issue Aug 20, 2023 · 0 comments

Comments

@cthoyt
Copy link
Member

cthoyt commented Aug 20, 2023

Support for keywords was added in #688 and additional manual curation was added in #699. A test for checking that all Bioregistry entries have keywords is also implemented, but disabled, in the following block:

@unittest.skip
def test_keywords(self):
"""Assert that all entries have keywords."""
for resource in self.registry.values():
if resource.is_deprecated():
continue
if not resource.contributor:
continue
if resource.get_mappings():
continue # TODO remove this after first found of curation is done
with self.subTest(prefix=resource.prefix, name=resource.get_name()):
if resource.keywords:
self.assertEqual(
sorted(k.lower() for k in resource.keywords),
resource.keywords,
msg="manually curated keywords should be sorted and exclusively lowercase",
)
keywords = resource.get_keywords()
self.assertIsNotNone(keywords)
self.assertLess(0, len(keywords), msg=f"{resource.prefix} is missing keywords")

It would be great to go as far as requiring all manually added entries to the Bioregistry have keywords. Unfortunately, this is not part of all of the external data schemata and therefore can't be a global requirement, otherwise it would make import possible. So because of this, we can sporadically do keyword curation campaigns.

Alternatively, it might be interesting to try using LLMs to convert title + description of resources into keyword lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant