Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: short option changes #5439

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ creating a new release entry be sure to copy & paste the span tag with the
`actions:bind` attribute, which is used by a regex to find the text to be
updated. Only the first match gets replaced, so it's fine to leave the old
ones in. -->

-------------------------------------------------------------------------------
## __cylc-8.2.0 (<span actions:bind='release-date'>Upcoming</span>)__

[#5439](https://github.com/cylc/cylc-flow/pull/5439) - Small CLI short option chages:
Add the `-n` short option for `--workflow-name` to `cylc vip`; rename the `-n`
short option for `--no-detach` to `-N`; add `-r` as a short option for
`--run-name`.

-------------------------------------------------------------------------------
## __cylc-8.1.3 (<span actions:bind='release-date'>Upcoming</span>)__

Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scheduler_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

PLAY_OPTIONS = [
OptionSettings(
["-n", "--no-detach", "--non-daemon"],
["-N", "--no-detach", "--non-daemon"],
help="Do not daemonize the scheduler (infers --format=plain)",
action='store_true', dest="no_detach", sources={'play'}),
OptionSettings(
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
sources={'install'},
),
OptionSettings(
["--run-name"],
["--run-name", "-r"],
help=(
"Give the run a custom name instead of automatically"
" numbering it."),
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-trigger/06-already-active.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play --debug -n "${WORKFLOW_NAME}"
cylc play --debug --no-detach "${WORKFLOW_NAME}"

purge
2 changes: 1 addition & 1 deletion tests/functional/optional-outputs/00-stall-on-partial.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play -n --reference-test --debug "${WORKFLOW_NAME}"
cylc play --no-detach --reference-test --debug "${WORKFLOW_NAME}"

LOG="${WORKFLOW_RUN_DIR}/log/scheduler/log"
grep_ok "Partially satisfied prerequisites" "${LOG}"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/optional-outputs/01-stall-on-incomplete.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play -n --reference-test --debug "${WORKFLOW_NAME}"
cylc play --no-detach --reference-test --debug "${WORKFLOW_NAME}"

LOG="${WORKFLOW_RUN_DIR}/log/scheduler/log"
grep_ok "Incomplete tasks" "${LOG}"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/optional-outputs/03-c7backcompat.t
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ grep_ok "${DEPR_MSG_1}" "${TEST_NAME}.stderr"

# And it should run without stalling with an incomplete task.
workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play -n --reference-test --debug "${WORKFLOW_NAME}"
cylc play --no-detach --reference-test --debug "${WORKFLOW_NAME}"

purge
exit
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ grep_ok "${DEPR_MSG_1}" "${TEST_NAME}.stderr"

# Should stall and abort with an unsatisfied prerequisite.
workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play -n --reference-test --debug "${WORKFLOW_NAME}"
cylc play --no-detach --reference-test --debug "${WORKFLOW_NAME}"

grep_workflow_log_ok grep-1 "WARNING - Partially satisfied prerequisites"
grep_workflow_log_ok grep-2 "Workflow stalled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ grep_ok "${DEPR_MSG_1}" "${TEST_NAME}.stderr"

# Should stall and abort with an unsatisfied prerequisite.
workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play -n --reference-test --debug "${WORKFLOW_NAME}"
cylc play --no-detach --reference-test --debug "${WORKFLOW_NAME}"

grep_workflow_log_ok grep-1 "WARNING - Partially satisfied prerequisites"
grep_workflow_log_ok grep-2 "Workflow stalled"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/optional-outputs/06-c7backcompat-family.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ grep_ok "${DEPR_MSG_1}" "${TEST_NAME}.stderr"

# Should stall and abort with unsatisfied "stall" tasks.
workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play -n --debug "${WORKFLOW_NAME}"
cylc play --no-detach --debug "${WORKFLOW_NAME}"

grep_workflow_log_ok grep-1 "Workflow stalled"
grep_workflow_log_ok grep-2 "WARNING - Partially satisfied prerequisites"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DEPR_MSG_1=$(python -c \
grep_ok "${DEPR_MSG_1}" "${TEST_NAME}.stderr"

# Stall expected at FCP (but not at runahead limit).
workflow_run_fail "${TEST_NAME_BASE}-run" cylc play -n --debug "${WORKFLOW_NAME}"
workflow_run_fail "${TEST_NAME_BASE}-run" cylc play --no-detach --debug "${WORKFLOW_NAME}"

grep_workflow_log_ok grep-0 "Workflow stalled"
grep_workflow_log_ok grep-1 "ERROR - Incomplete tasks:"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/optional-outputs/08-finish-fail-c7-c8.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ DEPR_MSG="deprecated graph items were automatically upgraded" # (not back-compa
grep_ok "${DEPR_MSG}" "${TEST_NAME}.stderr"

# No stall expected.
workflow_run_ok "${TEST_NAME_BASE}-run" cylc play -n --debug "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME_BASE}-run" cylc play --no-detach --debug "${WORKFLOW_NAME}"

purge
4 changes: 2 additions & 2 deletions tests/functional/restart/58-removed-task.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ run_ok "${TEST_NAME_BASE}-validate" cylc validate --set="INCL_B_C=True" "${WORKF
run_ok "${TEST_NAME_BASE}-validate" cylc validate --set="INCL_B_C=False" "${WORKFLOW_NAME}"

TEST_NAME="${TEST_NAME_BASE}-run"
workflow_run_ok "${TEST_NAME}" cylc play -n "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME}" cylc play --no-detach "${WORKFLOW_NAME}"

# Restart with removed tasks should not cause an error.
# It should shut down cleanly after orphaned task a and incomplete failed task
# b are polled (even though b has been removed from the graph) and a finishes
# (after checking the poll results).
TEST_NAME="${TEST_NAME_BASE}-restart"
workflow_run_ok "${TEST_NAME}" cylc play --set="INCL_B_C=False" -n "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME}" cylc play --set="INCL_B_C=False" --no-detach "${WORKFLOW_NAME}"

grep_workflow_log_ok "grep-3" "\[1/a running job:01 flows:1\] (polled)started"
grep_workflow_log_ok "grep-4" "\[1/b failed job:01 flows:1\] (polled)failed"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/rnd/05-main-loop.t
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ __FLOW_CYLC__
# run a workflow with all the development main-loop plugins turned on
run_ok "${TEST_NAME_BASE}-run" \
cylc play "${WORKFLOW_NAME}" \
-n \
--no-detach \
--debug \
--main-loop 'log data store' \
--main-loop 'log db' \
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/triggering/18-suicide-active.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play --debug -n "${WORKFLOW_NAME}"
cylc play --debug --no-detach "${WORKFLOW_NAME}"

grep_workflow_log_ok "${TEST_NAME_BASE}-grep" "suiciding while active"

Expand Down