Skip to content

Commit bfb5ff4

Browse files
authored
Add codespell (workflow and config) to catch typos, fix some caught now (#326)
* Add github action to codespell main on push and PRs * Add rudimentary codespell config * Use "size" not "siz" for the variable AFAIK there is no need to obfuscate as there should be no clash * ignore mmaped and splitted * [DATALAD RUNCMD] run codespell throughout but ignore fail === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent f7a7d8b commit bfb5ff4

File tree

17 files changed

+71
-42
lines changed

17 files changed

+71
-42
lines changed

.github/workflows/codespell.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Codespell
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
codespell:
15+
name: Check for spelling errors
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
- name: Codespell
22+
uses: codespell-project/actions-codespell@v2

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ confidence=
4444
# can either give multiple identifiers separated by comma (,) or put this
4545
# option multiple times (only on the command line, not in the configuration
4646
# file where it should appear only once). You can also use "--disable=all" to
47-
# disable everything first and then reenable specific checks. For example, if
47+
# disable everything first and then re-enable specific checks. For example, if
4848
# you want to run only the similarities checker, you can use "--disable=all
4949
# --enable=similarities". If you want to run only the classes checker, but have
5050
# no Warning level messages displayed, use "--disable=all --enable=classes

UPGRADE_C_API.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Then, simply generate the header definitions like in this example:
4848

4949
.. code-block:: bash
5050
51-
scripts/pyslurm_bindgen.py -D /directoy/with/slurm/headers > pyslurm/slurm/header.pxi
51+
scripts/pyslurm_bindgen.py -D /directory/with/slurm/headers > pyslurm/slurm/header.pxi
5252
5353
The script outputs everything to `stdout`. Simply redirect the output to the file: :code:`pyslurm/slurm/header.pxi`.
5454
The headers should now be fully translated.

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ requires = [
66
"Cython>=0.29.30,<3.0",
77
]
88

9+
10+
[tool.codespell]
11+
skip = '.git,*.pdf,*.svg,*.lock,*.css'
12+
check-hidden = true
13+
# ignore-regex = ''
14+
# ignore some variables etc
15+
ignore-words-list = 'mmaped,splitted'

pyslurm/core/error.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def slurm_errno():
5151

5252

5353
def get_last_slurm_error():
54-
"""Get the last slurm error that occured as a tuple of errno and string.
54+
"""Get the last slurm error that occurred as a tuple of errno and string.
5555
5656
Returns:
5757
errno (int): The error number

pyslurm/core/job/job.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#########################################################################
2-
# job.pyx - interface to retrieve slurm job informations
2+
# job.pyx - interface to retrieve slurm job information
33
#########################################################################
44
# Copyright (C) 2023 Toni Harzendorf <toni.harzendorf@gmail.com>
55
#
@@ -353,7 +353,7 @@ cdef class Job:
353353
kill_on_invalid_dependency (bool):
354354
Whether the Job should be killed on an invalid dependency.
355355
spreads_over_nodes (bool):
356-
Whether the Job should be spreaded over as many nodes as possible.
356+
Whether the Job should be spread over as many nodes as possible.
357357
power_options (list):
358358
Options set for Power Management.
359359
is_cronjob (bool):

pyslurm/core/job/job.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#########################################################################
2-
# job.pyx - interface to retrieve slurm job informations
2+
# job.pyx - interface to retrieve slurm job information
33
#########################################################################
44
# Copyright (C) 2023 Toni Harzendorf <toni.harzendorf@gmail.com>
55
#

pyslurm/core/job/sbatch_opts.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class _SbatchOpt():
4040
self.has_optional_args = has_optional_args
4141

4242

43-
# Sorted by occurence in the sbatch manpage - keep in order.
43+
# Sorted by occurrence in the sbatch manpage - keep in order.
4444
SBATCH_OPTIONS = [
4545
_SbatchOpt("A", "account", "account"),
4646
_SbatchOpt(None, "acctg-freq", "accounting_gather_frequency"),

pyslurm/core/job/step.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#########################################################################
2-
# job/step.pxd - interface to retrieve slurm job step informations
2+
# job/step.pxd - interface to retrieve slurm job step information
33
#########################################################################
44
# Copyright (C) 2023 Toni Harzendorf <toni.harzendorf@gmail.com>
55
#

pyslurm/core/job/step.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#########################################################################
2-
# job/step.pyx - interface to retrieve slurm job step informations
2+
# job/step.pyx - interface to retrieve slurm job step information
33
#########################################################################
44
# Copyright (C) 2023 Toni Harzendorf <toni.harzendorf@gmail.com>
55
#

0 commit comments

Comments
 (0)