nodeocc 1.0.8__tar.gz → 1.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nodeocc
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: TUI application for viewing the status of GPU allocations on a Slurm cluster
5
5
  Author: Matteo Boschini
6
6
  Maintainer: Lorenzo Bonicelli, Aniello Panariello
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nodeocc"
7
- version = "1.0.8"
7
+ version = "1.0.9"
8
8
  authors = [{ name = "Matteo Boschini" }]
9
9
  maintainers = [{ name = "Lorenzo Bonicelli" }, { name = "Aniello Panariello" }]
10
10
  description = "TUI application for viewing the status of GPU allocations on a Slurm cluster"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nodeocc
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: TUI application for viewing the status of GPU allocations on a Slurm cluster
5
5
  Author: Matteo Boschini
6
6
  Maintainer: Lorenzo Bonicelli, Aniello Panariello
@@ -85,8 +85,10 @@ def _read_maintenances():
85
85
  if not len(reservations):
86
86
  return [], None, None
87
87
  reservations = pd.DataFrame.from_records(reservations)
88
- reservations['StartTime'] = str(pd.to_datetime(reservations['StartTime']))
89
- reservations['EndTime'] = str(pd.to_datetime(reservations['EndTime']))
88
+ reservations['StartTime'] = reservations['StartTime'].apply(lambda x:str(pd.to_datetime(x)))
89
+ reservations['EndTime'] = reservations['EndTime'].apply(lambda x:str(pd.to_datetime(x)))
90
+ # reservations['StartTime'] = str(pd.to_datetime(reservations['StartTime']))
91
+ # reservations['EndTime'] = str(pd.to_datetime(reservations['EndTime']))
90
92
  reservations = _split_column(reservations, 'Nodes')
91
93
  maint_flag = reservations['Flags'].str.contains('MAINT') & \
92
94
  reservations['Flags'].str.contains('SPEC_NODES') & \
@@ -22,8 +22,12 @@ def to_datetime(time_str):
22
22
  return np.datetime64(re.match(r'\d+\s+(.*)\n', str(time_str)).group(1))
23
23
 
24
24
 
25
- def to_datetime(time_str):
26
- return np.datetime64(re.match(r'\d+\s+(.*)\n', str(time_str)).group(1))
25
+ def to_datetime(time_str):
26
+ try:
27
+ dt = np.datetime64(re.match(r'\d+\s+(.*)\n', str(time_str)).group(1))
28
+ except:
29
+ dt = np.datetime64(str(time_str))
30
+ return dt
27
31
 
28
32
 
29
33
  def maintenance_status(infrastructure):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes