PySlurm / pyslurm

Python Interface to Slurm
https://pyslurm.github.io
GNU General Public License v2.0
467 stars 116 forks source link

Add codespell (workflow and config) to catch typos, fix some caught now #326

Closed yarikoptic closed 8 months ago

yarikoptic commented 8 months ago

there is one change to the code (siz -> size) -- I hope there is tests, but I do not expect sideeffect there

yarikoptic commented 8 months ago

looking at https://github.com/PySlurm/pyslurm/actions/workflows/pyslurm.yml -- it seems that those Builds were red for quite a while by now... so would be sensible first to fix that :-/

RuntimeError: Incorrect slurm version detected, requires Slurm 23.2

def test_run():
        host = testinfra.get_host(f"docker://slurmctl")
        python = f'python{os.environ.get("PYTHON")}'
        host.run(f'pyenv global {version_map[os.environ.get("PYTHON")]}')
>       print(host.check_output(f"{python} setup.py build"))
E       AssertionError: Unexpected exit code 1 for CommandResult(command=b'python3.6 setup.py build', exit_status=1, stdout=None, stderr=b'INFO: Found Slurm shared library in /usr/lib64\nINFO: Found Slurm header in /usr/include/slurm\nINFO: Detected Slurm version - [21](https://github.com/PySlurm/pyslurm/actions/runs/6771702287/job/18402665489?pr=326#step:8:22).08\nTraceback (most recent call last):\n  File "setup.py", line 332, in <module>\n    setup_package()\n  File "setup.py", line 320, in setup_package\n    slurm_sanity_checks()\n  File "setup.py", line 246, in slurm_sanity_checks\n    f"Incorrect slurm version detected, requires Slurm {SLURM_RELEASE}"\nRuntimeError: Incorrect slurm version detected, requires Slurm [23](https://github.com/PySlurm/pyslurm/actions/runs/6771702287/job/18402665489?pr=326#step:8:24).2\n')
E       assert 1 == 0
E         +1
E         -0
tazend commented 8 months ago

Hi @yarikoptic,

thank your for this addition (I made quite some spelling mistakes I see :) ) I would just go ahead and merge this, if there isn't anything else you'd like to still add prior.

It is fine to ignore the other failing tests, as your codespell action runs in a seperate container anyway. The other tests are there to check whether building pyslurm and the tests work, but the underlying container is not yet updated to support Slurm 23.02.x.

yarikoptic commented 8 months ago

Nothing to add ATM AFAIK