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

Schema: use Enum for task run mode instead of String #61

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

MetRonnie
Copy link

@MetRonnie MetRonnie commented Jun 27, 2024

This allows it to be represented by a drop-down in the Edit Runtime form

image

Plus tidy

Equivalent UIS PR: cylc/cylc-uiserver#609

@MetRonnie MetRonnie mentioned this pull request Jun 27, 2024
8 tasks
@wxtim
Copy link
Owner

wxtim commented Jun 27, 2024

Thanks @MetRonnie - that's fab. Will review once I have 8.3.1 stuff put to bed. :)

@wxtim wxtim merged commit fe878ed into wxtim:feature.skip_mode Jul 22, 2024
25 of 26 checks passed
wxtim pushed a commit that referenced this pull request Jul 22, 2024
* Schema: use `Enum` for task run mode instead of `String`

* Tidy
@MetRonnie MetRonnie deleted the skip-mode-schema branch July 22, 2024 15:52
wxtim pushed a commit that referenced this pull request Aug 2, 2024
* Schema: use `Enum` for task run mode instead of `String`

* Tidy
wxtim added a commit that referenced this pull request Aug 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Aug 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Aug 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Aug 12, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Aug 13, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Aug 16, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Sep 2, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)
wxtim added a commit that referenced this pull request Sep 2, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)

fix tests with extra messages surfaces by using log_filter

make cylc clean and remote tidy not try to clean or tidy platforms

stop dummy mode appearing to submit twice

Prevent cleanup from attempting to remote clean platforms skip and simulation

Update cylc/flow/run_modes/skip.py

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>

fix small issues from OS review

response to review: Make satisfaction method correct according the proposal

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

don't run sim time check unless workflow in sim mode

test that skip mode is only applied to a single task.

remove now illegal items from test

Response to review:
- Remove Workflow Mode for tasks and make them default to live.
- Ensure that we are checking (assert) log_filters.
- Remove need for polling in functional test. :)

usin enums

Apply suggestions from code review

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
wxtim added a commit that referenced this pull request Sep 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)

fix tests with extra messages surfaces by using log_filter

make cylc clean and remote tidy not try to clean or tidy platforms

stop dummy mode appearing to submit twice

Prevent cleanup from attempting to remote clean platforms skip and simulation

Update cylc/flow/run_modes/skip.py

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>

fix small issues from OS review

response to review: Make satisfaction method correct according the proposal

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

don't run sim time check unless workflow in sim mode

test that skip mode is only applied to a single task.

remove now illegal items from test

Response to review:
- Remove Workflow Mode for tasks and make them default to live.
- Ensure that we are checking (assert) log_filters.
- Remove need for polling in functional test. :)

usin enums

Apply suggestions from code review

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
wxtim added a commit that referenced this pull request Sep 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)

fix tests with extra messages surfaces by using log_filter

make cylc clean and remote tidy not try to clean or tidy platforms

stop dummy mode appearing to submit twice

Prevent cleanup from attempting to remote clean platforms skip and simulation

Update cylc/flow/run_modes/skip.py

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>

fix small issues from OS review

response to review: Make satisfaction method correct according the proposal

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

don't run sim time check unless workflow in sim mode

test that skip mode is only applied to a single task.

remove now illegal items from test

Response to review:
- Remove Workflow Mode for tasks and make them default to live.
- Ensure that we are checking (assert) log_filters.
- Remove need for polling in functional test. :)

usin enums

Apply suggestions from code review

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
wxtim added a commit that referenced this pull request Sep 5, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)

fix tests with extra messages surfaces by using log_filter

make cylc clean and remote tidy not try to clean or tidy platforms

stop dummy mode appearing to submit twice

Prevent cleanup from attempting to remote clean platforms skip and simulation

Update cylc/flow/run_modes/skip.py

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>

fix small issues from OS review

response to review: Make satisfaction method correct according the proposal

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

don't run sim time check unless workflow in sim mode

test that skip mode is only applied to a single task.

remove now illegal items from test

Response to review:
- Remove Workflow Mode for tasks and make them default to live.
- Ensure that we are checking (assert) log_filters.
- Remove need for polling in functional test. :)

usin enums

Apply suggestions from code review

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
wxtim added a commit that referenced this pull request Sep 20, 2024
* Add `[runtime][<namespace>]run mode` and `[runtime][<namespace>][skip]`.
* Spin run mode functionality into separate modules.
* Run sim mode check with every main loop - we don't know if any tasks are
  in sim mode from the scheduler, but it doesn't cost much to check
  if none are.
* Implemented separate job "submission" pathway switching.
* Implemented skip mode, including output control logic.
* Add a linter and a validation check for tasks in nonlive modes,
  and for combinations of outputs
* Enabled setting outputs as if task ran in skip mode using
  `cylc set --out skip`.
* Testing for the above.

Schema: use `Enum` for task run mode instead of `String` (#61)

* Schema: use `Enum` for task run mode instead of `String`

* Tidy

fixup merge

fix broken functional test

Improve cylc set --out skip
* Improve documentation of feature in cylc set --help
* Allow cylc set --out=skip,optional_output
* Test the above

Remove test: We don't want users opting out of validating
[runtime][ns][simulation/skip] because we can now
changes these in a running workflow.

stop users opting out of validating workflows without validating ski/simulation taskdef sections

added tests for db entries in nonlive mode

ensure db entries for all four modes are correct.

move the change file toi the correct name

get localhost of platforms 'simulation' 'skip' or 'dummy' not defined. (They probably shouldn't be, but that's a site specific choice...)

fix tests with extra messages surfaces by using log_filter

make cylc clean and remote tidy not try to clean or tidy platforms

stop dummy mode appearing to submit twice

Prevent cleanup from attempting to remote clean platforms skip and simulation

Update cylc/flow/run_modes/skip.py

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>

fix small issues from OS review

response to review: Make satisfaction method correct according the proposal

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

Response to review
* Allow only run modes skip and live to be selectable in the config.
* Disallow workflow run modes sim and dummy from being overridden.
* Attach Run mode to task_proxy rather than the task def.

don't run sim time check unless workflow in sim mode

test that skip mode is only applied to a single task.

remove now illegal items from test

Response to review:
- Remove Workflow Mode for tasks and make them default to live.
- Ensure that we are checking (assert) log_filters.
- Remove need for polling in functional test. :)

usin enums

Apply suggestions from code review

Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants