-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
225 lines (198 loc) · 5.89 KB
/
pyproject.toml
File metadata and controls
225 lines (198 loc) · 5.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
[project]
name = "slurm-dashboard"
dynamic = ["version"]
authors = [
{ name = "Sören Wacker", email = "s.wacker@gmail.com" },
]
description = "Modern web dashboard for SLURM cluster usage analytics with DuckDB-powered data processing"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "GPL-3.0-or-later" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: System :: Monitoring",
"Topic :: System :: Systems Administration",
]
keywords = ["slurm", "hpc", "cluster", "dashboard", "monitoring", "analytics"]
# Core dependencies (minimal - only what's needed for all use cases)
dependencies = [
"python-dotenv>=1.0.0",
"pyyaml>=6.0.0",
]
[project.optional-dependencies]
# Agent for data collection on cluster nodes (lightweight)
agent = [
"pandas>=2.0.0,<2.2.0", # Pandas 2.2+ requires numpy 2.0 which needs GCC >= 9.3
"numpy>=1.24.0,<2.0.0", # Pin numpy <2.0 for compatibility with older GCC
"pyarrow>=10.0.0,<15.0.0", # Older version with pre-built wheels for legacy systems
"tabulate>=0.9.0",
"tqdm>=4.65.0",
"requests>=2.31.0", # For API-based data uploads
]
# Full data processing (for development/analysis)
data = [
"pandas>=2.0.0,<2.2.0",
"numpy>=1.24.0,<2.0.0",
"pyarrow>=10.0.0,<15.0.0",
"duckdb>=1.0.0",
"tqdm>=4.65.0",
]
# Web dashboard (FastAPI backend + dependencies)
web = [
"pandas>=2.0.0,<2.2.0",
"numpy>=1.24.0,<2.0.0",
"pyarrow>=10.0.0,<15.0.0",
"duckdb>=1.0.0",
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"gunicorn>=21.0.0",
"pydantic-settings>=2.5.0",
"python-multipart>=0.0.9",
"python3-saml>=1.15.0",
"PyJWT>=2.8.0",
"passlib[bcrypt]>=1.7.4",
"email-validator>=2.0.0",
"reportlab>=4.0.0",
"matplotlib>=3.8.0",
]
# Legacy dash dashboard (deprecated, will be removed)
dash = [
"dash>=2.0.0",
"dash-bootstrap-components>=1.4.0",
"flask-saml",
]
# Development dependencies
dev = [
"hatch>=1.13.0",
"pre-commit>=3.8.0",
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"ruff>=0.4.0",
]
# Documentation
docs = [
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.26.0",
]
# Everything (agent + web + data processing)
all = [
"slurm-dashboard[agent,web,data]",
]
[project.urls]
Homepage = "https://github.com/tudelft-reit/slurm-dashboard"
Documentation = "https://sdrwacker.pages.ewi.tudelft.nl/slurm-usage-history"
Repository = "https://github.com/tudelft-reit/slurm-dashboard"
Issues = "https://github.com/tudelft-reit/slurm-dashboard/issues"
[project.scripts]
# Main CLI (combines all functionality)
slurm-dashboard = "slurm_usage_history.scripts.cluster_agent:main"
# Data collection agent (legacy)
slurm-dashboard-agent = "slurm_usage_history.scripts.get_weekly_usage:main"
# Analysis scripts
slurm-dashboard-wait-times = "slurm_usage_history.scripts.waiting_times:main"
# Dashboard server (FastAPI with integrated frontend) - requires [web] extra
slurm-dashboard-server = "slurm_usage_history.backend.cli:main [web]"
# Legacy commands (deprecated, will be removed in v1.0.0)
slurm-agent = "slurm_usage_history.scripts.get_weekly_usage:main"
slurm-waiting-times = "slurm_usage_history.scripts.waiting_times:main"
slurm-backend = "slurm_usage_history.backend.cli:main [web]"
slurm-dashboard-legacy = "slurm_usage_history.app.main:main"
[dependency-groups]
dev = [
"hatch>=1.13.0",
"pre-commit>=3.8.0",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"mkdocstrings[python]>=0.26.1",
"mkdocs-material>=9.5.39",
"setuptools-scm>=8.1.0",
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/backend",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
]
[tool.hatch.build.targets.wheel]
packages = ["src/slurm_usage_history", "backend"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "INFO"
testpaths = ["tests"]
[tool.coverage]
run.source = ["slurm_usage_history"]
port.exclude_lines = [
'pragma: no cover',
'\.\.\.',
'if typing.TYPE_CHECKING:',
]
[tool.ruff]
src = ["src"]
exclude = []
line-length = 120
target-version = "py310"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
]
ignore = [
"PLR", # Design related pylint codes
"ISC001", # Conflicts with formatter
]
pydocstyle.convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**.py" = [
"ANN201", # Missing return type annotation
"D103", # Missing docstring
"S101", # Use of assert
"INP001", # Missing __init__.py
]
[tool.yamlfix]
line_length = 88
sequence_style = "keep_style"
explicit_start = false
whitelines = 1
section_whitelines = 1