Skip to content

Commit 1d9bdd8

Browse files
authored
Merge pull request #336 from yarikoptic/enh-codespell
Fix some typos detected by codespell + provide codespell workflow to catch possible future typos
2 parents 8dd66b4 + 5346751 commit 1d9bdd8

File tree

8 files changed

+30
-13
lines changed

8 files changed

+30
-13
lines changed

.github/workflows/codespell.yml

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

docs/README-selectors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ substitute the value selected in the selector. For example:
2121
x = f("<&executor-type>")
2222

2323
When rendered, the `<&executor-type>` string will be replaced by the
24-
lower case version of the selected value in the immediately preceeding
24+
lower case version of the selected value in the immediately preceding
2525
selector. The string `"<&executor-type>"` must be a standalone token as
2626
far as the syntax highlighter is concerned. That is, it probably won't
2727
work if it's in a comment.
@@ -41,7 +41,7 @@ To add alternative code blocks, use:
4141
```
4242

4343
Alternate code blocks as well as value substitutions bind to the closest
44-
preceeding selector. However, selectors are synchronized, in that
44+
preceding selector. However, selectors are synchronized, in that
4545
selecting "Local" in one selector, will also select "Local" in all other
4646
selectors of the same type (i.e. "executor-type-*") that have "Local" as
4747
a listed value. If a selector does not have that value, the values and

docs/development/programming.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The general workflow used by the batch scheduler executor to submit a job is as
9999
follows:
100100

101101
1. Generate a submit script in the *work directory*, which is obtained
102-
from the `config` object at executor intialization, and which defaults to
102+
from the `config` object at executor initialization, and which defaults to
103103
`~/.psij/work/<executor.name>`, where `<executor.name>` is the value of
104104
the `name` of the implementing class. The submit script is generated using
105105
the
@@ -112,7 +112,7 @@ follows:
112112

113113
3. Invoke
114114
:meth:`~psij.executors.batch.batch_scheduler_executor.BatchSchedulerExecutor.job_id_from_submit_output`
115-
to obtain the job's native ID from the outut of the submit command executed
115+
to obtain the job's native ID from the output of the submit command executed
116116
in step (2).
117117

118118
4. Register the job with the *status polling thread*.

scripts/WORKFLOW-EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ RUN pip install wordcloud
100100

101101
## Executing a singularity container
102102

103-
We will run the PDF2Wordcloud example in a container. We will use the docker container described above and execute it with singularity. In this case the spec defines the execution of a container with singularity. The actual command line tool is passed as an optional argument after all requiered singularity options.
103+
We will run the PDF2Wordcloud example in a container. We will use the docker container described above and execute it with singularity. In this case the spec defines the execution of a container with singularity. The actual command line tool is passed as an optional argument after all required singularity options.
104104

105105
```
106106
...
@@ -165,7 +165,7 @@ for j in [make_job(pdf2textSingularitySpec, None), make_job(text2wordcloudSingul
165165

166166
In this example we demonstrate how to wrap and execute an mpi hello world job with PSI/J. The base mpi command is `mpiexec -n 36 -ppn 36 echo Hello world`. This example is introducing the concept of a [job launcher](https://exaworks.org/psij-python/docs/programming.html#launchers), in this case **mpi**, e.g. `job.spec.launcher = "mpirun"`. The complete example script can be found [here](./).
167167

168-
1. Load psij module and instanciate job executer, e.g. local or slurm
168+
1. Load psij module and instantiate job executer, e.g. local or slurm
169169

170170
```
171171
import psij

scripts/pdf2wc4singularity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def make_singularity_spec(image=None,
4343
'''
4444
:param image: path to image file
4545
:param bind_input: List of input paths
46-
:param bind_output: :ist of output paths
46+
:param bind_output: List of output paths
4747
:param command: name of script/command to be executed
4848
:param options: command line options for command
4949
'''

src/psij/executors/batch/batch_scheduler_executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class BatchSchedulerExecutor(JobExecutor):
163163
strongly encouraged to restrict the query of job states to the specified jobs in order to reduce
164164
the load on the queuing system. The output of the status command is then parsed using
165165
:func:`~parse_status_output` and the status of each job is updated accordingly. If the status
166-
of a registered job is not found in the ouput of the queue status command, it is assumed
166+
of a registered job is not found in the output of the queue status command, it is assumed
167167
completed (or failed, depending on its exit code), since most queuing systems automatically
168168
purge completed jobs from their databases after a short period of time. The exit code is read
169169
from the exit code file, as described above. If the exit code value is not zero, the job is
@@ -206,7 +206,7 @@ def submit(self, job: Job) -> None:
206206
try:
207207
logger.debug('Job %s: running submit command', job.id)
208208
out = self._run_command(self.get_submit_command(job, submit_file_path))
209-
logger.debug('Job %s: submit command ouput: %s', job.id, out)
209+
logger.debug('Job %s: submit command output: %s', job.id, out)
210210
job._native_id = self.job_id_from_submit_output(out)
211211
logger.info('Job %s: native id: %s', job.id, job.native_id)
212212
self._set_job_status(job, JobStatus(JobState.QUEUED,

src/psij/executors/batch/pbspro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_cancel_command(self, native_id: str) -> List[str]:
9090
# the slurm cancel command had a -Q parameter
9191
# which does not report an error if the job is already
9292
# completed.
93-
# TODO: whats the pbs equivalent of that?
93+
# TODO: what's the pbs equivalent of that?
9494
# there is -x which also removes job history (so would need to
9595
# check that this doesn't cause implicit COMPLETED states when
9696
# maybe it should be cancelled states?)

src/psij/job_executor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ def cancel(self, job: Job) -> None:
136136
"""
137137
Cancels a job that has been submitted to underlying executor implementation.
138138
139-
A successful return of this method only indicates that the request for cancelation has been
139+
A successful return of this method only indicates that the request for cancellation has been
140140
communicated to the underlying implementation. The job will then be canceled at the
141141
discretion of the implementation, which may be at some later time. A successful
142-
cancelation is reflected in a change of status of the respective job to
142+
cancellation is reflected in a change of status of the respective job to
143143
:attr:`~psij.JobState.CANCELED`. User code can synchronously wait until the
144144
:attr:`~psij.JobState.CANCELED` state is reached using `job.wait(JobState.CANCELED)` or
145145
even `job.wait()`, since the latter would wait for all final states, including
146146
`JobState.CANCELED`. In fact, it is recommended that `job.wait()` be used because it is
147-
entirely possible for the job to complete before the cancelation is communicated to the
147+
entirely possible for the job to complete before the cancellation is communicated to the
148148
underlying implementation and before the client code receives the completion notification.
149149
In such a case, the job will never enter the `CANCELED` state and
150150
`job.wait(JobState.CANCELED)` would hang indefinitely.

0 commit comments

Comments
 (0)