richqueue 1.11__tar.gz → 1.11.1__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.4
2
2
  Name: richqueue
3
- Version: 1.11
3
+ Version: 1.11.1
4
4
  Summary: RichQueue
5
5
  Project-URL: Homepage, https://github.com/mwinokan/RichQueue/issues
6
6
  Project-URL: Bug Tracker, https://github.com/mwinokan/RichQueue/issues
@@ -3,7 +3,7 @@ requires = ["hatchling"]
3
3
  build-backend = "hatchling.build"
4
4
  [project]
5
5
  name = "richqueue"
6
- version = "1.11"
6
+ version = "1.11.1"
7
7
  authors = [
8
8
  { name = "Max Winokan", email = "max@winokan.com" },
9
9
  ]
@@ -9,6 +9,24 @@ from .console import console
9
9
 
10
10
  def submit():
11
11
 
12
+ sbatch_args = sys.argv[1:]
13
+
14
+ if not sbatch_args:
15
+ console.print("[red bold]Please provide sbatch arguments")
16
+ console.print(
17
+ "\n[bold yellow]Usage:[reset][bold] sb [SBATCH OPTIONS] SCRIPT [SCRIPT ARGS]...\n"
18
+ )
19
+ sys.exit(1)
20
+
21
+ elif len(sbatch_args) == 1 and sbatch_args[0] in ["-h", "--help"]:
22
+ console.print(
23
+ "\n[bold]sb[reset]: a pretty wrapper to the sbatch command that places log files in the directory specified by the LOGS variable"
24
+ )
25
+ console.print(
26
+ "\n[bold yellow]Usage:[reset][bold] sb [SBATCH OPTIONS] SCRIPT [SCRIPT ARGS]...\n"
27
+ )
28
+ sys.exit(1)
29
+
12
30
  log_dir = environ.get("LOGS")
13
31
 
14
32
  if not log_dir:
@@ -17,8 +35,6 @@ def submit():
17
35
 
18
36
  log_dir = Path(log_dir)
19
37
 
20
- sbatch_args = sys.argv[1:]
21
-
22
38
  commands = [
23
39
  "sbatch",
24
40
  "--output=" f"{log_dir.resolve()}/%j.log",
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