lightspeed.trex.packaging.core#
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
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 lightspeed.trex.packaging.core.ModPackagingSchema#
Show JSON schema
{ "title": "ModPackagingSchema", "type": "object", "properties": { "context_name": { "description": "The context name to use for the packaging stage. Should be a unique context name.", "title": "Context Name", "type": "string" }, "mod_layer_paths": { "description": "The mod layer paths should be ordered by opinion strength where the strongest layer is first. All mod layers found in a given project should be in found in the list, including external mod dependencies", "items": { "format": "path", "type": "string" }, "title": "Mod Layer Paths", "type": "array" }, "selected_layer_paths": { "description": "A list of layers to package. Must at least contain the strongest mod layer found in `mod_layer_paths` or the packaging process will quick return.", "items": { "format": "path", "type": "string" }, "title": "Selected Layer Paths", "type": "array" }, "output_directory": { "description": "The directory where the packaged mod should be stored.\n\nWARNING: The directory will be emptied prior to packaging the mod.", "format": "path", "title": "Output Directory", "type": "string" }, "redirect_external_dependencies": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether the reference dependencies taken from external mods should be redirected or copied in this mod's package during the packaging process.\n\n- Redirecting will allow the mod to use the installed mod's dependencies so updating a dependency will be as simple as to install the updated dependency.\n- Copying will make sure the mod is completely standalone so no other mods need to be installed for this mod to be loaded successfully.", "title": "Redirect External Dependencies" }, "mod_name": { "description": "The display name used for the mod in the RTX Remix Runtime.", "title": "Mod Name", "type": "string" }, "mod_version": { "description": "The mod version. Used when building dependency lists.", "title": "Mod Version", "type": "string" }, "mod_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional text used to describe the mod in more details.", "title": "Mod Details" }, "ignored_errors": { "anyOf": [ { "items": { "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "string" }, { "type": "string" }, { "type": "string" } ], "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of errors to ignore when packaging the mod.", "title": "Ignored Errors" } }, "required": [ "context_name", "mod_layer_paths", "selected_layer_paths", "output_directory", "mod_name", "mod_version" ] }
- Fields:
context_name (str)ignored_errors (List[Tuple[str, str, str]] | None)mod_details (str | None)mod_layer_paths (List[pathlib.Path])mod_name (str)mod_version (str)output_directory (pathlib.Path)redirect_external_dependencies (bool | None)selected_layer_paths (List[pathlib.Path])
- Validators:
at_least_one»mod_layer_pathsis_mod_file_valid»mod_layer_pathsis_not_empty»mod_nameis_not_empty»output_directoryis_valid_version»mod_versionlayer_exists»selected_layer_paths
- field context_name: str [Required]#
The context name to use for the packaging stage. Should be a unique context name.
- field ignored_errors: List[Tuple[str, str, str]] | None = None#
A list of errors to ignore when packaging the mod.
- field mod_details: str | None = None#
Optional text used to describe the mod in more details.
- field mod_layer_paths: List[Path] [Required]#
The mod layer paths should be ordered by opinion strength where the strongest layer is first. All mod layers found in a given project should be in found in the list, including external mod dependencies
- Validated by:
at_least_oneis_mod_file_valid
- field mod_name: str [Required]#
The display name used for the mod in the RTX Remix Runtime.
- Validated by:
is_not_empty
- field mod_version: str [Required]#
The mod version. Used when building dependency lists.
- Validated by:
is_valid_version
- field output_directory: Path [Required]#
The directory where the packaged mod should be stored.
WARNING: The directory will be emptied prior to packaging the mod.
- Validated by:
is_not_empty
- field redirect_external_dependencies: bool | None = True#
Whether the reference dependencies taken from external mods should be redirected or copied in this mod’s package during the packaging process.
Redirecting will allow the mod to use the installed mod’s dependencies so updating a dependency will be as simple as to install the updated dependency.
Copying will make sure the mod is completely standalone so no other mods need to be installed for this mod to be loaded successfully.
- field selected_layer_paths: List[Path] [Required]#
A list of layers to package. Must at least contain the strongest mod layer found in mod_layer_paths or the packaging process will quick return.
- Validated by:
layer_exists
- validator at_least_one » mod_layer_paths#
Check that at least 1 mod file was selected
- validator is_mod_file_valid » mod_layer_paths#
Check that the file is a valid mod file
- validator is_not_empty » mod_name, output_directory#
Check that the mod name is not empty
- validator is_valid_version » mod_version#
Check that the mod version has a valid format
- validator layer_exists » selected_layer_paths#
Check that every selected layer file exists