nodeocc 1.0.22__tar.gz → 1.0.23__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.
Files changed (23) hide show
  1. {nodeocc-1.0.22 → nodeocc-1.0.23}/PKG-INFO +1 -1
  2. {nodeocc-1.0.22 → nodeocc-1.0.23}/pyproject.toml +1 -1
  3. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/PKG-INFO +1 -1
  4. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/readers/slurmreader.py +1 -1
  5. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/curses_multiwindow.py +7 -0
  6. {nodeocc-1.0.22 → nodeocc-1.0.23}/README.md +0 -0
  7. {nodeocc-1.0.22 → nodeocc-1.0.23}/setup.cfg +0 -0
  8. {nodeocc-1.0.22 → nodeocc-1.0.23}/setup.py +0 -0
  9. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/__init__.py +0 -0
  10. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/controller/controller.py +0 -0
  11. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/model/infrastructure.py +0 -0
  12. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/model/job.py +0 -0
  13. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/SOURCES.txt +0 -0
  14. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/dependency_links.txt +0 -0
  15. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/entry_points.txt +0 -0
  16. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/requires.txt +0 -0
  17. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/nodeocc.egg-info/top_level.txt +0 -0
  18. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/readers/compute_wait_time.py +0 -0
  19. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/__init__.py +0 -0
  20. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/slurm_list.py +0 -0
  21. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/slurm_viz.py +0 -0
  22. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/styles.py +0 -0
  23. {nodeocc-1.0.22 → nodeocc-1.0.23}/src/view/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nodeocc
3
- Version: 1.0.22
3
+ Version: 1.0.23
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.22"
7
+ version = "1.0.23"
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.22
3
+ Version: 1.0.23
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
@@ -36,7 +36,7 @@ def _match_str_wildcard(s, w):
36
36
 
37
37
  def _node_from_sinfo(x):
38
38
  n = Node(_node_preproc(x['NODELIST']), x.n_gpu, x.m_gpu, x.reserved, None, x.CPUS, x.MEMORY) # , feature=x.AVAIL_FEATURES)
39
- if x['STATE'] == 'drng' or 'drain' in x['STATE']:
39
+ if 'drng' in x['STATE'] or 'drain' in x['STATE']:
40
40
  n.status = 'drain'
41
41
  elif x['STATE'].upper() in ('MAINT', 'DOWN', 'DOWN*', 'FAIL', 'FAILING', 'FAIL*') or _match_str_wildcard(x['STATE'].lower(), 'inv*'):
42
42
  n.status = 'down'
@@ -205,12 +205,19 @@ class Singleton:
205
205
  # create file to store port with 666 permissions to file
206
206
  # file is in folder basepath/nodename/master_{port}.portfile
207
207
  bp = os.path.join(self.basepath, nodename)
208
+ created = False
208
209
  if not os.path.exists(bp):
210
+ created = True
209
211
  os.makedirs(bp, mode=0o777)
212
+
210
213
  filepath = Path(os.path.join(bp, f"master_{self.port}.portfile"))
211
214
  filepath.write_text(str(self.pid))
212
215
  os.chmod(filepath, 0o666)
213
216
 
217
+ # force 777 permissions
218
+ if created:
219
+ os.chmod(bp, 0o777)
220
+
214
221
  self.port_filepath = filepath
215
222
  except Exception as e:
216
223
  self.err(f"Could not create port file: {e}")
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