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

Update oregon.pdf to version 2/2023. Closes #1672 and #1642. #1675

Closed monocle closed 1 year ago

monocle commented 1 year ago

@KentShikama The code isn't necessarily in a state that I would want to submit as a PR and I need to do more testing. But since the new form has to be used starting in March, I'm submitting it now to get the ball rolling.

Also, I'm just getting back into Python and have some dev tooling issues to figure out still and don't have auto formatting working.

monocle commented 1 year ago

@KentShikama I've added the new oregon.pdf to the oregon_with_arrest_order.pdf and oregon_with_convition_order.pdf and updated the source code and tests.

Here are how the generated PDFs look:

Unfortunately, I now see that if I open these PDFs in Preview, I see the check marks. However, if on these Github links and the PDFs open in the Firefox browser, then the check marks are invisible.

Will keep working at it.

monocle commented 1 year ago

Thanks @wittejm for helping out on this. What a life saver!

@KentShikama So in order to try to fix the inconsistent check mark issue, I tried going down the route for changing the annotations instead of the AcroForm.Fields. Using that, things seem to be working on Chrome, Firefox, Acrobat Reader and Safari and Preview. I still need to do more testing, but now out of nowhere I'm getting failing tests for test_time_analyzer.

I need to figure out what happened there. I don't remember touching anything related to that test file.

KentShikama commented 1 year ago

Just some tests that didn't really scale through time. The dates are 2023, Feb 28 which happens to be today. Try bumping it to 2025 or something.

KentShikama commented 1 year ago

@monocle Are you comfortable with handling the test fixes?

monocle commented 1 year ago

@KentShikama It's not clear to me how to fix the time analyzer tests. Only one is failing today compared to four from yesterday. I just commented the test out for now if that's okay.

KentShikama commented 1 year ago

Hmm. This could also be a leap year problem. 2023 isn't a leap year but 2020 and 2024 are and we are doing comparisons for X years and +/- 1 day before/after in this code a lot.

KentShikama commented 1 year ago

Let's just keep the test in and merge this PR. I'm sure it will be "fixed" by tomorrow.

monocle commented 1 year ago

@KentShikama I created an Issue to document the problem. I can check it tomorrow and if everything is passing, I can uncomment the test and submit a PR to put it back.

KentShikama commented 1 year ago

@monocle Yup safe approach.

KentShikama commented 1 year ago

I'm going to go ahead and merge. We can continue discussing any comments if you want.