-
Notifications
You must be signed in to change notification settings - Fork 14
Add verification status to Taxa views #1317
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ea9f45d
feat(taxa): per-taxon verification + agreement counts and verified fi…
mihow 16b1468
perf(taxa): compute verification rollup in one pass, not per-taxon su…
mihow 5d929ce
docs(taxa): clarify GIN index purpose + add rollup query-performance …
mihow 10c72cb
fix(taxa): dedupe occurrences in verification rollup under collection…
mihow 7dcf325
Merge remote-tracking branch 'origin/main' into worktree-taxa-verific…
mihow 30955e3
chore(migrations): renumber parents_json GIN index 0085 -> 0087 after…
mihow b92b2b0
fix(taxa): make collection-filtered taxa list COUNT scale
mihow 29bec78
fix(taxa): materialize observed-taxon id set instead of IN-subquery
mihow 838f9d7
refactor(taxa): centralize per-taxon counts into one filtered-occurre…
mihow 7f571be
fix(taxa): use conditional aggregation for dense per-taxon counts
mihow f20a05d
fix(taxa): drop redundant taxa filter from occurrences_count aggregate
mihow cf86550
fix(taxa): remove redundant TaxonCollectionFilter backend
mihow 4f45681
docs(taxa): document sparse vs dense — when CASE breaks, when to use …
mihow e014a73
docs(taxa): next-session handoff — hybrid direct-aggregates + move to…
mihow 04a62c6
refactor(taxa): move count logic to TaxonQuerySet, hybrid subquery/ag…
mihow 20683ee
refactor(taxa): drop model-agreement counts, keep verification only
mihow 02f9dc3
docs(taxa): consolidate PR #1317 findings into single reference, drop…
mihow c4132e9
Merge branch 'main' into worktree-taxa-verification-counts [skip ci]
mihow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| """ | ||
| GIN index on Taxon.parents_json to support hierarchical (descendant) rollup | ||
| of the per-taxon verification / agreement counts added for issue #1316. | ||
|
|
||
| Without it, Family- and Order-rank rows on large projects fall back to a | ||
| seq-scan on the parents_json containment (`@>`) test and dominate query time. | ||
|
|
||
| CREATE INDEX CONCURRENTLY can't run inside a transaction, so this migration | ||
| is non-atomic. IF NOT EXISTS keeps it safe to co-exist with the same index if | ||
| it lands separately via the #1307 follow-up. | ||
| """ | ||
|
|
||
| atomic = False | ||
|
|
||
| dependencies = [ | ||
| ("main", "0084_revoke_delete_job_from_roles"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunSQL( | ||
| sql=( | ||
| "CREATE INDEX CONCURRENTLY IF NOT EXISTS main_taxon_parents_json_gin_idx " | ||
| "ON main_taxon USING gin (parents_json jsonb_path_ops);" | ||
| ), | ||
| reverse_sql="DROP INDEX CONCURRENTLY IF EXISTS main_taxon_parents_json_gin_idx;", | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.