-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Split insight/prediction (part 2) #556
Conversation
Instead of manually creating InsightImporter with InsightImporterFactory
It makes the insight import process easier to read by removing the BaseInsightImporter class. ingredient_spellcheck insights are currently not generated.
It makes the import process simpler to understand
Latent insights don't exist anymore.
Split completely insight generation (all in process_insights) and insight import
Codecov Report
@@ Coverage Diff @@
## master #556 +/- ##
==========================================
+ Coverage 37.68% 44.73% +7.05%
==========================================
Files 103 96 -7
Lines 7438 6981 -457
==========================================
+ Hits 2803 3123 +320
+ Misses 4635 3858 -777
Continue to review full report at Codecov.
|
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 is mostly style comments, but a possible non negated condition.
I've seen you removed the init.py files in tests structure. I reread https://docs.pytest.org/en/6.2.x/goodpractices.html#choosing-a-test-layout-import-rules and I'm ok with that, but I will add a check that there are no filename duplicates in make tests
!
Co-authored-by: Alex Garel <alex@garel.org>
Co-authored-by: Alex Garel <alex@garel.org>
Retrieve existing prediction in batch (same barcode).
Kudos, SonarCloud Quality Gate passed! |
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.
Ok, let's go !
I tested the DB modifications in preprod but adjusting to drop indexes before and recreate them after, because this is much more efficient. Here is the script https://gist.github.com/alexgarel/c139f5dd8ed79506bde564a38b6a437a |
2nd part of insight refactoring (see #544).
Create a new
Prediction
table, store all predictions in this table. Keep the insight import logic as it is.All latent insights will be moved to the Prediction table, it should greatly reduces the API latency issue described here: #567.
Latent insight migration script, to be run after the version is deployed: