-
Notifications
You must be signed in to change notification settings - Fork 5
Update command for importing taxa from external lists #939
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
Conversation
* feat: management command for updating fields on existing Taxa from CSV * feat: try another title for example occurrence image * feat: allow manual filter for showing taxa without occurrences * feat: allow sorting by reference image for better demos
* feat: add fields for Taxon cover images and Fieldguide ID * feat: add cover image fields to Taxon model for the UI
✅ Deploy Preview for antenna-preview canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the command for importing taxa from external lists by enhancing both the import and update functionality for taxonomic data management.
- Replaces hardcoded string rank values with TaxonRank enum constants for type safety
- Improves genus creation logic to handle existing taxa with different ranks
- Adds new update_taxa management command for updating existing taxa from CSV files
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
ami/main/models.py | Updates add_genus_parents method to use TaxonRank enum and improve genus handling logic |
ami/main/management/commands/update_taxa.py | Adds new management command for updating existing taxa from CSV files or URLs |
ami/main/management/commands/import_taxa.py | Enhances import logic with better taxon creation, GBIF key handling, and return value updates |
Comments suppressed due to low confidence (1)
ami/main/management/commands/import_taxa.py:410
- The log message contains a grammatical error with 'to from'. It should be 'from {existing_value} to {incoming_value}'.
logger.info(
f"Changing {column} of {specific_taxon} to from {existing_value} to {incoming_value}"
)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
this is only a configuration change, it does not alter the DB schema
Uh oh!
There was an error while loading. Please reload this page.