-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add proportional match options * move test utils to utils file * add proportionalMatch test * remove passportThreshold options from Calculator * add proportional match options to Calculator options * gdd proportional match logic * remove options suffix from poportional matching options * pmOptions to proportionalMatchOptions * fix lint errors * update getVotesWithCoefficients to receive an object * extend test with sample data * Update src/calculator/votes.ts Co-authored-by: Mohamed Boudra <[email protected]> * move var only use in a test --------- Co-authored-by: Mohamed Boudra <[email protected]>
- Loading branch information
1 parent
c3c5a83
commit ef95333
Showing
10 changed files
with
415 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export type ProportionalMatchOptions = { | ||
score: { | ||
min: number; | ||
max: number; | ||
}; | ||
matchProportionPercentage: { | ||
min: number; | ||
max: number; | ||
}; | ||
}; | ||
|
||
export const defaultProportionalMatchOptions: ProportionalMatchOptions = { | ||
score: { | ||
min: 15, | ||
max: 25, | ||
}, | ||
matchProportionPercentage: { | ||
min: 50, | ||
max: 100, | ||
}, | ||
}; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.