qgis_deployment_toolbelt.jobs.job_default_profile_setter module

Set the default profile in profiles.ini file.

Author: Nicolas Godet (https://github.com/nicogodet)

class qgis_deployment_toolbelt.jobs.job_default_profile_setter.DefaultProfileSetterOptions(*, profile: str, force_profile_selection_policy: Literal[0, 1, 2] | None = None)

Bases: JobOptions

Options of the default-profile-setter job.

_abc_impl = <_abc._abc_data object>
classmethod _int_only(value: Any) → Any

Reject values which are not integers: even in strict mode, pydantic accepts booleans and floats equal to a literal (True as 1, 1.0 as 1).

force_profile_selection_policy: Literal[0, 1, 2] | None

value forced for the profile selection policy (QGIS selectionPolicy): 0: last closed profile, 1: default profile, 2: ask at startup. None: the selection policy is left as is.

model_config = {'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

profile: str

name of the profile to set as default profile

class qgis_deployment_toolbelt.jobs.job_default_profile_setter.JobDefaultProfileSetter(options: dict | None)

Bases: GenericJob

Job to set the default profile in profiles.ini file.

ID: str = 'default-profile-setter'
OPTIONS

alias of DefaultProfileSetterOptions

__init__(options: dict | None) → None

Instantiate the class.

Parameters:

options (dict | None) – options set in the with key of the scenario step, see DefaultProfileSetterOptions

_abc_impl = <_abc._abc_data object>
run() → None

Execute job logic.