slurm-cli 1.0.0__py3-none-any.whl

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.
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: slurm-cli
3
+ Version: 1.0.0
4
+ Summary: A CLI tool for Slurm cluster management with autocomplete functionality
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Keywords: slurm,cli,cluster,management
8
+ Author: Sergey Zhumatiy
9
+ Author-email: szhumatiy@gmail.com
10
+ Maintainer: Sergey Zhumatiy
11
+ Maintainer-email: szhumatiy@gmail.com
12
+ Requires-Python: >=3.9,<4.0
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Operating System :: Unix
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Classifier: Topic :: System :: Clustering
29
+ Classifier: Topic :: System :: Systems Administration
30
+ Requires-Dist: click (>=8.1.0,<9.0.0)
31
+ Requires-Dist: click-aliases (>=1.0.1,<2.0.0)
32
+ Requires-Dist: fast-autocomplete (>=0.9.0,<0.10.0)
33
+ Requires-Dist: rapidfuzz (>=3.13.0,<4.0.0)
34
+ Requires-Dist: rich (>=13.0.0,<14.0.0)
35
+ Requires-Dist: setuptools (>=40.0,<72)
36
+ Project-URL: Documentation, https://slurm-cli.readthedocs.io/
37
+ Project-URL: Homepage, https://github.com/zhum/slurm-cli
38
+ Project-URL: Repository, https://github.com/zhum/slurm-cli.git
39
+ Description-Content-Type: text/markdown
40
+
41
+ # Slurm CLI
42
+
43
+ A CLI tool for Slurm cluster management with autocomplete functionality.
44
+
45
+ ## Features
46
+
47
+ - Interactive command-line interface for Slurm cluster management via slurm commands wrapping
48
+ - Autocomplete support for commands and parameters
49
+ - Support for managing partitions, nodes, jobs, users, QoS, accounts, and reservations
50
+ - Rich console output with colored and formatted text
51
+ - Fast fuzzy matching for autocomplete suggestions
52
+
53
+ ## Installation
54
+
55
+ ### From PyPI
56
+
57
+ The easiest way to install slurm-cli is using pip:
58
+
59
+ ```bash
60
+ pip install slurm-cli
61
+ ```
62
+
63
+ ### From Source
64
+
65
+ To install from source:
66
+
67
+ ```bash
68
+ # Clone the repository
69
+ git clone https://github.com/zhum/slurm-cli.git
70
+ cd slurm-cli
71
+
72
+ # Install dependencies using Poetry
73
+ poetry install
74
+
75
+ # Activate the virtual environment
76
+ poetry shell
77
+ ```
78
+
79
+ ### Development Setup
80
+
81
+ For development, you'll also want to install the development dependencies:
82
+
83
+ ```bash
84
+ poetry install --with dev
85
+ poetry run pre-commit install
86
+ ```
87
+
88
+ ## Usage
89
+
90
+ Run the CLI tool:
91
+
92
+ ```bash
93
+ slurm-cli
94
+ ```
95
+
96
+ Or with Poetry:
97
+
98
+ ```bash
99
+ poetry run slurm-cli
100
+ ```
101
+
102
+ ### Autocomplete Setup
103
+
104
+ To enable bash autocompletion for this command:
105
+
106
+ 1. Install the completion script:
107
+
108
+ ```bash
109
+ eval "$(_CLICK_COMPLETE=bash_source slurm-cli)"
110
+ ```
111
+
112
+ 1. Add the above line to your `~/.bashrc` or `~/.bash_profile` to make it permanent.
113
+
114
+ 1. Restart your shell or run: `source ~/.bashrc`
115
+
116
+ Alternatively, you can generate a completion script file:
117
+
118
+ ```bash
119
+ _CLICK_COMPLETE=bash_source slurm-cli > \
120
+ ~/.local/share/bash-completion/completions/slurm-cli
121
+ ```
122
+
123
+ ## Development
124
+
125
+ ### Autocomplete
126
+
127
+ See [AUTOCOMPLETE.md](AUTOCOMPLETE.md) for implementation and development details.
128
+
129
+ ### Running Tests
130
+
131
+ ```bash
132
+ poetry run pytest
133
+ # or with coverage
134
+ poetry run pytest --cov=slurm_cli
135
+ ```
136
+
137
+ ### Code Formatting
138
+
139
+ ```bash
140
+ poetry run black src tests
141
+ poetry run isort src tests
142
+ ```
143
+
144
+ ### Type Checking
145
+
146
+ ```bash
147
+ poetry run mypy src/
148
+ ```
149
+
150
+ ### All Checks
151
+
152
+ ```bash
153
+ make check
154
+ # or
155
+ poetry run tox
156
+ ```
157
+
158
+ ### Building Documentation
159
+
160
+ ```bash
161
+ make docs
162
+ # or
163
+ poetry run mkdocs build
164
+
165
+ # Serve locally
166
+ make docs-serve
167
+ # or
168
+ poetry run mkdocs serve
169
+ # Then open http://localhost:8000
170
+ ```
171
+
172
+ ## Project Structure
173
+
174
+ ```text
175
+ slurm-cli/
176
+ ├── src/
177
+ │ └── slurm_cli/ # Main package
178
+ │ ├── __init__.py
179
+ │ ├── cli.py # CLI entry point
180
+ │ └── utils/ # Utility functions
181
+ ├── tests/ # Test files
182
+ ├── docs/ # Documentation
183
+ ├── pyproject.toml # Poetry configuration
184
+ ├── Makefile # Development commands
185
+ ├── tox.ini # Multi-environment testing
186
+ ├── .pre-commit-config.yaml # Pre-commit hooks
187
+ └── README.md # This file
188
+ ```
189
+
190
+ ## Requirements
191
+
192
+ - Python 3.9 or higher
193
+ - Slurm cluster environment
194
+ - Required Python packages (automatically installed):
195
+ - click>=8.1.0
196
+ - rich>=13.0.0
197
+ - fast-autocomplete[levenshtein]>=0.9.0
198
+ - rapidfuzz>=3.13.0
199
+
200
+ ## License
201
+
202
+ MIT License - see the [LICENSE](LICENSE) file for details.
203
+
204
+ ## Contributing
205
+
206
+ 1. Fork the repository
207
+ 2. Create a feature branch
208
+ 3. Make your changes
209
+ 4. Add tests for new functionality
210
+ 5. Run the test suite
211
+ 6. Submit a pull request
212
+
213
+ ## Changelog
214
+
215
+ See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
216
+
@@ -0,0 +1,29 @@
1
+ slurm_cli/__init__.py,sha256=UraG9RR-rvu7gSLi4zb3DSQNbBZhHi0id7O9atKMhx8,448
2
+ slurm_cli/cli.py,sha256=rTSy6a0H9W7qaRUk6vMCxHae4gMikPU7Pkx6o49qwxQ,176417
3
+ slurm_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ slurm_cli/utils/__init__.py,sha256=LhcA1MKVDS179y7Pm8oHwHvwwa4dhoGcibEohU761kM,37
5
+ slurm_cli/utils/accounts.py,sha256=clkFqCLzCF27xfr2ycwFwgpVQy3XpXDxMH96TfIqqzk,18036
6
+ slurm_cli/utils/associations.py,sha256=TV0tYaPQnV-50K2I--W2GcDCDERQEnSACC15OoViKaE,30313
7
+ slurm_cli/utils/autocomplete_helpers.py,sha256=ZkHU1FuqivdFkYBvS8zIM4zraDbyYHhp4bzMGojssF0,9314
8
+ slurm_cli/utils/base_resource.py,sha256=XCR-ZQdqo2aL2zrTdDIJu-8nc8CPL6u8RKpilcoj6W4,12055
9
+ slurm_cli/utils/config.py,sha256=P0SiJdWWPJEKT3z-AxFke5nJfST2V3ildlU0qJftY4A,2298
10
+ slurm_cli/utils/coordinators.py,sha256=ns02RC9EA61q8I4-Pr7LmzMw-zoJp-QYBcGKTThiMqg,13684
11
+ slurm_cli/utils/events.py,sha256=XFtCH_Uzbu72Hr55Rah38ce2B3JvoqWAzuIFpXHCQ6o,23430
12
+ slurm_cli/utils/job_filter.py,sha256=cO4dWweTodChHVkBKyVG9zdf4UyolzGSk5xxnu0gow0,16753
13
+ slurm_cli/utils/jobs.py,sha256=JN6z6f9Ryi0XnytNk3OmQoNi94oMeURnKTCVzDuUUJ8,26557
14
+ slurm_cli/utils/node_filter.py,sha256=fdp-1fdh478uryt8q7dBOWZOqALSHnwOfKzDwyzyG4Q,26153
15
+ slurm_cli/utils/nodes.py,sha256=fYIrasabFPFc83ce0AZUxw1pj9DWn4BatiL8IHapfcA,24475
16
+ slurm_cli/utils/partitions.py,sha256=TvZDEUScVoL9OJvToE7eRVfX2CaGJtdpEzeE4uPwP_U,31522
17
+ slurm_cli/utils/prefix_utils.py,sha256=wEKvVipeSKAf0SxmkSPXVYpW4mKG4IEwcVF4Z6WH4Ng,34534
18
+ slurm_cli/utils/profiles.py,sha256=fBZ1FNpmUbdOutiPEkD-iDvtxqms1ZGSwXb154rm0eQ,40773
19
+ slurm_cli/utils/qos.py,sha256=l0muet3V9TLPfORHgRsWgpQR_AQMVTtokMHDOGnacng,30750
20
+ slurm_cli/utils/reservations.py,sha256=HIVB5v3s1tdVZFGuFrKAtEVIytrKd9gievhCTNGa5ys,22991
21
+ slurm_cli/utils/resources.py,sha256=3brmxI2MKsAGX0Ih9MuFsh2_ze2wx2oAcmRya1jMPBs,12483
22
+ slurm_cli/utils/slurm_config.py,sha256=FfH2A3rz_e7UgkVglpEjFZ0CiFdo4L98xaHYvOUJ01c,2323
23
+ slurm_cli/utils/users.py,sha256=jXk0q7VifejWg9eTJGls00SU1la5SPk_EmpdEcEOMJE,22336
24
+ slurm_cli/utils/utils.py,sha256=zzTOW2rsaUmku1-OSqbgc19SblL0nZ0a4Gi0X5RaqY8,500
25
+ slurm_cli-1.0.0.dist-info/METADATA,sha256=IuOZDHXh5pOtp7nwRm5MmtOS1iwdemL7Wsk6os90LJU,4974
26
+ slurm_cli-1.0.0.dist-info/WHEEL,sha256=Vz2fHgx6HFtSwhs8KvkHLqH5Ea4w1_rner5uNVGCeIE,88
27
+ slurm_cli-1.0.0.dist-info/entry_points.txt,sha256=wVCR5OxQ3MX_kyYdQtnHe4BGV0xHpH9-F93ptW7ZB3o,48
28
+ slurm_cli-1.0.0.dist-info/licenses/LICENSE,sha256=USoCCENVw53-xTUfi3JvMYlOQbjAuscdRkEfkT4wtAA,1095
29
+ slurm_cli-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.3.2
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ slurm-cli=slurm_cli.cli:main
3
+
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Sergey Zhumatiy <szhumatiy@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.
22
+