Skip to content

Commit

Permalink
feat: Convert custom commands options and pass them to the `DynamicSe…
Browse files Browse the repository at this point in the history
…ttingsWidget`
  • Loading branch information
KernAttila committed Mar 28, 2023
1 parent e2847f4 commit 1eca853
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cuesubmit/cuesubmit/JobTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from builtins import object
from cuesubmit.ui import SettingsWidgets
from cuesubmit import Constants

from cuesubmit import Util

class JobTypes(object):
"""Base Job Types available in the UI.
Expand Down Expand Up @@ -54,6 +54,11 @@ def __init__(self):
@classmethod
def build(cls, jobType, *args, **kwargs):
"""Factory method for creating a settings widget."""
if jobType in cls.FROM_CONFIG_FILE:
jobOptions = Constants.RENDER_CMDS[jobType].get('options')
parameters = Util.convertCommandOptions(options=jobOptions)
kwargs.update({'tool_name': jobType,
'parameters': parameters})
return cls.SETTINGS_MAP[jobType](*args, **kwargs)

@classmethod
Expand Down

0 comments on commit 1eca853

Please sign in to comment.