Repository navigation
Conversation
✅ Deploy Preview for antenna-preview canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughTaxonomy ranks, models, managers, querysets, and helpers now live in the future-model modules, with names re-exported from ChangesTaxonomy models
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This change reorganizes the taxonomy model code into a new module and keeps the old import paths working. No concrete behavior change or breakage was found, so it looks ready to merge. Pre-merge checks |
|
✅ Deploy Preview for antenna-ssec canceled.
|
- _case_from_map - verified_taxon_counts - TaxonRank - TaxonQuerySet - TaxonManager - TaxonParent - Taxon - TaxaListQuerySet - TaxaListManager - TaxaList - Tag Because main.models still has to re-export from models_future until migrations and other code stops referencing it: - Added imports in some methods, since module-level imports must be avoided to avoid circular imports. - Changed type hinting for some methods to strings (to be evauluated by the linter without a change in behavior) to avoid circular imports. Added unit tests for models_future.taxonomy. Some of these were driven by coverage needs. I didn't remove tests from ami.main, which means we have duplicate coverage. The tests were all blatted out by AI and I didn't work hard to understand them. There should be no functionality changes, including possible bugfixes.
e4819a3 to
87c836c
Compare
There was a problem hiding this comment.
This one still feels quite big and is going to get bigger! I think taxonomy is worthy of its own app: ami/taxonomy/models/taxon.py ami/taxonomy/models/taxon_observed.py ami/taxonomy/models/taxa_list.py etc.
And then move the views for taxonomy, and the management commands for loading / exporting taxa in that app as well.
ami/taxonomy/management/import_taxa.py
But I can understand doing this in stages as well.
ami/main/models_future/taxonomy/taxon.py
ami/main/views/api/taxonomy/taxon.py
What do you think?
Summary
Move taxonomy model code to models_future
List of Changes
Related Issues
Relates to #260
Detailed Description
How to Test the Changes
docker compose -f docker-compose.ci.yml run --rm django python manage.py test
Summary by CodeRabbit