|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | """Common logic for "cylc play" CLI.""" |
17 | 17 |
|
18 | | -from ansimarkup import parse as cparse |
19 | 18 | import asyncio |
20 | 19 | from copy import deepcopy |
21 | 20 | from functools import lru_cache |
|
24 | 23 | from pathlib import Path |
25 | 24 | from shlex import quote |
26 | 25 | import sys |
27 | | -from typing import TYPE_CHECKING, Tuple |
| 26 | +from typing import ( |
| 27 | + TYPE_CHECKING, |
| 28 | + Tuple, |
| 29 | +) |
28 | 30 |
|
| 31 | +from ansimarkup import parse as cparse |
29 | 32 | from packaging.version import Version |
30 | 33 |
|
31 | | -from cylc.flow import LOG, __version__ |
| 34 | +from cylc.flow import ( |
| 35 | + LOG, |
| 36 | + __version__, |
| 37 | +) |
32 | 38 | from cylc.flow.exceptions import ( |
33 | 39 | CylcError, |
34 | 40 | ServiceFileError, |
35 | 41 | WorkflowStopped, |
36 | 42 | ) |
37 | | -from cylc.flow.scripts.ping import run as cylc_ping |
38 | 43 | import cylc.flow.flags |
39 | | -from cylc.flow.id import upgrade_legacy_ids |
40 | 44 | from cylc.flow.host_select import select_workflow_host |
41 | 45 | from cylc.flow.hostuserutil import is_remote_host |
| 46 | +from cylc.flow.id import upgrade_legacy_ids |
42 | 47 | from cylc.flow.id_cli import parse_ids_async |
43 | 48 | from cylc.flow.loggingutil import ( |
44 | | - close_log, |
45 | 49 | RotatingLogFileHandler, |
| 50 | + close_log, |
46 | 51 | ) |
47 | 52 | from cylc.flow.network.client import WorkflowRuntimeClient |
48 | 53 | from cylc.flow.network.log_stream_handler import ProtobufStreamHandler |
49 | 54 | from cylc.flow.option_parsers import ( |
| 55 | + ICP_OPTION, |
| 56 | + SHORTLINK_TO_ICP_DOCS, |
50 | 57 | WORKFLOW_ID_ARG_DOC, |
51 | 58 | CylcOptionParser as COP, |
52 | | - OptionSettings, |
53 | 59 | Options, |
54 | | - ICP_OPTION, |
| 60 | + OptionSettings, |
55 | 61 | ) |
56 | 62 | from cylc.flow.pathutil import get_workflow_run_scheduler_log_path |
57 | 63 | from cylc.flow.remote import cylc_server_cmd |
58 | | -from cylc.flow.scheduler import Scheduler, SchedulerError |
59 | | -from cylc.flow.scripts.common import cylc_header |
60 | 64 | from cylc.flow.run_modes import WORKFLOW_RUN_MODES |
61 | | -from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager |
62 | | -from cylc.flow.workflow_files import ( |
63 | | - SUITERC_DEPR_MSG, |
64 | | - get_workflow_srv_dir, |
| 65 | +from cylc.flow.scheduler import ( |
| 66 | + Scheduler, |
| 67 | + SchedulerError, |
65 | 68 | ) |
| 69 | +from cylc.flow.scripts.common import cylc_header |
| 70 | +from cylc.flow.scripts.ping import run as cylc_ping |
66 | 71 | from cylc.flow.terminal import ( |
67 | 72 | cli_function, |
68 | 73 | is_terminal, |
69 | 74 | prompt, |
70 | 75 | ) |
| 76 | +from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager |
| 77 | +from cylc.flow.workflow_files import ( |
| 78 | + SUITERC_DEPR_MSG, |
| 79 | + get_workflow_srv_dir, |
| 80 | +) |
| 81 | + |
71 | 82 |
|
72 | 83 | if TYPE_CHECKING: |
73 | 84 | from optparse import Values |
|
162 | 173 | OptionSettings( |
163 | 174 | ["--start-cycle-point", "--startcp"], |
164 | 175 | help=( |
165 | | - "Set the start cycle point, which may be after" |
166 | | - " the initial cycle point. If the specified start point is" |
167 | | - " not in the sequence, the next on-sequence point will" |
168 | | - " be used. (Not to be confused with the initial cycle point)"), |
| 176 | + "Set the start cycle point, which may be after " |
| 177 | + "the initial cycle point. " |
| 178 | + "If the specified start point is not in the sequence, the next " |
| 179 | + "on-sequence point will be used.\n" |
| 180 | + "Can be an absolute point or an offset relative to the " |
| 181 | + "current time, like the --initial-cycle-point option - see " |
| 182 | + f"{SHORTLINK_TO_ICP_DOCS} (Cylc documentation link)." |
| 183 | + ), |
169 | 184 | metavar="CYCLE_POINT", |
170 | 185 | action='store', |
171 | 186 | dest="startcp", |
|
0 commit comments