slurm-cli 1.0.2__tar.gz → 1.0.4__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 (28) hide show
  1. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/PKG-INFO +20 -1
  2. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/README.md +18 -0
  3. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/pyproject.toml +1 -1
  4. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/cli.py +10 -10
  5. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/prefix_utils.py +3 -3
  6. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/LICENSE +0 -0
  7. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/__init__.py +0 -0
  8. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/py.typed +0 -0
  9. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/__init__.py +0 -0
  10. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/accounts.py +0 -0
  11. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/associations.py +0 -0
  12. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/autocomplete_helpers.py +0 -0
  13. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/base_resource.py +0 -0
  14. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/config.py +0 -0
  15. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/coordinators.py +0 -0
  16. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/events.py +0 -0
  17. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/job_filter.py +0 -0
  18. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/jobs.py +0 -0
  19. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/node_filter.py +0 -0
  20. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/nodes.py +0 -0
  21. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/partitions.py +0 -0
  22. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/profiles.py +0 -0
  23. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/qos.py +0 -0
  24. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/reservations.py +0 -0
  25. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/resources.py +0 -0
  26. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/slurm_config.py +0 -0
  27. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/users.py +0 -0
  28. {slurm_cli-1.0.2 → slurm_cli-1.0.4}/src/slurm_cli/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slurm-cli
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A CLI tool for Slurm cluster management with autocomplete functionality
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -24,6 +24,7 @@ Classifier: Programming Language :: Python :: 3.11
24
24
  Classifier: Programming Language :: Python :: 3.12
25
25
  Classifier: Programming Language :: Python :: 3.13
26
26
  Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Programming Language :: Python :: 3.15
27
28
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
29
  Classifier: Topic :: System :: Clustering
29
30
  Classifier: Topic :: System :: Systems Administration
@@ -121,6 +122,24 @@ _CLICK_COMPLETE=bash_source slurm-cli > \
121
122
  ~/.local/share/bash-completion/completions/slurm-cli
122
123
  ```
123
124
 
125
+ ## Claude Code Skill
126
+
127
+ slurm-cli ships a [Claude Code](https://claude.com/claude-code) skill (`slurm-cli-skill.md`) that teaches Claude how to construct correct `slurm-cli` commands — verbs/resources, filter syntax, output formats, and caching flags.
128
+
129
+ Install it by copying the file into a skills directory:
130
+
131
+ ```bash
132
+ # Project-local
133
+ mkdir -p .claude/skills
134
+ cp slurm-cli-skill.md .claude/skills/slurm-cli.md
135
+
136
+ # User-wide (all projects)
137
+ mkdir -p ~/.claude/skills
138
+ cp slurm-cli-skill.md ~/.claude/skills/slurm-cli.md
139
+ ```
140
+
141
+ Then just ask Claude things like "show running jobs for user john" or "drain the gpu partition except reserved nodes" — it will invoke the skill to build the right command. See [docs/user-guide/claude-skill.md](docs/user-guide/claude-skill.md) for details.
142
+
124
143
  ## Development
125
144
 
126
145
  ### Autocomplete
@@ -80,6 +80,24 @@ _CLICK_COMPLETE=bash_source slurm-cli > \
80
80
  ~/.local/share/bash-completion/completions/slurm-cli
81
81
  ```
82
82
 
