Skip to content

Submitter: make some functions externally callable#1

Draft
moonyuet wants to merge 7 commits into
mainlinefrom
external-api-access
Draft

Submitter: make some functions externally callable#1
moonyuet wants to merge 7 commits into
mainlinefrom
external-api-access

Conversation

@moonyuet
Copy link
Copy Markdown
Member

@moonyuet moonyuet commented May 7, 2026

Change

Make parts of the submitter logic externally callable. This allows to get the data from submitter as dictionaries before they are dumped to job bundle yaml files.

Example

You can now use following code to get access:

from typing import Any
from deadline.nuke_submitter.deadline_submitter_for_nuke import (
    get_job_template_for_submission,
    get_parameter_values_for_submission,
    get_asset_references_for_submission,
    get_queue_parameters,
)
from deadline.nuke_submitter.data_classes import RenderSubmitterUISettings
from deadline.client.job_bundle.submission import AssetReferences


settings = SubmitterUISettings()
queue_parameters: list[dict[str, Any]] = get_queue_parameters()
asset_references = AssetReferences(
        input_filenames=set(settings.input_filenames),
        input_directories=set(settings.input_directories),
        output_directories=set(settings.output_directories),
    )


# this would be 'job_bundle/tempate.yaml'
job_template = get_job_template_for_submission(settings)
# this would be 'job_bundle/parameter_values.yaml'
parameter_values = get_parameter_values_for_submission(settings, queue_parameters)
# this would be 'job_bundle/asset_references.yaml'
asset_refs_dict = get_asset_references_for_submission(asset_references)

Note about get_queue_parameters()

This function was created to set Open Job Description queue parameters manually (not from the UI).

It can be used like so:

queue_params = get_queue_parameters(
    initial_values={"CondaPackages": "nuke=16.0*"}
)

Or explicitely (it won't get farm_id and queue_id from the settings:

queue_params = get_queue_parameters(
    farm_id="farm=xxxxx",
    queue_id="queue-xxxx",
    initial_values={"CondaPackages": "nuke=16.0*"}
)

…convenient for ayon-deadline-cloud implementation
@moonyuet moonyuet requested a review from antirotor May 7, 2026 07:15
@moonyuet moonyuet self-assigned this May 7, 2026
@BigRoy BigRoy added the enhancement New feature or request label May 7, 2026
* ci: run Code Quality on mainline pushes to seed shared cache

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>

* fix(ci): grant id-token: write for release bump workflow

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>

* chore(ci): add manual test gate to release workflow

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>

---------

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@antirotor
Copy link
Copy Markdown
Member

It is not getting Nuke Script File correctly:

image

npmacl and others added 2 commits May 12, 2026 12:18
…ws-deadline#307)

* chore: bump deadline-cloud version, switch to renamed function names

Signed-off-by: Nathan MacLeod <142927985+npmacl@users.noreply.github.com>
@moonyuet
Copy link
Copy Markdown
Member Author

moonyuet commented May 13, 2026

It is not getting Nuke Script File correctly:

image

Fixed in the twin PR in ayon-deadline-cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants