Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a unit test for the bug with TT2000 conversions. #293

Open
bryan-harter opened this issue Jan 15, 2025 · 0 comments
Open

Make a unit test for the bug with TT2000 conversions. #293

bryan-harter opened this issue Jan 15, 2025 · 0 comments

Comments

@bryan-harter
Copy link
Member

This is in reference to PR #292 and issue #233

Let me recap this just for my later knowledge:

  1. The chunk of code I modified only does anything if there is data before 1972 in the array (and a "NaT" counts as before 1972)
  2. For some reason (that I'm still unclear about), we subtract 1 second from the array, and then add 1 second back in later
  3. The code that checks if we go over 60 seconds when we add 1 second back is supposed to +1 to the minutes, and subtract 60 seconds from the seconds. Otherwise, it adds +0 to the minutes (i.e. keeps it the same). Normal time handling stuff.
  4. INSTEAD, that code sets the minutes EQUAL to 0 or 1, NOT +0 or 1.
  5. It also rounded when I believe we want the np.floor() function, but that is relatively minor in comparison.
  6. As a result, the minutes keep getting reset down between 0 and 1. And then the only time there is a significant change is when the hour changes.

The functions which is affects are also INCREDIBLY dense, with variables names like "l" and "i", with basically no comments. It took me about 6 hours to figure out what was going on, just to change that one line. So ideally, better variable names and documentation will also be address by this ticket.

@bryan-harter bryan-harter moved this from To triage to Backlog in cdflib development Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant