slurm-mailer 0.1.0__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.
- slurm_mailer-0.1.0/LICENSE +21 -0
- slurm_mailer-0.1.0/PKG-INFO +115 -0
- slurm_mailer-0.1.0/README.md +104 -0
- slurm_mailer-0.1.0/pyproject.toml +28 -0
- slurm_mailer-0.1.0/setup.cfg +8 -0
- slurm_mailer-0.1.0/src/slurm_mailer.egg-info/PKG-INFO +115 -0
- slurm_mailer-0.1.0/src/slurm_mailer.egg-info/SOURCES.txt +11 -0
- slurm_mailer-0.1.0/src/slurm_mailer.egg-info/dependency_links.txt +1 -0
- slurm_mailer-0.1.0/src/slurm_mailer.egg-info/entry_points.txt +2 -0
- slurm_mailer-0.1.0/src/slurm_mailer.egg-info/top_level.txt +1 -0
- slurm_mailer-0.1.0/src/slurm_mailer.py +609 -0
- slurm_mailer-0.1.0/tests/test_slurm_mailer.py +393 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hu Zheyang <jsjyhzy@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: slurm-mailer
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Slurm job status transient notification program via email
|
|
5
|
+
Author-email: Hu Zheyang <jsjyhzy@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
# slurm-mailer
|
|
13
|
+
|
|
14
|
+
Slurm Job Status Notification Daemon
|
|
15
|
+
|
|
16
|
+
A tool for monitoring Slurm job status changes and sending email notifications
|
|
17
|
+
when jobs transition between states. Changes are aggregated over a configurable
|
|
18
|
+
time window before sending.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⚠️ Important Notice
|
|
23
|
+
|
|
24
|
+
**This project is AI-generated.** The code has not been thoroughly reviewed by a
|
|
25
|
+
human developer for all edge cases, security implications, or production-readiness.
|
|
26
|
+
Use at your own risk.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## User-Space Notification
|
|
31
|
+
|
|
32
|
+
This tool operates entirely on the Slurm client side. **No Slurm administrator
|
|
33
|
+
privileges or configuration changes are required.**
|
|
34
|
+
|
|
35
|
+
- Runs by polling `squeue` and `sacct` like any Slurm user can do
|
|
36
|
+
- No modifications to `slurm.conf`, `sacct.conf`, or admin partitions required
|
|
37
|
+
- Can monitor only your own jobs, or all visible jobs if permissions allow
|
|
38
|
+
- No system-wide impact; runs as a regular daemon
|
|
39
|
+
|
|
40
|
+
### How It Differs from Admin Notifications
|
|
41
|
+
|
|
42
|
+
| Admin System Notification | This Tool |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Requires `slurm.conf` modifications | Runs as standalone daemon |
|
|
45
|
+
| Admin sets recipients | User configures their own email |
|
|
46
|
+
| Affects all users | Only monitors specified user's jobs |
|
|
47
|
+
| Requires restart of daemons | Runs independently |
|
|
48
|
+
| Site-wide policy | User-controlled |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- **Dual querying**: Uses both `squeue` (active jobs) and `sacct` (completed/failed jobs)
|
|
55
|
+
- **Change detection** with aggregation window
|
|
56
|
+
- **Rich HTML email** with inline CSS (emoji-free)
|
|
57
|
+
- **Configurable polling interval** and aggregation window
|
|
58
|
+
- **Aggregation** of multiple changes before sending
|
|
59
|
+
- **Status badge** colors and labels
|
|
60
|
+
|
|
61
|
+
### User-Space Benefits
|
|
62
|
+
|
|
63
|
+
- No Slurm admin required
|
|
64
|
+
- No system configuration changes
|
|
65
|
+
- Works on shared/HPC systems where users cannot modify config
|
|
66
|
+
- User controls who receives notifications
|
|
67
|
+
- Can monitor any user within permission limits
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv sync
|
|
75
|
+
# or install the wheel
|
|
76
|
+
uv pip install dist/slurm_mailer-0.1.0-py3-none-any.whl
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
Copy `config.ini` and adjust the settings:
|
|
82
|
+
|
|
83
|
+
```ini
|
|
84
|
+
[smtp]
|
|
85
|
+
host = smtp.example.com
|
|
86
|
+
port = 587
|
|
87
|
+
tls = true
|
|
88
|
+
user = your_user
|
|
89
|
+
password = your_password
|
|
90
|
+
|
|
91
|
+
[email]
|
|
92
|
+
from = slurm-mailer@example.com
|
|
93
|
+
to = recipient@example.com
|
|
94
|
+
|
|
95
|
+
[slurm]
|
|
96
|
+
watch_all_users = false
|
|
97
|
+
aggregation_minutes = 10
|
|
98
|
+
poll_interval_seconds = 30
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Usage
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
slurm-mailer
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Or run from source:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
uv run slurm-mailer
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# slurm-mailer
|
|
2
|
+
|
|
3
|
+
Slurm Job Status Notification Daemon
|
|
4
|
+
|
|
5
|
+
A tool for monitoring Slurm job status changes and sending email notifications
|
|
6
|
+
when jobs transition between states. Changes are aggregated over a configurable
|
|
7
|
+
time window before sending.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ⚠️ Important Notice
|
|
12
|
+
|
|
13
|
+
**This project is AI-generated.** The code has not been thoroughly reviewed by a
|
|
14
|
+
human developer for all edge cases, security implications, or production-readiness.
|
|
15
|
+
Use at your own risk.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## User-Space Notification
|
|
20
|
+
|
|
21
|
+
This tool operates entirely on the Slurm client side. **No Slurm administrator
|
|
22
|
+
privileges or configuration changes are required.**
|
|
23
|
+
|
|
24
|
+
- Runs by polling `squeue` and `sacct` like any Slurm user can do
|
|
25
|
+
- No modifications to `slurm.conf`, `sacct.conf`, or admin partitions required
|
|
26
|
+
- Can monitor only your own jobs, or all visible jobs if permissions allow
|
|
27
|
+
- No system-wide impact; runs as a regular daemon
|
|
28
|
+
|
|
29
|
+
### How It Differs from Admin Notifications
|
|
30
|
+
|
|
31
|
+
| Admin System Notification | This Tool |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Requires `slurm.conf` modifications | Runs as standalone daemon |
|
|
34
|
+
| Admin sets recipients | User configures their own email |
|
|
35
|
+
| Affects all users | Only monitors specified user's jobs |
|
|
36
|
+
| Requires restart of daemons | Runs independently |
|
|
37
|
+
| Site-wide policy | User-controlled |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Dual querying**: Uses both `squeue` (active jobs) and `sacct` (completed/failed jobs)
|
|
44
|
+
- **Change detection** with aggregation window
|
|
45
|
+
- **Rich HTML email** with inline CSS (emoji-free)
|
|
46
|
+
- **Configurable polling interval** and aggregation window
|
|
47
|
+
- **Aggregation** of multiple changes before sending
|
|
48
|
+
- **Status badge** colors and labels
|
|
49
|
+
|
|
50
|
+
### User-Space Benefits
|
|
51
|
+
|
|
52
|
+
- No Slurm admin required
|
|
53
|
+
- No system configuration changes
|
|
54
|
+
- Works on shared/HPC systems where users cannot modify config
|
|
55
|
+
- User controls who receives notifications
|
|
56
|
+
- Can monitor any user within permission limits
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv sync
|
|
64
|
+
# or install the wheel
|
|
65
|
+
uv pip install dist/slurm_mailer-0.1.0-py3-none-any.whl
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
Copy `config.ini` and adjust the settings:
|
|
71
|
+
|
|
72
|
+
```ini
|
|
73
|
+
[smtp]
|
|
74
|
+
host = smtp.example.com
|
|
75
|
+
port = 587
|
|
76
|
+
tls = true
|
|
77
|
+
user = your_user
|
|
78
|
+
password = your_password
|
|
79
|
+
|
|
80
|
+
[email]
|
|
81
|
+
from = slurm-mailer@example.com
|
|
82
|
+
to = recipient@example.com
|
|
83
|
+
|
|
84
|
+
[slurm]
|
|
85
|
+
watch_all_users = false
|
|
86
|
+
aggregation_minutes = 10
|
|
87
|
+
poll_interval_seconds = 30
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Usage
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
slurm-mailer
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or run from source:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
uv run slurm-mailer
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "slurm-mailer"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Slurm job status transient notification program via email"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Hu Zheyang", email = "jsjyhzy@gmail.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
dependencies = []
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
slurm-mailer = "slurm_mailer:main"
|
|
15
|
+
|
|
16
|
+
[build-system]
|
|
17
|
+
requires = ["setuptools>=64"]
|
|
18
|
+
build-backend = "setuptools.build_meta"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.package-dir]
|
|
21
|
+
"" = "src"
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = [
|
|
25
|
+
"flake8>=7.3.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: slurm-mailer
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Slurm job status transient notification program via email
|
|
5
|
+
Author-email: Hu Zheyang <jsjyhzy@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
# slurm-mailer
|
|
13
|
+
|
|
14
|
+
Slurm Job Status Notification Daemon
|
|
15
|
+
|
|
16
|
+
A tool for monitoring Slurm job status changes and sending email notifications
|
|
17
|
+
when jobs transition between states. Changes are aggregated over a configurable
|
|
18
|
+
time window before sending.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⚠️ Important Notice
|
|
23
|
+
|
|
24
|
+
**This project is AI-generated.** The code has not been thoroughly reviewed by a
|
|
25
|
+
human developer for all edge cases, security implications, or production-readiness.
|
|
26
|
+
Use at your own risk.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## User-Space Notification
|
|
31
|
+
|
|
32
|
+
This tool operates entirely on the Slurm client side. **No Slurm administrator
|
|
33
|
+
privileges or configuration changes are required.**
|
|
34
|
+
|
|
35
|
+
- Runs by polling `squeue` and `sacct` like any Slurm user can do
|
|
36
|
+
- No modifications to `slurm.conf`, `sacct.conf`, or admin partitions required
|
|
37
|
+
- Can monitor only your own jobs, or all visible jobs if permissions allow
|
|
38
|
+
- No system-wide impact; runs as a regular daemon
|
|
39
|
+
|
|
40
|
+
### How It Differs from Admin Notifications
|
|
41
|
+
|
|
42
|
+
| Admin System Notification | This Tool |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Requires `slurm.conf` modifications | Runs as standalone daemon |
|
|
45
|
+
| Admin sets recipients | User configures their own email |
|
|
46
|
+
| Affects all users | Only monitors specified user's jobs |
|
|
47
|
+
| Requires restart of daemons | Runs independently |
|
|
48
|
+
| Site-wide policy | User-controlled |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- **Dual querying**: Uses both `squeue` (active jobs) and `sacct` (completed/failed jobs)
|
|
55
|
+
- **Change detection** with aggregation window
|
|
56
|
+
- **Rich HTML email** with inline CSS (emoji-free)
|
|
57
|
+
- **Configurable polling interval** and aggregation window
|
|
58
|
+
- **Aggregation** of multiple changes before sending
|
|
59
|
+
- **Status badge** colors and labels
|
|
60
|
+
|
|
61
|
+
### User-Space Benefits
|
|
62
|
+
|
|
63
|
+
- No Slurm admin required
|
|
64
|
+
- No system configuration changes
|
|
65
|
+
- Works on shared/HPC systems where users cannot modify config
|
|
66
|
+
- User controls who receives notifications
|
|
67
|
+
- Can monitor any user within permission limits
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv sync
|
|
75
|
+
# or install the wheel
|
|
76
|
+
uv pip install dist/slurm_mailer-0.1.0-py3-none-any.whl
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
Copy `config.ini` and adjust the settings:
|
|
82
|
+
|
|
83
|
+
```ini
|
|
84
|
+
[smtp]
|
|
85
|
+
host = smtp.example.com
|
|
86
|
+
port = 587
|
|
87
|
+
tls = true
|
|
88
|
+
user = your_user
|
|
89
|
+
password = your_password
|
|
90
|
+
|
|
91
|
+
[email]
|
|
92
|
+
from = slurm-mailer@example.com
|
|
93
|
+
to = recipient@example.com
|
|
94
|
+
|
|
95
|
+
[slurm]
|
|
96
|
+
watch_all_users = false
|
|
97
|
+
aggregation_minutes = 10
|
|
98
|
+
poll_interval_seconds = 30
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Usage
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
slurm-mailer
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Or run from source:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
uv run slurm-mailer
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.cfg
|
|
5
|
+
src/slurm_mailer.py
|
|
6
|
+
src/slurm_mailer.egg-info/PKG-INFO
|
|
7
|
+
src/slurm_mailer.egg-info/SOURCES.txt
|
|
8
|
+
src/slurm_mailer.egg-info/dependency_links.txt
|
|
9
|
+
src/slurm_mailer.egg-info/entry_points.txt
|
|
10
|
+
src/slurm_mailer.egg-info/top_level.txt
|
|
11
|
+
tests/test_slurm_mailer.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
slurm_mailer
|