Skip to content

Move Identification model to models_future - #1515

Merged
kra merged 1 commit into
mainfrom
kra/model-taxonomy-identification-prep-move
Oct 29, 2026
Merged

kra merged 1 commit into
mainfrom
kra/model-taxonomy-identification-prep-move

Conversation

@kra

@kra kra commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moved Identification and tests to models_future.

Small cleanups in test_identification.py and tests.py.

Related Issues

Relates to #260.

How to Test the Changes

Unit tests pass, although I didn't check coverage.

Summary by CodeRabbit

  • New Features
    • Identification records continue to manage a user’s submissions for the same occurrence: saving a new identification withdraws that user’s other active submissions, and deleting the current best identification can restore their most recent withdrawn submission.
    • Occurrence determinations continue to update when identifications are saved or deleted.
  • Other
    • No additional user-visible changes are included in this update.

@netlify

netlify Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit 14803c6
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/6ae3906bad113294cecd3d57

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7212dcc7-83df-4b26-876b-9d2a20e0008d
Commits

Reviewing files that changed from the base of the PR and between e2688ef and 14803c6.

Files selected for processing: 2
  • ami/main/models.py
  • ami/main/models_future/identifications.py
Files with no reviewable changes: 1
  • ami/main/models.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The Identification model moved from ami.main.models to ami.main.models_future.identifications and remains re-exported from its former module. Its tests moved to a dedicated test file. TaxonQuerySet.with_children() was removed.

Changes: Identification Model and Tests

Layer / File(s) Summary
Model extraction and lifecycle
ami/main/models.py, ami/main/models_future/identifications.py
Identification is now defined in models_future.identifications and re-exported from models.py. Its relationships, lifecycle behavior, and permission checks are defined in the new module. Related-model imports are localized.
Identification endpoint test coverage
ami/main/models_future/tests/test_identifications.py, ami/main/tests.py
The dedicated test module covers single and bulk identification behavior, validation, permissions, partial failures, and query scaling. The corresponding tests and unused imports were removed from ami/main/tests.py.

Taxonomy QuerySet Method

Layer / File(s) Summary
Remove with_children()
ami/main/models_future/taxonomy.py
TaxonQuerySet.with_children() was removed. Commented example code retains parts of its former query construction.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: Minimal · up to 14803

No actionable issue remains; the change is ready to merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly describes the main change: moving the Identification model to models_future.
Description check Passed The description summarizes the model and test move, references the related issue, and reports the test result. It omits the template’s detailed description, deployment notes, and checklist, but the co…
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description summarizes the model and test move, references the related issue, and reports the test result. It omits the template’s detailed description, deployment notes, and checklist, but the core change and testing information are clear.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kra
kra added this pull request to stack #1516 October 14, 2026 21:37
@kra
kra requested a review from mihow October 14, 2026 21:37
@kra
kra force-pushed the kra/model-taxonomy-identification-prep-move branch from 875d361 to e2688ef Compare October 21, 2026 18:59
@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for antenna-ssec canceled.

Name Link
🔨 Latest commit 14803c6
🔍 Latest deploy log https://app.netlify.com/projects/antenna-ssec/deploys/6ae3906b4d71610a82c5c839

Base automatically changed from kra/model-taxonomy-identification-prep to main October 22, 2026 18:52
Comment thread ami/main/models_future/identifications.py
Small cleanups in test_identification.py and tests.py.
@kra
kra force-pushed the kra/model-taxonomy-identification-prep-move branch from e2688ef to 14803c6 Compare October 29, 2026 18:28
@kra
kra merged commit eaf266e into main Oct 29, 2026
7 checks passed
@kra
kra deleted the kra/model-taxonomy-identification-prep-move branch October 29, 2026 21:31
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