Skip to content

Commit fe82504

Browse files
authored
Revert "Revert "job runners: document handler interface""
1 parent 3be926a commit fe82504

File tree

5 files changed

+18
-75
lines changed

5 files changed

+18
-75
lines changed

src/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@
122122
)
123123
}
124124

125+
nitpick_ignore = [
126+
# This class appears in documented type-hints but is not documented in the
127+
# Python docs so fails build.
128+
('py:class', 're.Pattern')
129+
]
130+
125131
# List of patterns, relative to source directory, that match files and
126132
# directories to ignore when looking for source files.
127133
# exclude_patterns = ['_build']

src/dictionaries/words

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
Popen
12
app
23
apps
4+
arg
35
args
46
auth
57
authenticator
@@ -131,6 +133,7 @@ requeued
131133
resends
132134
resolvers
133135
resubmission
136+
ret
134137
retrigger
135138
retriggered
136139
retriggering
@@ -152,6 +155,7 @@ ssh
152155
st
153156
startup
154157
stderr
158+
stdin
155159
stdout
156160
str
157161
strftime

src/plugins/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The following are "core" plugins maintained by the Cylc team:
1111
cylc-rose
1212
main-loop/index
1313
install/index
14+
job-runners/index
1415

1516
.. warning::
1617

src/plugins/job-runners/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _CustomJobSubmissionMethods:
2+
3+
Custom Job Submission Methods
4+
-----------------------------
5+
6+
.. autoclass:: cylc.flow.job_runner_handlers.documentation.ExampleHandler
7+
:members:

src/user-guide/task-implementation/job-submission.rst

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -302,78 +302,3 @@ If you specify an :cylc:conf:`[events]execution timeout` and an
302302
ignored.
303303

304304
.. cylc-scope::
305-
306-
307-
.. _CustomJobSubmissionMethods:
308-
309-
Custom Job Submission Methods
310-
-----------------------------
311-
312-
Defining a new job runner handler requires a little Python programming. Use
313-
the built-in handlers (e.g. :py:mod:`cylc.flow.job_runner_handlers.background`)
314-
as examples.
315-
316-
317-
An Example
318-
^^^^^^^^^^
319-
320-
The following ``qsub.py`` module overrides the built-in *pbs*
321-
job runner handler to change the directive prefix from ``#PBS`` to
322-
``#QSUB``:
323-
324-
.. TODO - double check that this still works, it's been a while
325-
326-
.. code-block:: python
327-
328-
#!/usr/bin/env python3
329-
330-
from cylc.flow.job_runner_handlers.pbs import PBSHandler
331-
332-
class QSUBHandler(PBSHandler):
333-
DIRECTIVE_PREFIX = "#QSUB "
334-
335-
JOB_RUNNER_HANDLER = QSUBHandler()
336-
337-
If this is in the Python search path (see
338-
:ref:`Where To Put Job Runner Handler Modules` below) you can use it by
339-
name in your global configuration:
340-
341-
.. code-block:: cylc
342-
343-
[platforms]
344-
[[my_platform]]
345-
hosts = myhostA, myhostB
346-
job runner = qsub # <---!
347-
348-
Then in your ``flow.cylc`` file you can use this platform:
349-
350-
.. code-block:: cylc
351-
352-
[scheduling]
353-
[[graph]]
354-
R1 = "a"
355-
[runtime]
356-
[[root]]
357-
execution time limit = PT1M
358-
platform = my_platform
359-
[[[directives]]]
360-
-l nodes = 1
361-
-q = long
362-
-V =
363-
364-
Note, this workflow will fail at run time because we only changed the
365-
directive format, and PBS does not accept ``#QSUB`` directives in
366-
reality.
367-
368-
369-
.. _Where To Put Job Runner Handler Modules:
370-
371-
Where To Put Job Runner Handler Modules
372-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
373-
374-
Custom job runner handlers must be installed on workflow and job
375-
hosts in one of these locations:
376-
377-
- under ``WORKFLOW-RUN-DIR/lib/python/``
378-
- under ``CYLC-PATH/cylc/flow/job_runner_handlers/``
379-
- or anywhere in ``$PYTHONPATH``

0 commit comments

Comments
 (0)