Skip to content

Commit f611a0c

Browse files
committed
Docs & changelog
1 parent 3af69d4 commit f611a0c

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

changes.d/7024.feat.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure `next()/previous()` syntax works for the `cylc play --startcp` option.

cylc/flow/option_parsers.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ def _update_sources(self, other):
123123
ICP_OPTION = OptionSettings(
124124
["--initial-cycle-point", "--icp"],
125125
help=(
126-
"Set the initial cycle point."
127-
" Required if not defined in flow.cylc."
128-
"\nMay be either an absolute point or an offset: See"
129-
f" {SHORTLINK_TO_ICP_DOCS} (Cylc documentation link)."
126+
"Set the initial cycle point. "
127+
"Required if not defined in flow.cylc.\n"
128+
"Can be an absolute point or an offset relative to the "
129+
"current time - see "
130+
f"{SHORTLINK_TO_ICP_DOCS} (Cylc documentation link)."
130131
),
131132
metavar="CYCLE_POINT or OFFSET",
132133
action='store',

cylc/flow/scheduler_cli.py

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
"""Common logic for "cylc play" CLI."""
1717

18-
from ansimarkup import parse as cparse
1918
import asyncio
2019
from copy import deepcopy
2120
from functools import lru_cache
@@ -24,50 +23,62 @@
2423
from pathlib import Path
2524
from shlex import quote
2625
import sys
27-
from typing import TYPE_CHECKING, Tuple
26+
from typing import (
27+
TYPE_CHECKING,
28+
Tuple,
29+
)
2830

31+
from ansimarkup import parse as cparse
2932
from packaging.version import Version
3033

31-
from cylc.flow import LOG, __version__
34+
from cylc.flow import (
35+
LOG,
36+
__version__,
37+
)
3238
from cylc.flow.exceptions import (
3339
CylcError,
3440
ServiceFileError,
3541
WorkflowStopped,
3642
)
37-
from cylc.flow.scripts.ping import run as cylc_ping
3843
import cylc.flow.flags
39-
from cylc.flow.id import upgrade_legacy_ids
4044
from cylc.flow.host_select import select_workflow_host
4145
from cylc.flow.hostuserutil import is_remote_host
46+
from cylc.flow.id import upgrade_legacy_ids
4247
from cylc.flow.id_cli import parse_ids_async
4348
from cylc.flow.loggingutil import (
44-
close_log,
4549
RotatingLogFileHandler,
50+
close_log,
4651
)
4752
from cylc.flow.network.client import WorkflowRuntimeClient
4853
from cylc.flow.network.log_stream_handler import ProtobufStreamHandler
4954
from cylc.flow.option_parsers import (
55+
ICP_OPTION,
56+
SHORTLINK_TO_ICP_DOCS,
5057
WORKFLOW_ID_ARG_DOC,
5158
CylcOptionParser as COP,
52-
OptionSettings,
5359
Options,
54-
ICP_OPTION,
60+
OptionSettings,
5561
)
5662
from cylc.flow.pathutil import get_workflow_run_scheduler_log_path
5763
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
6064
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,
6568
)
69+
from cylc.flow.scripts.common import cylc_header
70+
from cylc.flow.scripts.ping import run as cylc_ping
6671
from cylc.flow.terminal import (
6772
cli_function,
6873
is_terminal,
6974
prompt,
7075
)
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+
7182

7283
if TYPE_CHECKING:
7384
from optparse import Values
@@ -162,10 +173,14 @@
162173
OptionSettings(
163174
["--start-cycle-point", "--startcp"],
164175
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+
),
169184
metavar="CYCLE_POINT",
170185
action='store',
171186
dest="startcp",

0 commit comments

Comments
 (0)