83
+ ## Claude Code Skill
84
+
85
+ slurm-cli ships a [Claude Code](https://claude.com/claude-code) skill (`slurm-cli-skill.md`) that teaches Claude how to construct correct `slurm-cli` commands — verbs/resources, filter syntax, output formats, and caching flags.
86
+
87
+ Install it by copying the file into a skills directory:
88
+
89
+ ```bash
90
+ # Project-local
91
+ mkdir -p .claude/skills
92
+ cp slurm-cli-skill.md .claude/skills/slurm-cli.md
93
+
94
+ # User-wide (all projects)
95
+ mkdir -p ~/.claude/skills
96
+ cp slurm-cli-skill.md ~/.claude/skills/slurm-cli.md
97
+ ```
98
+
99
+ Then just ask Claude things like "show running jobs for user john" or "drain the gpu partition except reserved nodes" — it will invoke the skill to build the right command. See [docs/user-guide/claude-skill.md](docs/user-guide/claude-skill.md) for details.
100
+
83
101
  ## Development
84
102
 
85
103
  ### Autocomplete
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "slurm-cli"
3
- version = "1.0.2"
3
+ version = "1.0.4"
4
4
  description = "A CLI tool for Slurm cluster management with autocomplete functionality"
5
5
  authors = ["Sergey Zhumatiy <szhumatiy@gmail.com>"]
6
6
  maintainers = ["Sergey Zhumatiy <szhumatiy@gmail.com>"]
@@ -21,7 +21,6 @@ Note: This requires Click's completion support
21
21
  which is available in Click 8.0+.
22
22
  """
23
23
 
24
- import importlib.metadata
25
24
  import json
26
25
  import os
27
26
  import subprocess
@@ -33,6 +32,7 @@ from fast_autocomplete import AutoComplete # pyright: ignore
33
32
  from rich.box import SIMPLE_HEAVY # pyright: ignore[reportMissingImports]
34
33
  from rich.table import Table # pyright: ignore[reportMissingImports]
35
34
 
35
+ from . import __version__
36
36
  from .utils.accounts import Account
37
37
  from .utils.associations import Association
38
38
  from .utils.autocomplete_helpers import get_common_autocomplete_functions
@@ -932,7 +932,7 @@ def register_commands() -> None:
932
932
  main.add_command(update, name="update")
933
933
  main.add_command(create, name="create")
934
934
  main.add_command(delete, name="delete")
935
- main.add_command(list_resources, name="list-resources")
935
+ main.add_command(list_resources, name="resources")
936
936
  main.add_command(autocomplete, name="autocomplete")
937
937
  main.add_command(help, name="help")
938
938
  main.add_command(version, name="version")
@@ -963,11 +963,11 @@ def register_commands() -> None:
963
963
  main.add_command(suspend, name="suspend")
964
964
 
965
965
  # Modify help text to show aliases inline
966
- show.help = "Show information about Slurm resources (aliases: get)"
966
+ show.help = "Show information about Slurm resources (aliases: get, list, ls)"
967
967
  update.help = "Update Slurm resource fields " "(aliases: edit, change, modify)"
968
968
  create.help = "Create Slurm resources (aliases: new, add)"
969
969
  delete.help = "Delete Slurm resources (aliases: remove, rm)"
970
- list_resources.help = "List available Slurm resources (aliases: ls)"
970
+ list_resources.help = "List available Slurm resource types"
971
971
  version.help = "Show slurm-cli and slurmctld version (aliases: ver)"
972
972
  reconfigure.help = "Reconfigure slurmctld (aliases: reconf, confreload)"
973
973
  ping.help = "Ping slurmctld"
@@ -1099,7 +1099,7 @@ def show(
1099
1099
  if not canonical_resource:
1100
1100
  console.print(
1101
1101
  f"[red]Unknown resource: {resource}[/red]\n"
1102
- "Use 'slurm-cli list-resources' to see available resources."
1102
+ "Use 'slurm-cli resources' to see available resources."
1103
1103
  )
1104
1104
  return
1105
1105
  # Check for --profile-str=help
@@ -2819,7 +2819,7 @@ _slurm_cli_initialize_autocomplete() {{
2819
2819
  COMPREPLY=($(compgen -W "--dry-run -v --verbose -h --help" -- "$cur"))
2820
2820
  return
2821
2821
  ;;
2822
- autocomplete|help|list-resources)
2822
+ autocomplete|help|resources)
2823
2823
  # These commands take -h/--help option
2824
2824
  COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
2825
2825
  return
@@ -2987,7 +2987,7 @@ complete -o default -o bashdefault -o nosort -F _slurm_cli_initialize_autocomple
2987
2987
  return
2988
2988
 
2989
2989
 
2990
- # list-resources command
2990
+ # resources command
2991
2991
  @click.command(context_settings=CONTEXT_SETTINGS)
2992
2992
  @common_options
2993
2993
  @click.pass_context
@@ -3002,7 +3002,7 @@ def list_resources(
3002
3002
  **kwargs,
3003
3003
  ) -> None:
3004
3004
  """List all available resource types and their fields
3005
- (aliases: list, ls, l)."""
3005
+ ."""
3006
3006
  zebra = get_zebra(ctx, zebra)
3007
3007
  table = Table(
3008
3008
  title="Available Slurm Resources",
@@ -3050,7 +3050,7 @@ def list_resources(
3050
3050
  @click.option("--verbose", "-v", is_flag=True, help="Enable verbose output")
3051
3051
  def version(verbose: bool = False) -> None:
3052
3052
  """Show version information."""
3053
- _version = importlib.metadata.version("slurm-cli")
3053
+ _version = __version__
3054
3054
  console.print(f"[bold blue]slurm-cli:[/] Slurm CLI v{_version}")
3055
3055
  console.print("A CLI tool for Slurm cluster management")
3056
3056
 
@@ -3984,7 +3984,7 @@ def assoc_mgr(
3984
3984
  slurm-cli assoc_mgr qos=normal,high flags=qos
3985
3985
  """
3986
3986
  dry_run = get_dry_run(ctx) or dry_run
3987
- args = ["scontrol", "assoc_mgr"]
3987
+ args = ["scontrol", "show", "assoc_mgr"]
3988
3988
 
3989
3989
  # Parse options
3990
3990
  for opt in options:
@@ -231,7 +231,7 @@ class PrefixMatcher:
231
231
 
232
232
  # Pre-defined command configuration
233
233
  COMMANDS = {
234
- "show": {"aliases": ["get"], "description": "Show/list resources"},
234
+ "show": {"aliases": ["get", "list", "ls"], "description": "Show/list resources"},
235
235
  "create": {
236
236
  "aliases": ["new", "add"],
237
237
  "description": "Create new resources",
@@ -244,8 +244,8 @@ COMMANDS = {
244
244
  "aliases": ["remove", "rm"],
245
245
  "description": "Delete resources",
246
246
  },
247
- "list-resources": {
248
- "aliases": ["ls", "list"],
247
+ "resources": {
248
+ "aliases": [],
249
249
  "description": "List available resources",
250
250
  },
251
251
  "autocomplete": {
File without changes