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

Add convenience function Grounder.ground_best #129

Merged
merged 3 commits into from
Feb 6, 2024
Merged

Add convenience function Grounder.ground_best #129

merged 3 commits into from
Feb 6, 2024

Conversation

cthoyt
Copy link
Member

@cthoyt cthoyt commented Feb 5, 2024

There are so many places where I implemented a wrapper around Grounder.ground that returns just the first entry if any matches are returned, otherwise return None.

It seemed like a good idea to upstream it with some tests.

Copy link
Member

@bgyori bgyori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is great! We could also consider adding a ground_best function to api.py which calls this method of the default Grounder.

@bgyori bgyori merged commit adee2cf into master Feb 6, 2024
4 checks passed
@bgyori bgyori deleted the ground-best branch February 6, 2024 01:27
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

Successfully merging this pull request may close these issues.

2 participants