From 3a025ae51f41678ea8796226343d7171e0540379 Mon Sep 17 00:00:00 2001 From: Ashley Pittman Date: Tue, 2 Jan 2024 15:36:10 +0000 Subject: [PATCH 1/4] DAOS-623 cq: Update pylint check and fix spelling issues on el8.8. Our CI systems run diffferent distros so fix spelling issues reported by the el8.8 upgrade for developers. Required-githooks: true Signed-off-by: Ashley Pittman --- .github/workflows/pylint.yml | 2 ++ src/tests/ftest/control/config_generate_run.py | 2 +- src/tests/ftest/dfuse/simul.py | 2 +- src/tests/ftest/slurm_setup.py | 2 +- src/tests/ftest/util/apricot/apricot/test.py | 2 +- src/tests/ftest/util/io_utilities.py | 2 +- src/tests/ftest/util/server_utils.py | 2 +- src/tests/ftest/util/server_utils_base.py | 2 +- utils/cq/daos_pylint.py | 4 ---- utils/cq/words.dict | 6 ++++++ 10 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 89d43ede944..91271ddcfc2 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -20,5 +20,7 @@ jobs: run: python3 -m pip install --requirement utils/cq/requirements.txt - name: Install enchant run: sudo apt-get update && sudo apt-get -y install python3-enchant + - name: Show versions + run: ./utils/cq/daos_pylint.py --version - name: Run pylint check. run: ./utils/cq/daos_pylint.py --git --output-format github diff --git a/src/tests/ftest/control/config_generate_run.py b/src/tests/ftest/control/config_generate_run.py index 571e23c103e..b17ad7beb4e 100644 --- a/src/tests/ftest/control/config_generate_run.py +++ b/src/tests/ftest/control/config_generate_run.py @@ -62,7 +62,7 @@ def test_config_generate_run(self): self.fail(f"Error loading dmg generated config! {error}") # Stop and restart daos_server. self.start_server_managers() has the - # server startup check built into it, so if there's something wrong, + # server start-up check built into it, so if there's something wrong, # it'll throw an error. self.log.info("Stopping servers") self.stop_servers() diff --git a/src/tests/ftest/dfuse/simul.py b/src/tests/ftest/dfuse/simul.py index aef80b5d651..33ab370c3da 100644 --- a/src/tests/ftest/dfuse/simul.py +++ b/src/tests/ftest/dfuse/simul.py @@ -73,7 +73,7 @@ class PosixSimul(DfuseTestBase): def run_simul(self, include=None, exclude=None, raise_exception=True): """Run simul. - If an include value is set, the exclude value is ignored and vice versa. + If an include value is set, the exclude value is ignored and vice-versa. Args: include (str, optional): comma-separated list of tests to include. Defaults to None. diff --git a/src/tests/ftest/slurm_setup.py b/src/tests/ftest/slurm_setup.py index 3036c92b397..89930160e3c 100755 --- a/src/tests/ftest/slurm_setup.py +++ b/src/tests/ftest/slurm_setup.py @@ -561,7 +561,7 @@ def main(): logger.error(str(error)) sys.exit(1) - # Slurm Startup + # Slurm Start-up try: slurm_setup.start_slurm(args.user, args.debug) except SlurmSetupException as error: diff --git a/src/tests/ftest/util/apricot/apricot/test.py b/src/tests/ftest/util/apricot/apricot/test.py index 78a75dae36a..5bda1cba350 100644 --- a/src/tests/ftest/util/apricot/apricot/test.py +++ b/src/tests/ftest/util/apricot/apricot/test.py @@ -694,7 +694,7 @@ def setUp(self): self.agent_manager_class = self.params.get( "agent_manager_class", "/run/setup/*", self.agent_manager_class) - # Support configuring the startup of servers and agents by the setup() + # Support configuring the start-up of servers and agents by the setup() # method from the test yaml file self.setup_start_servers = self.params.get( "start_servers", "/run/setup/*", self.setup_start_servers) diff --git a/src/tests/ftest/util/io_utilities.py b/src/tests/ftest/util/io_utilities.py index 125248c8e20..95eee4a9e33 100644 --- a/src/tests/ftest/util/io_utilities.py +++ b/src/tests/ftest/util/io_utilities.py @@ -105,7 +105,7 @@ def set_needles_prefix(self, prefix): def get_probe(self): """ Returns a tuple containing a needle file name randomly selected and the - absolute pathname of that file, in that order. + absolute path-name of that file, in that order. """ if not self._needles_paths: raise ValueError( diff --git a/src/tests/ftest/util/server_utils.py b/src/tests/ftest/util/server_utils.py index a9f286bc7e8..eece8a27399 100644 --- a/src/tests/ftest/util/server_utils.py +++ b/src/tests/ftest/util/server_utils.py @@ -1042,7 +1042,7 @@ def update_config_file_from_file(self, generated_yaml): Use the specified data to generate and distribute the server configuration to the hosts. Also use this data to replace the engine storage configuration so that the storage options - defined in the specified data are configured correctly as part of the server startup. + defined in the specified data are configured correctly as part of the server start-up. Args: generated_yaml (YAMLObject): New server config data. diff --git a/src/tests/ftest/util/server_utils_base.py b/src/tests/ftest/util/server_utils_base.py index a853a961646..bd8b43acefd 100644 --- a/src/tests/ftest/util/server_utils_base.py +++ b/src/tests/ftest/util/server_utils_base.py @@ -538,7 +538,7 @@ def __init__(self): "/run/daos_server/storage/prepare/*", "prepare") # daos_server storage prepare command options: - # --pci-allowlist= Whitespace separated list of PCI + # --pci-allowlist= White-space separated list of PCI # devices (by address) to be unbound from # Kernel driver and used with SPDK # (default is all PCI devices). diff --git a/utils/cq/daos_pylint.py b/utils/cq/daos_pylint.py index 22e1fbc997c..3c9ca6633c1 100755 --- a/utils/cq/daos_pylint.py +++ b/utils/cq/daos_pylint.py @@ -547,10 +547,6 @@ def main(): print(full_version) sys.exit(0) - if args.diff: - print('This option is no longer used') - sys.exit(1) - rc_tmp = None # If spellings are likely supported and using the default configuration file then enable using diff --git a/utils/cq/words.dict b/utils/cq/words.dict index e062dc6dcc9..d6a5f6f80a6 100644 --- a/utils/cq/words.dict +++ b/utils/cq/words.dict @@ -315,6 +315,7 @@ params patchelf pci pda +parallelized pdesc perf performant @@ -334,6 +335,7 @@ ppn prebuild prebuilding prebuilt +predefine preload prepend prepended @@ -366,6 +368,7 @@ recurse redistributions refactor repo +reproducibility returncode rf rmdir @@ -462,12 +465,14 @@ uint umount umounting unicode +uninterruptible unittest unlink unlinked unlinking unmangle unmount +unordered unwritable uri url @@ -484,6 +489,7 @@ uuidstr valgrind vendored ver +versa versioned vm vos From eca0ba72dbd8b3980df33828c4442c4aff81ca97 Mon Sep 17 00:00:00 2001 From: Ashley Pittman Date: Tue, 2 Jan 2024 15:41:57 +0000 Subject: [PATCH 2/4] Install a specific python version for the pylint check. Required-githooks: true Signed-off-by: Ashley Pittman --- .github/workflows/pylint.yml | 3 +++ src/tests/ftest/util/apricot/setup.py | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 91271ddcfc2..fae74fd3de4 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -14,6 +14,9 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Install core python packages run: python3 -m pip install --requirement requirements.txt - name: Install extra python packages diff --git a/src/tests/ftest/util/apricot/setup.py b/src/tests/ftest/util/apricot/setup.py index 3734157b664..948cd5f7005 100644 --- a/src/tests/ftest/util/apricot/setup.py +++ b/src/tests/ftest/util/apricot/setup.py @@ -3,6 +3,7 @@ setup(name='apricot', description='Apricot - Avocado SubFramwork', + # pylint: disable-next=consider-using-with version=open("VERSION", "r").read().strip(), author='Apricot Developers', author_email='apricot-devel@example.com', From 532cf7f23844d9d017f67c232955483f2b4a356d Mon Sep 17 00:00:00 2001 From: Ashley Pittman Date: Tue, 2 Jan 2024 16:57:33 +0000 Subject: [PATCH 3/4] Revert change. Required-githooks: true Signed-off-by: Ashley Pittman --- src/tests/ftest/dfuse/simul.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ftest/dfuse/simul.py b/src/tests/ftest/dfuse/simul.py index 33ab370c3da..704324e2d4e 100644 --- a/src/tests/ftest/dfuse/simul.py +++ b/src/tests/ftest/dfuse/simul.py @@ -1,5 +1,5 @@ """ - (C) Copyright 2018-2023 Intel Corporation. + (C) Copyright 2018-2024 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ @@ -73,7 +73,7 @@ class PosixSimul(DfuseTestBase): def run_simul(self, include=None, exclude=None, raise_exception=True): """Run simul. - If an include value is set, the exclude value is ignored and vice-versa. + If an include value is set, the exclude value is ignored and vice versa. Args: include (str, optional): comma-separated list of tests to include. Defaults to None. From d96bcc43eee632bd47dd689ab26cd5d0783d3f1e Mon Sep 17 00:00:00 2001 From: Ashley Pittman Date: Tue, 2 Jan 2024 16:59:55 +0000 Subject: [PATCH 4/4] Back out date change. Required-githooks: true Signed-off-by: Ashley Pittman --- src/tests/ftest/dfuse/simul.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ftest/dfuse/simul.py b/src/tests/ftest/dfuse/simul.py index 704324e2d4e..aef80b5d651 100644 --- a/src/tests/ftest/dfuse/simul.py +++ b/src/tests/ftest/dfuse/simul.py @@ -1,5 +1,5 @@ """ - (C) Copyright 2018-2024 Intel Corporation. + (C) Copyright 2018-2023 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """