Skip to content

feat(organisms): taxonomy enrichment, compound table, and tree of life (#452) - #814

Merged
vcnainala merged 10 commits into
developmentfrom
feat/compound-page-organism-table-452
Jun 22, 2026
Merged

vcnainala merged 10 commits into
developmentfrom
feat/compound-page-organism-table-452

Conversation

@vcnainala

@vcnainala vcnainala commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #452

  • Compound page — Replaces organism pills with a searchable table (organism, rank, source type, reference). Rows expand inline to show a verified Global Names taxonomy card.
  • GNF taxonomy pipeline — coconut:organisms-map-ogg stores exact-match classification JSON on organisms (migrations for taxonomy, taxonomy_fetched_at, iri, rank). Parallel GNF verifier batching for backfill runs.
  • Automatic curation — When the primary name has no exact GNF match, the command retries curated lookups: vernacular dictionary, sp./spp. → genus, hybrid/infraspecific stripping, author citation removal, and NCBI scientific name from stored IRI. --audit-patterns reports remaining gaps.
  • Filament 4 — OrganismResource edit form embeds OrganismTaxonomyPanel via Filament\Schemas\Components\Livewire with taxonomy group/rank table columns.
  • Tree of life — /tree-of-life explorer, homepage teaser, and Docs nav link for browsing NP distribution by taxonomy.

Test plan

  • Run migrations: php artisan migrate
  • Backfill taxonomy: php artisan coconut:organisms-map-ogg --backfill --taxonomy-only --with-molecules-only
  • Audit remaining gaps: php artisan coconut:organisms-map-ogg --audit-patterns --with-molecules-only
  • Open a compound with multiple organisms — search, expand row, confirm taxonomy card and external links
  • Filament → Organisms → edit record — confirm taxonomy panel renders
  • Visit /tree-of-life and homepage teaser kingdom bars
  • php artisan test tests/Unit/OrganismTaxonomyMapperTest.php tests/Unit/OrganismCurationResolverTest.php tests/Unit/NcbiTaxonomyNameResolverTest.php

@codecov-commenter

codecov-commenter commented Jun 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.82566% with 525 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.72%. Comparing base (a4c26c6) to head (7efe154).
⚠️ Report is 20 commits behind head on development.

Files with missing lines Patch % Lines
...rvices/OrganismTaxonomy/OrganismTaxonomyMapper.php 53.05% 177 Missing ⚠️
...s/OrganismTaxonomy/OrganismTaxonomyTreeBuilder.php 70.96% 54 Missing ⚠️
...ces/OrganismTaxonomy/OrganismTaxonomyPresenter.php 0.00% 53 Missing ⚠️
app/Livewire/TreeOfLifeExplorer.php 0.00% 47 Missing ⚠️
...ices/OrganismTaxonomy/OrganismCurationResolver.php 79.60% 41 Missing ⚠️
.../Filament/Dashboard/Resources/OrganismResource.php 0.00% 39 Missing ⚠️
app/Livewire/MoleculeDetails.php 0.00% 22 Missing ⚠️
...pp/Services/OrganismTaxonomy/GnfTaxonomyParser.php 86.36% 18 Missing ⚠️
...vices/OrganismTaxonomy/OrganismTaxonomyApplier.php 0.00% 14 Missing ⚠️
app/Livewire/OrganismTaxonomyPanel.php 0.00% 13 Missing ⚠️
... and 7 more
Additional details and impacted files
@@                Coverage Diff                 @@
##             development     #814       +/-   ##
==================================================
+ Coverage           6.14%   21.72%   +15.57%     
- Complexity          1736     2250      +514     
==================================================
  Files                227      253       +26     
  Lines               8945    10771     +1826     
==================================================
+ Hits                 550     2340     +1790     
- Misses              8395     8431       +36     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

vcnainala added 5 commits June 8, 2026 21:41
Relax unique-name validation in the request-changes organism repeater so
users can link organisms that already exist in the database. Reject names
already attached to the target molecule instead.

Fixes #772
Align Filament v4 Select option keys with stored state for existing
synonyms, CAS, geo locations, organisms, and citations. Resolve the
target molecule from form state and report records so options remain
valid on Livewire submit requests.

Fixes #775
Use explicit null checks for molecule synonyms/CAS options and remove
unreachable is_string handling for mol_ids array cast.
…UI (#452)

Store exact-match Global Names taxonomy on organisms, enrich via coconut:organisms-map-ogg with automatic curation fallbacks (vernacular names, sp./spp., NCBI IRI lookup), and surface verified classification on the compound page and in Filament.

Closes #452
@vcnainala vcnainala changed the title feat(ui): replace organism pills with searchable table on compound page feat(organisms): taxonomy enrichment, compound table, and tree of life (#452) Jun 10, 2026
Build a rank-only taxonomy tree without per-organism nodes, cache via the
file store, and load tree data in render() so Livewire does not dehydrate
the full payload on every request.
Resolve organism-related conflicts by keeping the GNF taxonomy pipeline
and compound UI from this branch while adopting development organism form,
view page, and report-change validation. Fix PHPStan in taxonomy services.
The needingTaxonomyEnrichment scope uses null-safe SQL only; fuzzy
organisms with iri, taxonomy, and fetched_at should be excluded from
the scope and filtered in PHP via hasExactTaxonomyEnrichment.
@vcnainala
vcnainala merged commit 7f8fff9 into development Jun 22, 2026
6 checks passed
@vcnainala
vcnainala deleted the feat/compound-page-organism-table-452 branch June 22, 2026 17:30
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