codeforpdx / recordexpungPDX

A project to automate the expungement of qualifying criminal records in Oregon. This project is done in conjunction with Qiu-Qiu Law.
https://recordsponge.com
MIT License
52 stars 88 forks source link

Label Refactor #1712

Closed JeremyC3 closed 1 year ago

JeremyC3 commented 1 year ago

Refactored label grouping algorithm as per #1711. As a result, one backend test case was changed to list charge grouping as "Eligible NOW If Balance Paid on case with Ineligible charge".

Changed grouping algorithm to sort by label and case number only, removed secondary date sort to ensure that charges with the same case number are properly grouped. Will re-introduce if users find new sorting less useful.

JeremyC3 commented 1 year ago

@KentShikama changes made to utilize an str,Enum with written-out classifications instead of a dict. Removed pre-existing comment about order now each classification is written out. Manually cast Enum back into an int on line 83 due to typecasting errors occurring when using IntEnum

JeremyC3 commented 1 year ago

Reverted the sorting logic back to if statements, changed no_balance label to has_balance to match the other variable case_has_ineligible_charge

KentShikama commented 1 year ago

You know about https://dev.recordsponge.com/ right?