material-theme / vsc-material-theme-icons

Material Theme Icons, the most epic icons theme for Visual Studio Code and Material Theme.
https://material-theme.dev
Other
144 stars 24 forks source link

feature request: icons for SLURM scheduler files #234

Closed benjibromberg closed 11 months ago

benjibromberg commented 11 months ago

It would be great to have icons for .sbatch files that are used to identify files containing jobs to a SLURM scheduler. .sbatch files are not an official file format but commonly refer to these files.

You write .sbatch files in Shell Script (Bash) so I assume the language id is shellscript.

Currently they get the icon for Shell Script (Bash) files, after #!/bin/bash is written on the first line the file is closed and reopened. Having their own icon would be nice to differentiate them from a directory containing multiple .sh and .sbatch files though.

SLURM documentation

SLURM Icon (from Wikipedia)

equinusocio commented 11 months ago

We can rely on the language id and file extensions. We can associate .sbatch files to SLURM. Can you provide additional informations?

benjibromberg commented 11 months ago
  1. SLURM Svg Logo (from Wikipedia)
  2. I'm pretty sure the language id is shellscript. As I noted in my previous message I just run Slurm .sbatch files in the UNIX command line with the command sbatch <myscript.sbatch> when connected to my university's HPC.
  3. The .sbatch file extension is not a requirement or a standard enforced by Slurm Workload Manager for batch script files. It is only a user-chosen convention to indicates that a file contains a Slurm batch script. You can name your Slurm batch script files with any extension you prefer or even no extension at all.

What identifies a file as a Slurm batch script is not the extension but the content of the file, which typically starts with the #!/bin/bash shebang line followed by SBATCH directives (which are lines starting with #SBATCH). These directives are used to specify the resource requirements and various attributes for the job to Slurm.

When you submit a job using sbatch, for instance:

sbatch my_script.sbatch

The command doesn’t look for a specific file extension; it reads the provided file and interprets the SBATCH directives and shell commands.

Some users might use other conventions for their own organization, like .slurm or just a .sh for a shell script. However, the extension used is entirely up to the user's preference and doesn't affect how Slurm processes the batch job submission.

I just thought that having different logos for .sbatch and maybe .slurm would be helpful to differentiate batch job submission scripts from .sh or other simple scripts.

equinusocio commented 11 months ago

It seems we can only rely on the file extension to assign the slurm icon. So every file with .sbatch and .slurm extension will use the slurm icon instead of sh standard one, even if the language id used inside the file is bash or whatever.

Release on the way