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

Use regular ".now" instead of ".utcnow" with UTC zone #3670

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yarikoptic
Copy link
Member

It is mandated by starting to receive a DeprecationWarning in python 3.12

DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC)

discovered while addressing some other rot in heudiconv.

It is mandated by starting to receive a DeprecationWarning in python 3.12

    DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC)

discovered while addressing some other rot in heudiconv.
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 39.50%. Comparing base (4d1352a) to head (fce346e).

Files with missing lines Patch % Lines
nipype/pipeline/engine/workflows.py 50.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4d1352a) and HEAD (fce346e). Click for more details.

HEAD has 69 uploads less than BASE
Flag BASE (4d1352a) HEAD (fce346e)
73 4
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3670       +/-   ##
===========================================
- Coverage   70.83%   39.50%   -31.33%     
===========================================
  Files        1276     1277        +1     
  Lines       59314    59322        +8     
  Branches     9824     9825        +1     
===========================================
- Hits        42013    23435    -18578     
- Misses      16125    35729    +19604     
+ Partials     1176      158     -1018     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yarikoptic
Copy link
Member Author

eh, it isn't in 3.8 yet, so we have to craft python version specific adapter ...

now fails some other unrelated tests so must be something else (should be string instead of bytes?)

=========================== short test summary info ============================
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_compcor - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_compcor_variance_threshold_and_metadata - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor_no_percentile - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_compcor_no_regress_poly - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor_asymmetric_dim - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor_merge_intersect_masks - ValueError: invalid fmt: b'%.10f'
FAILED algorithms/tests/test_CompCor.py::TestCompCor::test_tcompcor_index_mask - ValueError: invalid fmt: b'%.10f'
FAILED interfaces/cmtk/cmtk.py::nipype.interfaces.cmtk.cmtk.length
FAILED interfaces/mixins/fixheader.py::nipype.interfaces.mixins.fixheader.CopyHeaderInterface
= 10 failed, 2724 passed, 243 skipped, 5 xfailed, 48 warnings in 142.18s (0:02:22) =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant