Skip to content

Commit 92e5101

Browse files
authored
Revert "job runners: document handler interface"
1 parent dcc69c0 commit 92e5101

File tree

5 files changed

+75
-18
lines changed

5 files changed

+75
-18
lines changed

src/conf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@
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-
131125
# List of patterns, relative to source directory, that match files and
132126
# directories to ignore when looking for source files.
133127
# exclude_patterns = ['_build']

src/dictionaries/words

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
Popen
21
app
32
apps
4-
arg
53
args
64
auth
75
authenticator
@@ -133,7 +131,6 @@ requeued
133131
resends
134132
resolvers
135133
resubmission
136-
ret
137134
retrigger
138135
retriggered
139136
retriggering
@@ -155,7 +152,6 @@ ssh
155152
st
156153
startup
157154
stderr
158-
stdin
159155
stdout
160156
str
161157
strftime

src/plugins/index.rst

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

1615
.. warning::
1716

src/plugins/job-runners/index.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

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

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,78 @@ 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)