Add-on: Add checkbox to submit jobs in paused status #104323

Merged
David Zhang merged 1 commits from David-Zhang-10/flamenco:submit-as-paused-addon into main 2024-07-25 04:26:06 +02:00
Collaborator

Overview
This pull request implements Issue #99439 Allow jobs to be submitted in paused status and builds upon PR #104313 Support pausing jobs and PR #104318 WIP: Allow jobs to be submitted in paused status.

Deliverables

  • A new option on the addon side that allows users to choose whether they would like the job to be submitted in paused status before submission to Flamenco Manager.
**Overview** This pull request implements [Issue #99439 Allow jobs to be submitted in paused status](https://projects.blender.org/studio/flamenco/issues/99439) and builds upon [PR #104313 Support pausing jobs](https://projects.blender.org/studio/flamenco/pulls/104313) and [PR #104318 WIP: Allow jobs to be submitted in paused status](https://projects.blender.org/studio/flamenco/pulls/104318). **Deliverables** - A new option on the addon side that allows users to choose whether they would like the job to be submitted in `paused` status before submission to Flamenco Manager.
David Zhang added 4 commits 2024-07-03 21:03:34 +02:00
David Zhang requested review from Sybren A. Stüvel 2024-07-03 21:04:02 +02:00
David Zhang changed title from WIP: Addon frontend for jobs to be submitted in `paused` status to Addon frontend for jobs to be submitted in `paused` status 2024-07-08 16:03:16 +02:00
David Zhang force-pushed submit-as-paused-addon from 46260a4a76 to 05587d7fa2 2024-07-12 05:23:58 +02:00 Compare
Sybren A. Stüvel requested changes 2024-07-15 11:38:27 +02:00
Dismissed
@ -156,6 +156,12 @@ def register() -> None:
max=100,
)
bpy.types.Scene.flamenco_job_initial_status = bpy.props.BoolProperty(

There's a discrepancy here between the property name (says this should be a status) and its definition (says it's whether the job should be paused or not). Choose one, and use it consistently.

Since this property is used for the GUI as well, and we discussed offering a checkbox 'submit paused', using a BoolProperty is the right choice, and the name should change.

There's a discrepancy here between the property name (says this should be a status) and its definition (says it's whether the job should be paused or not). Choose one, and use it consistently. Since this property is used for the GUI as well, and we discussed offering a checkbox 'submit paused', using a `BoolProperty` is the right choice, and the name should change.
David-Zhang-10 marked this conversation as resolved
@ -158,1 +158,4 @@
bpy.types.Scene.flamenco_job_initial_status = bpy.props.BoolProperty(
name="Flamenco Job Initial Status",
description="Initial status of the render job; True sets the job to `paused`, and False sets the job to `queued`",

This description is for users of Blender, not for developers. Replace the Python terminology (True and False) with what they can see: checked & unchecked.

👍 for describing both 'checked' & 'unchecked' cases, often enough people only describe one and leave you to guess what the other meant. My favourite example here is good old DOOM: it had a checkbox "8-bit textures" -- no idea whether un-checking meant 4-bit or 16-bit textures.

This description is for users of Blender, not for developers. Replace the Python terminology (`True` and `False`) with what they can see: checked & unchecked. 👍 for describing both 'checked' & 'unchecked' cases, often enough people only describe one and leave you to guess what the other meant. My favourite example here is good old DOOM: it had a checkbox "8-bit textures" -- no idea whether un-checking meant 4-bit or 16-bit textures.
David-Zhang-10 marked this conversation as resolved
David Zhang added 1 commit 2024-07-19 03:40:21 +02:00
David Zhang requested review from Sybren A. Stüvel 2024-07-19 03:40:55 +02:00
Sybren A. Stüvel requested changes 2024-07-22 11:14:02 +02:00
Dismissed
@ -42,6 +42,7 @@ class FLAMENCO_PT_job_submission(bpy.types.Panel):
col = layout.column(align=True)
col.prop(context.scene, "flamenco_job_name", text="Job Name")
col.prop(context.scene, "flamenco_job_priority", text="Priority")
col.prop(context.scene, "flamenco_job_initial_status", text="Submit as Paused")

Make sure you test before committing & pushing ;-) (and yes, I've been here myself as well)

Make sure you test before committing & pushing ;-) (and yes, I've been here myself as well)
David-Zhang-10 marked this conversation as resolved
David Zhang added 1 commit 2024-07-23 04:08:02 +02:00
David Zhang requested review from Sybren A. Stüvel 2024-07-23 04:08:22 +02:00
Sybren A. Stüvel changed title from Addon frontend for jobs to be submitted in `paused` status to Add-on: Add checkbox to submit jobs in `paused` status 2024-07-23 08:28:50 +02:00
Sybren A. Stüvel approved these changes 2024-07-23 08:44:18 +02:00
Sybren A. Stüvel left a comment
Owner

Accepted!

As for the commit message, that shouldn't use much MarkDown, as it's typically rendered as plain text. Also it should be line-wrapped at max 72-75 characters. Something like this would work:

Add a checkbox to the submission interface to submit the job in
`paused` status.

Internally this translates the boolean value of the checkbox to the 
desired state (`queued` or `paused`). A checkbox was chosen to
simplify the user interface; technically a drop-down could have been
used to select the initial state, but this would require more clicks
to get the same result.

Pull Request: https://projects.blender.org/studio/flamenco/pulls/104323

Please use the 'Create squash commit' method of landing the PR.

Accepted! As for the commit message, that shouldn't use much MarkDown, as it's typically rendered as plain text. Also it should be line-wrapped at max 72-75 characters. Something like this would work: ``` Add a checkbox to the submission interface to submit the job in `paused` status. Internally this translates the boolean value of the checkbox to the desired state (`queued` or `paused`). A checkbox was chosen to simplify the user interface; technically a drop-down could have been used to select the initial state, but this would require more clicks to get the same result. Pull Request: https://projects.blender.org/studio/flamenco/pulls/104323 ``` Please use the 'Create squash commit' method of landing the PR.
David Zhang added 1 commit 2024-07-25 04:04:12 +02:00
David Zhang force-pushed submit-as-paused-addon from 911dfff0c3 to 3f19327886 2024-07-25 04:22:53 +02:00 Compare
David Zhang force-pushed submit-as-paused-addon from 3f19327886 to cc59f0b79a 2024-07-25 04:24:30 +02:00 Compare
David Zhang merged commit 754ee9278e into main 2024-07-25 04:26:06 +02:00
Sign in to join this conversation.
No description provided.