omni.flux.validator.factory#

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.extension.FluxValidatorFactoryExtension#

Create Final Configuration

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.setup.ValidatorFactory#
is_plugin_registered(name: str) bool#

Check is the plugin is registered into the factory

Parameters:

name – the name of the plugin to check

Raises:

ValueError – if the plugin is not registered

Returns:

True if registered, else raise a Value Error

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.data_flow.base_data_flow.DataFlow#
Config:
  • extra: str = forbid

Fields:
field channel: str | None = 'Default'#
field name: str [Required]#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.data_flow.in_out_data.InOutDataFlow#
Config:
  • extra: str = forbid

Fields:
field input_data: list[str] | None = None#
field name: str = 'InOutData'#
field output_data: list[str] | None = None#
field push_input_data: bool = False#
field push_output_data: bool = False#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

omni.flux.validator.factory.data_flow.utils.push_input_data(schema_data, file_paths: list[str])#

Push a list of files into the data flow input

Parameters:
  • schema_data – the schema to use

  • file_paths – the list of files to push

omni.flux.validator.factory.data_flow.utils.push_output_data(schema_data, file_paths: list[str])#

Push a list of files into the data flow output

Parameters:
  • schema_data – the schema to use

  • file_paths – the list of files to push

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.check_base.CheckBase#
pydantic model Data#
Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_check_data (Any | None)

  • last_check_message (str | None)

  • last_check_result (bool | None)

  • last_check_timing (float | None)

  • last_fix_data (Any | None)

  • last_fix_message (str | None)

  • last_fix_result (bool | None)

  • last_fix_timing (float | None)

  • on_check_callback (collections.abc.Callable[[bool, str, Any], Any] | None)

  • on_fix_callback (collections.abc.Callable[[bool, str, Any], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_check_result_callback » last_check_result

  • _fire_last_fix_result_callback » last_fix_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_check_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_check_message: str | None = None#
field last_check_result: bool | None = None#
Validated by:
  • _fire_last_check_result_callback

field last_check_timing: float | None = None#
field last_fix_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_fix_message: str | None = None#
field last_fix_result: bool | None = None#
Validated by:
  • _fire_last_fix_result_callback

field last_fix_timing: float | None = None#
field on_check_callback: Callable[[bool, str, Any], Any] | None = None#
field on_fix_callback: Callable[[bool, str, Any], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async check(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to check the data

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the selector plugin

Returns:

True if the check passed, False if not. If the check is True, it will NOT run the fix str: the message you want to show, like “Succeeded to check this” any: data that you want to pass. For now this is used no where. So you can pass whatever you want (None)

Return type:

bool

async fix(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to fix the data if the fix function return False

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the selector plugin

Returns:

True if the fix passed, False if not. str: the message you want to show, like “Succeeded to fix this” any: data that you want to pass. For now this is used no where. So you can pass whatever you want (None)

Return type:

bool

subscribe_check(
callback: Callable[[Any, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_fix(
callback: Callable[[Any, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.check_base.Schema#
Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:
field context_plugin: Schema [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field pause_if_fix_failed: bool = True#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field resultor_plugins: list[Schema] | None = None#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field selector_plugins: list[Schema] [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

  • at_least_one

field stop_if_fix_failed: bool = False#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

validator at_least_one  »  selector_plugins#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.context_base.ContextBase#
pydantic model Data#
Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • hide_context_ui (bool)

  • last_check_message (str | None)

  • last_check_result (bool | None)

  • last_check_timing (float | None)

  • last_on_exit_message (str | None)

  • last_on_exit_result (bool | None)

  • last_on_exit_timing (float | None)

  • last_set_data (omni.flux.validator.factory.plugins.context_base.SetupDataTypeVar | None)

  • last_set_message (str | None)

  • last_set_result (bool | None)

  • last_set_timing (float | None)

  • on_check_callback (collections.abc.Callable[[bool, str], Any] | None)

  • on_exit_callback (collections.abc.Callable[[bool, str], Any] | None)

  • on_set_callback (collections.abc.Callable[[bool, str, omni.flux.validator.factory.plugins.context_base.SetupDataTypeVar], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_check_result_callback » last_check_result

  • _fire_last_exit_result_callback » last_on_exit_result

  • _fire_last_set_result_callback » last_set_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field hide_context_ui: bool = False#
field last_check_message: str | None = None#
field last_check_result: bool | None = None#
Validated by:
  • _fire_last_check_result_callback

field last_check_timing: float | None = None#
field last_on_exit_message: str | None = None#
field last_on_exit_result: bool | None = None#
Validated by:
  • _fire_last_exit_result_callback

field last_on_exit_timing: float | None = None#
field last_set_data: SetupDataTypeVar | None = None#

This is tmp we don’t keep it in the schema

field last_set_message: str | None = None#
field last_set_result: bool | None = None#
Validated by:
  • _fire_last_set_result_callback

field last_set_timing: float | None = None#
field on_check_callback: Callable[[bool, str], Any] | None = None#
field on_exit_callback: Callable[[bool, str], Any] | None = None#
field on_set_callback: Callable[[bool, str, SetupDataTypeVar], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async check(
schema_data: Data,
parent_context: SetupDataTypeVar,
) tuple[bool, str]#

Function that will be called to check the data. For example, check that a USD stage is open, or a USD file path exist

Parameters:
  • schema_data – the data that should be checked

  • parent_context – context data from the parent context

Returns:

True if the check passed, False if not. str: the message you want to show, like “Succeeded to check this context”

Return type:

bool

async on_exit(
schema_data: Data,
parent_context: SetupDataTypeVar,
) tuple[bool, str]#

Function that will be called to after the check of the data. For example, save the input USD stage

Parameters:
  • schema_data – the data that should be checked

  • parent_context – context data from the parent context

Returns:

True if the on exit passed, False if not. str: the message you want to show, like “Succeeded to exit this context”

Return type:

bool

async setup(
schema_data: Data,
run_callback: Callable[[SetupDataTypeVar], Awaitable[None]],
parent_context: SetupDataTypeVar,
) tuple[bool, str, SetupDataTypeVar]#

Function that will be called to set the data. For a context plugin, it will grab the data that we want to pass them to check plugin. From example, open a USD file and grab the prims. Or grab prims from an opened stage.

Parameters:
  • schema_data – the data that should set. Same data than check()

  • run_callback – the validation that will be run in the context of this setup

  • parent_context – context data from the parent context

Returns:

True if the setup passed, False if not. str: the message you want to show, like “Succeeded to setup this” any: data that you want to pass. Those data will be passed and used by the selector(s) and check(s) plugins. Like a USD stage.

Return type:

bool

subscribe_check(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_on_exit(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_set(
callback: Callable[[bool, str, SetupDataTypeVar], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.context_base.Schema#
Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:

field resultor_plugins: list[Schema] | None = None#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.interface_base.IBase#
pydantic model Data#
abstract classmethod sanitize_uuid(v: str | None) str | None#
abstract property data_flow_compatible_name: list[str] | None#
abstract async build_ui(schema_data: Any) Any#

Build the UI of a plugin

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

abstract get_global_progress() float#

The value of the global progression of the validation

abstract mass_build_queue_action_ui(
schema_data: Any,
default_actions: list[Callable[[], Any]],
callback: Callable[[str], Any],
) Any#

Default exposed action for Mass validation. The UI will be built into the delegate of the mass queue. Please implement your code using _mass_build_queue_action_ui()

abstract async mass_build_ui(schema_data: Any) Any#

Build the mass UI of a plugin. This function should not be overridden. Please implement your code using _mass_build_ui()

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

abstract async mass_cook_template(
schema_data_template: Any,
) tuple[bool, str | None, list[Data]]#

Take a template as an input and the (previous) result, and edit the result for mass processing. For example, receive 1 template that has a context plugin with a list of files, and generate multiple schema from the template, with 1 input file for each template. Please implement your code using _mass_cook_template()

Parameters:

schema_data_template – the data of the plugin from the schema

Returns:

A tuple of the shape (TemplateCookingSuccess, ErrorMessage, CookingData)

abstract async on_crash(schema_data: Any, data: Any) None#

Function that will be called when a plugin crash

Parameters:
  • schema_data – the data of the plugin from the schema

  • data – any random data we want to pass

abstract on_mass_cook_template(
success: bool,
message: str,
data: Any,
)#

Return the object that will automatically unsubscribe when destroyed.

abstract on_progress(progress: float, message: str, result: bool)#

Set the progression of the plugin. Setting the attribute will fire self.__on_progress

abstract set_global_progress(value: float)#

The value of the global progression of the validation

abstract set_parent_schema(
schema: IBaseSchema,
)#

Set the schema

Parameters:

schema – the schema to set

abstract show(value: bool, schema_data: Any)#

Called whenever the plugin is show or hidden in the UI.

abstract subscribe_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_enable_validation(
callback: Callable[[bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

abstract subscribe_global_progress(
callback: Callable[[float], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

abstract subscribe_mass_build_queue_action_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_mass_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_mass_cook_template(
callback: Callable[[tuple[bool, str | None, Any]], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_on_validation_is_ready_to_run(
callback: Callable[[int, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

abstract subscribe_progress(
callback: Callable[[float, str, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

abstract subscribe_validator_run(
callback: Callable[[list[IBase], Enum, bool | None], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

pydantic model omni.flux.validator.factory.plugins.interface_base.IBaseSchema#
abstract destroy()#
abstract classmethod is_registered(v: str) str#
abstract property instance: Any#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.plugin_base.Base#
pydantic model Data#
Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • channel (str)

  • cook_mass_template (bool)

  • data_flows (list[omni.flux.validator.factory.data_flow.base_data_flow.DataFlow] | None)

  • display_name_mass_template (str | None)

  • display_name_mass_template_tooltip (str | None)

  • expose_mass_queue_action_ui (bool)

  • expose_mass_ui (bool)

  • global_progress_value (float | None)

  • on_global_progress_callback (collections.abc.Callable[[float], None] | None)

  • on_progress_callback (collections.abc.Callable[[float, str, bool], None] | None)

  • progress (tuple[float, str, bool] | None)

  • uuid (str | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field channel: str = 'Default'#
field cook_mass_template: bool = False#

Set this to true if you want the mass validator to use the plugin to cook the template

field data_flows: list[_DataFlow] | None = None#
field display_name_mass_template: str | None = None#

Name to show when we process a cooked template from mass processing

field display_name_mass_template_tooltip: str | None = None#

Tooltip to show when we process a cooked template from mass processing

field expose_mass_queue_action_ui: bool = False#
field expose_mass_ui: bool = False#
field global_progress_value: float | None = 0.0#

Global progress value of the plugin

Validated by:
  • _fire_global_progress_value_callback

field on_global_progress_callback: Callable[[float], None] | None = None#
field on_progress_callback: Callable[[float, str, bool], None] | None = None#
field progress: tuple[float, str, bool] | None = (0.0, 'Initializing', True)#

Progress of the plugin

Validated by:
  • _fire_progress_callback

field uuid: str | None = None#

UUID of the plugin

Validated by:
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

validator sanitize_uuid  »  uuid#
property data_flow_compatible_name#
async build_ui(schema_data: Any) Any#

Build the UI of a plugin

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

get_global_progress() float#

The value of the global progression of the validation

mass_build_queue_action_ui(
schema_data: Any,
default_actions: list[Callable[[], Any]],
callback: Callable[[str], Any],
) Any#

Default exposed action for Mass validation. The UI will be built into the delegate of the mass queue. Please implement your code using _mass_build_queue_action_ui()

async mass_build_ui(schema_data: Any) Any#

Build the mass UI of a plugin. This function should not be overridden. Please implement your code using _mass_build_ui()

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

async mass_cook_template(
schema_data_template: Any,
) tuple[bool, str | None, list[Data]]#

Take a template as an input and the (previous) result, and edit the result for mass processing. For example, receive 1 template that has a context plugin with a list of files, and generate multiple schema from the template, with 1 input file for each template. Please implement your code using _mass_cook_template()

Parameters:

schema_data_template – the data of the plugin from the schema

Returns:

A tuple of the shape (TemplateCookingSuccess, ErrorMessage, CookingData)

async on_crash(schema_data: Any, data: Any) None#

Function that will be called when a plugin crash

Parameters:
  • schema_data – the data of the plugin from the schema

  • data – any random data we want to pass

on_mass_cook_template(success, message, data)#

Return the object that will automatically unsubscribe when destroyed.

on_progress(progress: float, message: str, result: bool)#

Set the progression of the plugin. Setting the attribute will fire self.__on_progress

set_global_progress(value: float)#

The value of the global progression of the validation

set_parent_schema(
schema: IBaseSchema,
)#

Set the schema

Parameters:

schema – the schema to set

show(value: bool, schema_data: Any)#

Called whenever the plugin is show or hidden in the UI.

subscribe_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_enable_validation(
callback: Callable[[bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

subscribe_global_progress(
callback: Callable[[float], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

subscribe_mass_build_queue_action_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_mass_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_mass_cook_template(
callback: Callable[[tuple[bool, str | None, Any]], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_on_validation_is_ready_to_run(
callback: Callable[[int, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

subscribe_progress(
callback: Callable[[float, str, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

subscribe_validator_run(
callback: Callable[[list[Base], ValidatorRunMode, bool | None], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

class omni.flux.validator.factory.plugins.plugin_base.ValidatorRunMode(value)#

An enumeration.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.resultor_base.ResultorBase#
pydantic model Data#
Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_resultor_message (str | None)

  • last_resultor_result (bool | None)

  • last_resultor_timing (float | None)

  • on_resultor_callback (collections.abc.Callable[[bool, str], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_resultor_result_callback » last_resultor_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_resultor_message: str | None = None#
field last_resultor_result: bool | None = None#
Validated by:
  • _fire_last_resultor_result_callback

field last_resultor_timing: float | None = None#
field on_resultor_callback: Callable[[bool, str], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async result(
schema_data: Data,
schema: BaseModel,
) tuple[bool, str]#

Function that will be called to work on the result

Parameters:
  • schema_data – the data from the schema.

  • schema – the whole schema ran by the manager

Returns:

True if the result passed, False if not. str: the message you want to show, like “Succeeded to write the result here”

Return type:

bool

subscribe_result(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.resultor_base.Schema#
Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:

Validators:

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.plugins.schema_base.BaseSchema#
Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:
  • _initialize_plugin_instance_and_check_flow » all fields

  • _parse_plugin_data » all fields

  • is_registered » name

field data: _IBase.Data [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field enabled: bool = True#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field name: str [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

  • is_registered

destroy()#
validator is_registered  »  name#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

property instance: BaseSchema | None#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.plugins.selector_base.Schema#
Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:

Validators:

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

class omni.flux.validator.factory.plugins.selector_base.SelectorBase#
pydantic model Data#
Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_select_data (Any | None)

  • last_select_message (str | None)

  • last_select_result (bool | None)

  • last_select_timing (float | None)

  • on_select_callback (collections.abc.Callable[[bool, str, Any], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_select_result_callback » last_select_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_select_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_select_message: str | None = None#
field last_select_result: bool | None = None#
Validated by:
  • _fire_last_select_result_callback

field last_select_timing: float | None = None#
field on_select_callback: Callable[[bool, str, Any], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async select(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to select the data

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the previous selector plugin

Returns:

True if the selector passed, False if not. str: the message you want to show, like “Succeeded to select this” any: data that you want to pass. Those data will be passed and used by the check(s) plugins. Like a list of USD prims.

Return type:

bool

subscribe_select(
callback: Callable[[bool, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.