Skip to content

Commit

Permalink
REF: Handle absence/presence of tzinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Nov 18, 2024
1 parent 8329d08 commit 4c0835f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 5 additions & 6 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,11 @@ def get_nipype_gitversion():
"""

# versions
NIBABEL_MIN_VERSION = "2.1.0"
NETWORKX_MIN_VERSION = "2.0"
NUMPY_MIN_VERSION = "1.17"
NUMPY_MAX_VERSION = "2.0"
SCIPY_MIN_VERSION = "0.14"
TRAITS_MIN_VERSION = "4.6"
NIBABEL_MIN_VERSION = "3.0"
NETWORKX_MIN_VERSION = "2.5"
NUMPY_MIN_VERSION = "1.21"
SCIPY_MIN_VERSION = "1.8"
TRAITS_MIN_VERSION = "6.2"
DATEUTIL_MIN_VERSION = "2.2"
SIMPLEJSON_MIN_VERSION = "3.8.0"
PROV_MIN_VERSION = "1.5.2"
Expand Down
9 changes: 8 additions & 1 deletion nipype/utils/draw_gantt_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,14 @@ def draw_nodes(start, nodes_list, cores, minute_scale, space_between_minutes, co
# Left
left = 60
for core in range(len(end_times)):
if end_times[core] < node_start:
try:
end_time_condition = end_times[core] < node_start
except TypeError:
# if one has a timezone and one does not
end_time_condition = end_times[core].replace(
tzinfo=None
) < node_start.replace(tzinfo=None)
if end_time_condition:
left += core * 30
end_times[core] = datetime.datetime(
node_finish.year,
Expand Down

0 comments on commit 4c0835f

Please sign in to comment.