From 89fa7cb4a0431e7093ebbac5cc50a462f00403bb Mon Sep 17 00:00:00 2001 From: "Jason C. Nucciarone" Date: Fri, 20 Sep 2024 12:59:03 -0400 Subject: [PATCH 1/3] docs(cgroup): add cgroup editor docs to README Changes: - Fixed a grammatical error in the slurmdbdconfig editor section. Signed-off-by: Jason C. Nucciarone --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebfca90..c9fb81f 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ slurmutils package include: * `slurmconfig`: An editor for _slurm.conf_ configuration files. * `slurmdbdconfig`: An editor for _slurmdbd.conf_ configuration files. +* `cgroupconfig`: An editor for _cgroup.conf_ configuration files. For more information on how to use or contribute to slurmutils, check out the [Getting Started](#-getting-started) and [Development](#-development) @@ -85,7 +86,7 @@ with slurmconfig.edit("/etc/slurm/slurm.conf") as config: ##### `slurmdbdconfig` -This module provides and API for editing _slurmdbd.conf_ files, and can create new +This module provides an API for editing _slurmdbd.conf_ files, and can create new _slurmdbd.conf_ files if they do not exist. Here's some operations you can perform on the _slurmdbd.conf_ file using this editor: @@ -102,6 +103,22 @@ with slurmdbdconfig.edit("/etc/slurm/slurmdbd.conf") as config: del config.auth_alt_parameters ``` +##### `cgroupconfig` + +This module provides an API for editing _cgroup.conf_ files, and create new _cgroup.conf_ +files if they do not exist. Here's some operations you can perform on the _cgroup.conf_ +file using this editor: + +```python +from slurmutils.editors import cgroupconfig + +with cgroupconfig.edit("/etc/slurm/cgroup.conf") as config: + config.constrain_cores = "yes" + config.constrain_devices = "yes" + config.constrain_ram_space = "yes" + config.constrain_swap_space = "yes" +``` + ## 🤔 What's next? If you want to learn more about all the things you can do with slurmutils, From 48381d6c45cfa7e5f1b4b1a61c4d463560bad152 Mon Sep 17 00:00:00 2001 From: "Jason C. Nucciarone" Date: Fri, 20 Sep 2024 13:00:48 -0400 Subject: [PATCH 2/3] chore(release): bump slurmutils version 0.6.0 -> 0.7.0 Signed-off-by: Jason C. Nucciarone --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c25611..b9d7d06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "slurmutils" -version = "0.6.0" +version = "0.7.0" description = "Utilities and APIs for interfacing with the Slurm workload manager." repository = "https://github.com/charmed-hpc/slurmutils" authors = ["Jason C. Nucciarone "] From 2b37c4f287ec9bcd5d0e22bbaee556ec7dc2f303 Mon Sep 17 00:00:00 2001 From: "Jason C. Nucciarone" Date: Fri, 20 Sep 2024 13:32:28 -0400 Subject: [PATCH 3/3] docs: revise `slurmutils.editors` section Don't duplicate the header of each section but with only the configuration file name changed. Instead, just have one header at the beginning that states that the modules in this collection support editing the various configuration files that Slurm has. Signed-off-by: Jason C. Nucciarone --- README.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c9fb81f..311f811 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,12 @@ $ poetry install ### Usage -#### Editors +#### `slurmutils.editors` -##### `slurmconfig` +This module provides an API for editing files, and creating new files if they do not +exist. Here's some operations you can perform on files using the editors in this module: -This module provides an API for editing both _slurm.conf_ and _Include_ files, -and can create new configuration files if they do not exist. Here's some common Slurm -lifecycle management operators you can perform using this editor: +##### `slurmconfig` ###### Edit a pre-existing _slurm.conf_ configuration file @@ -86,10 +85,6 @@ with slurmconfig.edit("/etc/slurm/slurm.conf") as config: ##### `slurmdbdconfig` -This module provides an API for editing _slurmdbd.conf_ files, and can create new -_slurmdbd.conf_ files if they do not exist. Here's some operations you can perform -on the _slurmdbd.conf_ file using this editor: - ###### Edit a pre-existing _slurmdbd.conf_ configuration file ```python @@ -105,10 +100,6 @@ with slurmdbdconfig.edit("/etc/slurm/slurmdbd.conf") as config: ##### `cgroupconfig` -This module provides an API for editing _cgroup.conf_ files, and create new _cgroup.conf_ -files if they do not exist. Here's some operations you can perform on the _cgroup.conf_ -file using this editor: - ```python from slurmutils.editors import cgroupconfig