Skip to content

Commit

Permalink
DAOS-14839 cq: Update pylint check to 3.11 and fix issues. (#13550)
Browse files Browse the repository at this point in the history
Our CI systems run different distros so fix spelling issues reported
by the el8.8 upgrade for developers.

Bump python version used for pylint in CI and fix issues.

Signed-off-by: Ashley Pittman <[email protected]>
  • Loading branch information
ashleypittman authored Jan 5, 2024
1 parent 74f9e0f commit abe3348
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ 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
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
2 changes: 1 addition & 1 deletion src/tests/ftest/control/config_generate_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/slurm_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/util/apricot/apricot/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/tests/ftest/util/apricot/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/util/io_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/util/server_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/util/server_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 0 additions & 4 deletions utils/cq/daos_pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions utils/cq/words.dict
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ params
patchelf
pci
pda
parallelized
pdesc
perf
performant
Expand All @@ -334,6 +335,7 @@ ppn
prebuild
prebuilding
prebuilt
predefine
preload
prepend
prepended
Expand Down Expand Up @@ -366,6 +368,7 @@ recurse
redistributions
refactor
repo
reproducibility
returncode
rf
rmdir
Expand Down Expand Up @@ -462,12 +465,14 @@ uint
umount
umounting
unicode
uninterruptible
unittest
unlink
unlinked
unlinking
unmangle
unmount
unordered
unwritable
uri
url
Expand All @@ -484,6 +489,7 @@ uuidstr
valgrind
vendored
ver
versa
versioned
vm
vos
Expand Down

0 comments on commit abe3348

Please sign in to comment.