Use schemas.Algorithm for linking#321
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
==========================================
+ Coverage 98.08% 98.15% +0.06%
==========================================
Files 32 32
Lines 1832 1838 +6
==========================================
+ Hits 1797 1804 +7
+ Misses 35 34 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bamader
approved these changes
Apr 22, 2025
bamader
left a comment
Collaborator
There was a problem hiding this comment.
Seems like good cleanup work to me!
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.
Description
Send a value of
schemas.Algorithmand notmodels.Algorithmwhen linking records.Related Issues
closes #294
Additional Notes
When we save the Algorithm configuration to the database, we store many values as strings (eg blocking keys, features, functions, etc). However, when using the configuration during linkage, we prefer using the enum, functions and objects those strings represent. Previously, this meant we have to cast the string values to its native type in the link and compare methods.
By converting the model data back to a schema.Algorithm object, we can do that casting one time before the linkage process kicks off. This helps simplify our linkage logic a bit as it no longer needs to worry about how to cast strings back to their native data types.
<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->
Checklist
Please review and complete the following checklist before submitting your pull request:
Checklist for Reviewers
Please review and complete the following checklist during the review process: