nodeocc 1.0.1__tar.gz → 1.0.2__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.1 → nodeocc-1.0.2}/PKG-INFO +2 -2
  2. {nodeocc-1.0.1 → nodeocc-1.0.2}/pyproject.toml +2 -2
  3. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/controller/controller.py +20 -10
  4. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/model/infrastructure.py +1 -1
  5. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/PKG-INFO +2 -2
  6. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/curses_multiwindow.py +2 -2
  7. {nodeocc-1.0.1 → nodeocc-1.0.2}/README.md +0 -0
  8. {nodeocc-1.0.1 → nodeocc-1.0.2}/setup.cfg +0 -0
  9. {nodeocc-1.0.1 → nodeocc-1.0.2}/setup.py +0 -0
  10. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/__init__.py +0 -0
  11. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/model/job.py +0 -0
  12. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/SOURCES.txt +0 -0
  13. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/dependency_links.txt +0 -0
  14. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/entry_points.txt +0 -0
  15. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/requires.txt +0 -0
  16. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/nodeocc.egg-info/top_level.txt +0 -0
  17. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/readers/compute_wait_time.py +0 -0
  18. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/readers/slurmreader.py +0 -0
  19. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/__init__.py +0 -0
  20. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/slurm_list.py +0 -0
  21. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/slurm_viz.py +0 -0
  22. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/styles.py +0 -0
  23. {nodeocc-1.0.1 → nodeocc-1.0.2}/src/view/utils.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nodeocc
3
- Version: 1.0.1
3
+ Version: 1.0.2
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
7
7
  License: MIT
8
- Project-URL: Repository, https://github.com/mbosc/slurm_nodeocc
8
+ Project-URL: Repository, https://github.com/apanariello4/slurm_nodeocc
9
9
  Keywords: Slurm,GPU,TUI,CLI,HPC,cluster,allocations,nodeocc
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console :: Curses
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nodeocc"
7
- version = "1.0.1"
7
+ version = "1.0.2"
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"
@@ -30,7 +30,7 @@ classifiers = [
30
30
  dependencies = ["pandas", "numpy"]
31
31
 
32
32
  [project.urls]
33
- Repository = "https://github.com/mbosc/slurm_nodeocc"
33
+ Repository = "https://github.com/apanariello4/slurm_nodeocc"
34
34
 
35
35
  [project.scripts]
36
36
  nodeocc = "controller.controller:_main"
@@ -29,28 +29,35 @@ import importlib.metadata
29
29
 
30
30
  program_name = 'nodeocc'
31
31
  version_number = importlib.metadata.version(program_name)
32
+ updated = False
32
33
 
33
- # get newest version from pip
34
+ BBLUE = '\033[1;34m'
35
+ END = '\033[0m'
34
36
  try:
35
37
  url = "https://pypi.python.org/pypi/nodeocc/json"
36
38
  import requests
37
39
  newest_version = json.loads(requests.get(url).text)['info']['version']
40
+ print(BBLUE, end='')
38
41
  if newest_version.split('.')[0] > version_number.split('.')[0]:
39
42
  print(f"New major version available: {newest_version} (current: {version_number})")
40
- for _ in range(5):
41
- print('.', end='')
42
- time.sleep(0.5)
43
+ print(f"Please update with 'pip install {program_name} --upgrade'")
44
+ time.sleep(7)
43
45
  elif newest_version.split('.')[1] > version_number.split('.')[1]:
44
46
  print(f"New minor version available: {newest_version} (current: {version_number})")
45
- for _ in range(3):
46
- print('.', end='')
47
- time.sleep(0.5)
47
+ print(f"Please update with 'pip install {program_name} --upgrade'")
48
+ time.sleep(7)
48
49
  elif newest_version.split('.')[2] > version_number.split('.')[2]:
49
50
  print(f"New patch version available: {newest_version} (current: {version_number})")
50
- time.sleep(0.5)
51
+ print(f"Please update with 'pip install {program_name} --upgrade'")
52
+ time.sleep(7)
53
+ else:
54
+ print(f"Up to date: {version_number}")
55
+ updated = True
56
+ time.sleep(3)
57
+ print(END, end='')
51
58
  except Exception as e:
52
- print(f"Could not get newest version from pip, check if {program_name} is up to date")
53
- time.sleep(1)
59
+ print(f"{BBLUE}Could not get newest version from pip, check if {program_name} is up to date{END}")
60
+ time.sleep(5)
54
61
 
55
62
 
56
63
  BEGIN_DELIM = "!{$"
@@ -246,6 +253,9 @@ def _main():
246
253
  # configure singleton
247
254
 
248
255
  Singleton.getInstance().signature = f"{program_name} v{version_number}"
256
+ Singleton.getInstance().version = version_number
257
+ Singleton.getInstance().updated = updated
258
+ Singleton.getInstance().newest_version = newest_version
249
259
  Singleton.getInstance().fetch_fn = get_all
250
260
 
251
261
  wrapper(display_main)
@@ -67,7 +67,7 @@ class Infrastructure:
67
67
  self.cpu_limit_grp = cpu_limit_grp
68
68
  self.cpu_limit_stu = cpu_limit_stu
69
69
  self.cpu_limit_stugrp = cpu_limit_stugrp
70
- self.prior = ['RTX6000', '2080', 'V100', 'RTXA5000', 'RTX5000', '1080', 'P100', 'n/a', None, 'K80']
70
+ self.prior = ['n/a', None, 'RTXA5000', 'RTX6000', 'RTX5000', '2080', 'V100', '1080', 'P100', 'K80']
71
71
 
72
72
  @staticmethod
73
73
  def from_dict(d):
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nodeocc
3
- Version: 1.0.1
3
+ Version: 1.0.2
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
7
7
  License: MIT
8
- Project-URL: Repository, https://github.com/mbosc/slurm_nodeocc
8
+ Project-URL: Repository, https://github.com/apanariello4/slurm_nodeocc
9
9
  Keywords: Slurm,GPU,TUI,CLI,HPC,cluster,allocations,nodeocc
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console :: Curses
@@ -459,8 +459,8 @@ def update_screen(stdscr, instance):
459
459
  # get slurm user partition
460
460
  stdscr.addstr(lines - 1, xoffset + 62 + 2, f'(Avg time {instance.avg_wait_time})', curses.color_pair(2))
461
461
 
462
- signature = instance.signature
463
- stdscr.addstr(lines - 1, columns - 2 - len(signature), signature)
462
+ signature = instance.signature if instance.updated else f'{instance.version} -> {instance.newest_version}'
463
+ stdscr.addstr(lines - 1, columns - 2 - len(signature), signature, curses.color_pair(2) if instance.updated else curses.color_pair(3))
464
464
 
465
465
  stdscr.refresh()
466
466
  curses.doupdate()
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
File without changes