feat(np-classifier): store pathway/superclass/class as jsonb arrays#802
Open
vcnainala wants to merge 10 commits into
Open
feat(np-classifier): store pathway/superclass/class as jsonb arrays#802vcnainala wants to merge 10 commits into
vcnainala wants to merge 10 commits into
Conversation
Development
Development
Development
…b arrays Introduce NpClassifierResults for normalizing API and import payloads, add a PostgreSQL migration to convert existing text values, and cast model attributes as arrays so all classifier labels are retained per molecule.
…ification Update classification jobs and artisan commands to store complete API result arrays via NpClassifierResults, and add a --force option to refresh molecules that already have classifier data after deploy.
Expand np_pathway, np_superclass, and np_class filter queries to search any stored label in the jsonb array instead of a single scalar value.
Render pathway, superclass, and class as comma-separated search links so molecules with multiple classifier assignments show every stored label.
Update bubble frequency, stacked bar, and properties JSON commands to unnest jsonb classifier arrays when building unique value lists and frequency counts.
Clarify REST and search documentation that pathway, superclass, and class values may contain multiple labels per molecule after the jsonb migration.
…and search Cover NpClassifierResults normalization/import parsing and verify filter search matches any pathway stored in a molecule jsonb array.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## development #802 +/- ##
================================================
+ Coverage 6.14% 7.54% +1.39%
- Complexity 1736 1746 +10
================================================
Files 227 228 +1
Lines 8945 8996 +51
================================================
+ Hits 550 679 +129
+ Misses 8395 8317 -78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
jsonbstring arrays so all API labels are retained per molecule (not only the first result).NpClassifierResultshelper, migration, updated classification jobs/commands,--forcereclassification, jsonb-aware search filters, UI updates, and report generator fixes.Test plan
php artisan migrateand verifyproperties.np_classifier_*columns arejsonbphp artisan test --filter=NpClassifiernp_pathway:,np_superclass:, andnp_class:filters against a molecule with multiple labelsphp artisan coconut:npclassify --all --forceto refresh existing moleculesResolves
Closes #782