-
Notifications
You must be signed in to change notification settings - Fork 63
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
Create packages/product-core containing shared code between the various products #3661
Conversation
@cmdcolin the plan for this PR is to split up the sessionModelFactory files (which are more than 1000 lines each) into multiple files by area of functionality (assemblies, connections, etc), and to factor out the duplicated parts of them into packages/product-core. Are you OK with that plan? The motivation for this is that the huge files and code duplication are making the session models increasingly hard to work on. |
i'm fine with it if it seems like it works right. I have previously tried to do this but found it can be difficult to properly "carve" out portions of the state model but if it works that's great (my previous attempt stalled #3206) |
Codecov Report
@@ Coverage Diff @@
## main #3661 +/- ##
==========================================
+ Coverage 62.61% 63.57% +0.95%
==========================================
Files 894 915 +21
Lines 30246 29912 -334
Branches 7322 7264 -58
==========================================
+ Hits 18939 19016 +77
+ Misses 11124 10713 -411
Partials 183 183
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I forgot that MST automatically chains lifecycle hooks like `afterCreate` when composing types
in lgv and cgv built-embedded tests
@@ -154,7 +154,8 @@ | |||
"test": true | |||
}, | |||
"rules": { | |||
"import/no-extraneous-dependencies": "off" | |||
"import/no-extraneous-dependencies": "off", | |||
"@typescript-eslint/no-non-null-assertion": "off" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows non-null assertions in test code
const JBrowseRootModel = JBrowseRootModelFactory( | ||
pluginManager, | ||
sessionModelFactory, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to how the root model is instantiated was done to break a dependency cycle between the root, session, and jbrowse model types
@cmdcolin This might be getting close to ready to merge, I think. I don't know what effect it has on the doc generation you worked on though |
awesome, i'll check do a quick review. not too worried about docs for now, itll probably break e.g. the rootmodel page into multiple pages with the mixins but thats fine with me |
i'd say let's get it merged :) we can iterate on main |
I'm fine with that, merge when ready |
woooo merged. great work :) thanks @rbuels |
Work in progress DRY-ing up shared code among the products. Primarily the session models in this first phase.