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

[FIX] Remove deprecated utcnow #65

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

teald
Copy link
Member

@teald teald commented Oct 10, 2024

This still fails some tests because of differences in 3.12. There's also an issue with times being truncated, which may be a formatting issue that cannot be addressed right now (see below).

This closes Issue #17

Truncated times issue

When running the 3.12 tests, get an initial failure at:

FAILED tests/unit/test_provenance.py::test_add_get_history - AssertionError: assert ('primitive', 'args', '2024-10-10T22:30:21.654469
+0', '2024-10-11T22:30:21.654469+0') == ('primitive', 'args', '2024-10-10T22:30:21.654469+00:00', '2024-10-11T22:30:21.654469+00:00')
  
  At index 2 diff: '2024-10-10T22:30:21.654469+0' != '2024-10-10T22:30:21.654469+00:00'
  
  Full diff:
    (
        'primitive',
        'args',
  -     '2024-10-10T22:30:21.654469+00:00',
  ?                                  ----
  +     '2024-10-10T22:30:21.654469+0',
  -     '2024-10-11T22:30:21.654469+00:00',
  ?                                  ----
  +     '2024-10-11T22:30:21.654469+0',
    )

This likely has to do with truncation happening that was not previously supported. I'm not sure if this is a limitation of FITS, astrodata, or something else at this point.

TODO

  • Compare previous outputs directly.
    • Turn this into a test, to test for updates to any time formatting moving forward
    • Have single function for generating time strings? mostly affects astrodata/provenance.py

This still fails some tests because of differences in 3.12. There's also
an issue with times being truncated, which may be a formatting issue
that cannot be addressed right now.
@teald teald added maintenance For maintenance tasks test Related to testing misc Miscellaneous (not covered by other tags) labels Oct 10, 2024
@teald teald self-assigned this Oct 10, 2024
@teald teald linked an issue Oct 10, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance For maintenance tasks misc Miscellaneous (not covered by other tags) test Related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OTHER] Update deprecated calls to datetime.datetime.utcnow()
1 participant