-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update recent conviction algorithm (#429)
* Refactor MRC's method Refactored so that MRC and 2MRC each have their own method. * Refactor MRC tests * added test_violation_is_not_most_recent, passed with Expunger change * Add recent_convictions list to expunger Done to make it easier to track recent convictions, so we don't have to continually check if a charge is a recent_conviction. Added test_recent_violation_and_nonrecent_misdemeanor to test if expunger is correctly treating nonrecent charges. * Add test for nonrecent misdemeanor and recent violation The test is test_recent_violation_and_nonrecent_misdemeanor. When there is a recent violation, test checks if nonrecent misdemeanor is set as recent charge (it shouldn't be). * Refactor: Extract Time class This is being done to dry up the code since these date constants are used in other classes. * Remove dupliucate date constants * Refactor: Use the Time data class Using the new Time data class. * Refactor test to dry out code * Create run expunger method to dry out test code * Add tests to handle new rule for considering violations A single violation does not count as a recent conviction. It takes two violations to count. See issue #382 for a detailed explanation. * Update most recent convictions algorithm Please see issue #382 for more details. Fixes #382 * Update changelog
- Loading branch information
1 parent
90b47a3
commit 0e7d7e6
Showing
5 changed files
with
344 additions
and
152 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
Oops, something went wrong.