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

Improve the lookup & usage of Taxon names #696

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

mihow
Copy link
Collaborator

@mihow mihow commented Jan 26, 2025

Summary

Some improvements to support #621 to return the same "Moth" and "Not a Moth" species records rather than creating new ones.

First use of our species search field!
Requires adding moth and nonmoth to search_names in the live DB, unless we add a data migration. A data migration may be worth it to merge existing records as well.

Goes with RolnickLab/ami-data-companion#70

Changes

  • Search the "search_names" field in addition to the name field so that we can name taxa differently than the backend returns them (nonmoth & non-moth should both map to "Not-a-moth"
  • Search only taxa that are set to "Active"
  • Update the searches happening in two places:
    1. the main determination of a prediction when processing results are being processed (a single Taxon gets looked up & associated with the Occurrence)
    1. when the top-N or more prediction results are mapped to taxa objects
  • Fix the performance of the Django admin Taxon page, use an autocomplete field instead of a massive & slow drop-down of taxa choices.

Follow-ups

  • Search names & search_names of synonym children as well

Copy link

netlify bot commented Jan 26, 2025

Deploy Preview for ami-dev canceled.

Name Link
🔨 Latest commit 78e4931
🔍 Latest deploy log https://app.netlify.com/sites/ami-dev/deploys/67979fabbfe4940008974712

@mihow mihow force-pushed the feat/improve-species-lookup branch from e80bed1 to 78e4931 Compare January 27, 2025 15:00
@mihow mihow merged commit 47dcbcd into main Jan 27, 2025
6 checks passed
@mihow mihow deleted the feat/improve-species-lookup branch January 27, 2025 15:07
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.

1 participant