refactor(wording): rename collection → capture set in public-facing strings#1245
refactor(wording): rename collection → capture set in public-facing strings#1245
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
…trings Updates user-visible strings to match the "Capture Set" terminology used in the UI. Covers log messages, auto-generated job names, API/OpenAPI docstrings, DRF field labels, admin action messages, and error/validation messages. Internal identifiers (class names, variables, DB fields, JobType keys, query param names, response keys, permission codenames) are unchanged to avoid breaking API clients or requiring migrations. Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for antenna-preview canceled.
|
✅ Deploy Preview for antenna-ssec canceled.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 27 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates backend public-facing terminology from “collection” to “capture set” to align with the UI rename, while keeping internal identifiers unchanged to avoid API and schema breakage.
Changes:
- Updated user-visible strings in logs, admin messages, error/validation responses, and auto-generated job names to say “capture set”.
- Updated API/OpenAPI docstrings and parameter descriptions to use “capture set” wording.
- Updated DRF field label for
source_image_collection_idto display as “Capture Set”.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
ami/tasks.py |
Updates task log strings; includes a small formatting cleanup in an f-string. |
ami/main/models.py |
Updates a log message for default collection creation to “capture set”. |
ami/main/api/views.py |
Updates action/viewset docstrings, job names, validation message text, and filter descriptions to “capture set”. |
ami/main/admin.py |
Updates Django admin action flash messages and queued job names to “capture set”. |
ami/jobs/serializers.py |
Updates the browsable API label for source_image_collection_id to “Capture Set”. |
ami/jobs/models.py |
Updates SourceImageCollectionPopulateJob display name and related log/error strings to “capture set”. |
ami/exports/views.py |
Updates 400 error messages and export job naming to “capture set”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
populate_collection and regroup_events called Manager.get() and then checked if the result was truthy — but Manager.get() raises DoesNotExist for a missing ID, so the else branches were unreachable and the tasks crashed with an uncaught exception instead of logging a clean not-found message. Switch to try/except DoesNotExist. Co-Authored-By: Claude <noreply@anthropic.com>
… docstrings
Follow-on to the collection → capture set rename. Updates the API/OpenAPI
docstrings this PR already touched so the full sentence matches UI
terminology. Also fixes a missing possessive ("their detections'") in the
OccurrenceCollectionFilter docstring, caught in review.
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Aligns backend-surfaced terminology with the UI's "Capture Set" rename. Only public-facing strings are changed; internal identifiers stay as "collection" to avoid breaking API clients and to skip migrations.
What changed
ami/tasks.py,ami/main/models.py,ami/jobs/models.py)Populate captures for capture set {pk},Post-processing: SmallSizeFilter on Capture Set {pk},Export occurrences for capture set {pk}(ami/main/api/views.py,ami/main/admin.py,ami/exports/views.py,ami/jobs/models.py)SourceImageCollectionPopulateJob.namedisplayed as job type in UISourceImageCollectionViewSet, itspopulate/add/removeactions,star/unstaractions, and filter classes (OccurrenceCollectionFilter,TaxonCollectionFilter)source_image_collection_id→ "Capture Set"ValueError,ValidationError, admin messages, 400 responses in exportsWhat intentionally did NOT change
SourceImageCollection,SourceImageCollectionPopulateJob, etc.)JobType.key = "populate_captures_collection"(stored as DB identifier)collection_id,collection) and response keys ("collection") — would break UI/API consumersIncidental
Includes one small chore commit fixing a pre-existing flake8 E202 in
ami/tasks.py(stray space inside an f-string) so the pre-commit hook passes.Test plan
collection_idparam description and affected viewset docstrings