file_path stringlengths 32 153 | content stringlengths 0 3.14M |
|---|---|
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/utils.py | import random
import numpy as np
from pxr import Gf, Semantics
def add_semantics(prim, semantic_label, semantic_type="class"):
if not prim.HasAPI(Semantics.SemanticsAPI):
sem = Semantics.SemanticsAPI.Apply(prim, "Semantics")
sem.CreateSemanticTypeAttr()
sem.CreateSemanticDataAttr()
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/pipeline/test_renderproduct_camera.py | import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import omni.hydratexture
import omni.kit.test
from omni.syntheticdata import SyntheticData, SyntheticDataStage
# Test the instance mapping pipeline
class TestRenderProductCamera(omni.kit.test.AsyncTestCase):
def __init__(self, methodName: str) -> None:... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/pipeline/test_swh_frame_number.py | import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import omni.hydratexture
import omni.kit.test
from omni.syntheticdata import SyntheticData, SyntheticDataStage
# Test the Fabric frame number synchronization
class TestSWHFrameNumber(omni.kit.test.AsyncTestCase):
def __init__(self, methodName: str) -> None:
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/pipeline/test_instance_mapping.py | import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import omni.hydratexture
import omni.kit.test
from omni.syntheticdata import SyntheticData, SyntheticDataStage
# Test the instance mapping pipeline
class TestInstanceMapping(omni.kit.test.AsyncTestCase):
def __init__(self, methodName: str) -> None:
s... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/pipeline/test_instance_mapping_update.py | import carb
import os.path
from pxr import Gf, UsdGeom, UsdLux, Sdf
import omni.hydratexture
import omni.kit.test
from omni.syntheticdata import SyntheticData, SyntheticDataStage
from ..utils import add_semantics
# Test the instance mapping update Fabric flag
class TestInstanceMappingUpdate(omni.kit.test.AsyncTestC... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_motion_vector.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from PIL import Image
from time import time
from pathlib import Path
im... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_occlusion.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
from time import time
from pathlib import Path
import carb
import numpy as np
import u... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_renderproduct_camera.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import carb
from pxr import Gf, UsdGeom, Sdf, UsdLux
from omni.kit.viewport.utility import get_activ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_swh_frame_number.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import unittest
import omni.kit.test
from omni.... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_distance_to_image_plane.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_semantic_filter.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import unittest
import omni.kit.test
from omni.kit.viewport.utility import get_active_viewport
from ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_depth_linear.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_display_rendervar.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import unittest
import omni.kit.test
from omni.kit.viewport.utility import get_active_viewport
from ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_cross_correspondence.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from PIL import Image
from time import time
from pathlib import Path
imp... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/__init__.py | |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_stage_manipulation.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import carb
import random
from pxr import Gf, UsdGeom, UsdLux, Sdf
import unittest
import omni.kit.t... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_bbox3d.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import unittest
import uuid
import math
import shutil
import asyncio
from time import time
import ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_depth.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_semantic_seg.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
from pathlib import Path
import carb
import numpy... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_bbox2d_tight.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import unittest
import carb
import numpy as np
im... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_distance_to_camera.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
from time import time
from pathlib import Path
import carb
import numpy as np
import omni.kit.test... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_normals.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
from pathlib import Path
import carb
import numpy... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_rgb.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
from pathlib import Path
import unittest
from PIL i... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_rendervar_buff_host_ptr.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import unittest
import numpy as np
import ctypes
import omni.kit.test
from omni.gpu_foundation_factory import... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_bbox2d_loose.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import unittest
import carb
import numpy as np
im... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/sensors/test_instance_seg.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
from pathlib import Path
import unittest
import c... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/helpers/test_projection.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/helpers/test_instance_mapping.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/helpers/__init__.py | |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/helpers/test_bboxes.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import math
import asyncio
from time import time
import carb
import numpy as np
import omni.kit.te... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/visualize/test_warp_post_vis.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import unittest
import omni.kit.test
from omni.... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/visualize/test_post_vis.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import unittest
import omni.kit.test
from omni.... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/visualize/test_semantic_seg.py | # NOTE:
# omni.kit.test - std python's unittest module with additional wrapping to add suport for async/await tests
# For most things refer to unittest docs: https://docs.python.org/3/library/unittest.html
import os
import numpy as np
import omni.kit.test
from omni.kit.viewport.utility import get_active_viewport
f... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/graph/test_graph_manipulation.py | import carb
from pxr import Gf, UsdGeom, UsdLux, Sdf
import omni.hydratexture
import omni.kit.test
from omni.syntheticdata import SyntheticData, SyntheticDataStage
# Test the instance mapping pipeline
class TestGraphManipulation(omni.kit.test.AsyncTestCase):
def __init__(self, methodName: str) -> None:
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/OmniUe4-benchmark.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 2
double dopplerScale = 1
token enableDoppler = "off"
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
double speedOfSound = 340
}
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/torus_sphere.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (500, 500, 500)
double3 ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/BenchChair_Mini.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 2
double dopplerScale = 1
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
double speedOfSound = 340
}
dictionary cameraSettings = {
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/cube.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double radius = 500
double3 target = (0, 0, 0)
}
dictionary Perspective = {
double3 position = (188.15415084862954, 188.15415084863005, 188.1... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/occlusion.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 2
double dopplerScale = 1
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
double speedOfSound = 340
}
dictionary cameraSettings = {
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/can.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 2
double dopplerScale = 1
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
double speedOfSound = 340
}
dictionary cameraSettings = {
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/point_instancer_semantic_shapes.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (25.320213923059804, 25.32022525282619, ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/cube_full_occlusion.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (500, 500, 500)
double3 ... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/BenchChair_SceneInstance_Mini.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 2
double dopplerScale = 1
token enableDistanceDelay = "off"
token enableDoppler = "off"
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/cross_correspondence.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (500, 500, 499.99999999999983)
... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/maya2_atlas_road_tile_237_01.usd2.usda | #usda 1.0
(
defaultPrim = "atlas_road_tile_237_01_usd2"
upAxis = "Y"
)
def "atlas_road_tile_237_01_usd2" (
kind = "component"
)
{
def Xform "SceneNode" (
kind = "group"
)
{
def Xform "Tile_0_0Node" (
kind = "group"
)
{
def Xform "RoadsNode... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/occlusion_quadrant.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double radius = 270.1800438313185
double3 target = (0, 0, 0)
}
dictionary Perspective = {
double3 position = (-17.686258971514064, 52.5149695... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/scenes/scene_instance_test.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (485.64670945959244, 499.31261288765523,... |
omniverse-code/kit/exts/omni.syntheticdata/omni/syntheticdata/tests/data/golden/view_np_image.py | import os
import sys
import matplotlib.pyplot as plt
import numpy as np
image = np.load(sys.argv[1])["array"]
print(image.shape)
# np.savez_compressed(f"{os.path.splitext(sys.argv[1])[0]}.npz", array=image)
# image = (image - image.min()) / image.ptp()
plt.imshow(image)
plt.show()
|
omniverse-code/kit/exts/omni.syntheticdata/docs/index.rst | omni.syntheticdata
//////////////////////////#
Introduction
************
This extension provides both C++ and python bindings that allow users to extract ground truth data from scenes loaded
and rendered in Omniverse Kit and use it for DL/RL training purposes. Data can be accessed either in host memory or
directly on... |
omniverse-code/kit/exts/omni.usd.schema.audio/pxr/AudioSchema/__init__.py | #!/usr/bin/env python3
#
# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribut... |
omniverse-code/kit/exts/omni.usd.schema.audio/pxr/OmniAudioSchema/__init__.py | #
#====
# Copyright (c) 2019-2021, NVIDIA CORPORATION
#======
#
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Sectio... |
omniverse-code/kit/exts/omni.usd.schema.audio/pxr/OmniAudioSchema/_omniAudioSchema.pyi | from __future__ import annotations
import pxr.OmniAudioSchema._omniAudioSchema
import typing
import Boost.Python
import pxr.OmniAudioSchema
import pxr.Usd
import pxr.UsdGeom
__all__ = [
"Listener",
"OmniListener",
"OmniSound",
"Sound",
"Tokens"
]
class Listener(OmniListener, pxr.UsdGeom.Xformable... |
omniverse-code/kit/exts/omni.usd.schema.audio/plugins/OmniAudioSchema/resources/generatedSchema.usda | #usda 1.0
(
"WARNING: THIS FILE IS GENERATED BY usdGenSchema. DO NOT EDIT."
)
class OmniSound "OmniSound" (
doc = """\r
The Sound primitive defines the parameters for spatial or non-spatial\r
audio playback from an audio asset.\r
\r
The spatial effects are calculated based on the posit... |
omniverse-code/kit/exts/omni.usd.schema.audio/plugins/OmniAudioSchema/resources/OmniAudioSchema/schema.usda | #usda 1.0
(
subLayers = [
@usdGeom/schema.usda@
]
)
over "GLOBAL" (
customData = {
string libraryName = "omniAudioSchema"
string libraryPath = "./"
string libraryPrefix = "OmniAudioSchema"
}
)
{
}
# The descriptor for a sound asset that can play in the animation timeline
class OmniSou... |
omniverse-code/kit/exts/omni.rtx.ujitsoprocessors/omni/rtx/ujitsoprocessors/_ujitsoprocessors.pyi | """pybind11 omni.rtx.ujitsoprocessors bindings"""
from __future__ import annotations
import omni.rtx.ujitsoprocessors._ujitsoprocessors
import typing
__all__ = [
"IUJITSOProcessors",
"acquire_ujitsoprocessors_interface",
"release_ujitsoprocessors_interface"
]
class IUJITSOProcessors():
def runHTTPJob... |
omniverse-code/kit/exts/omni.rtx.ujitsoprocessors/omni/rtx/ujitsoprocessors/__init__.py | from ._ujitsoprocessors import *
|
omniverse-code/kit/exts/omni.rtx.ujitsoprocessors/omni/rtx/ujitsoprocessors/tests/__init__.py | from .test_ujitsoprocessors import *
|
omniverse-code/kit/exts/omni.rtx.ujitsoprocessors/omni/rtx/ujitsoprocessors/tests/test_ujitsoprocessors.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software a... |
omniverse-code/kit/exts/omni.kit.window.privacy/omni/kit/window/privacy/__init__.py | from .privacy_window import *
|
omniverse-code/kit/exts/omni.kit.window.privacy/omni/kit/window/privacy/privacy_window.py | import toml
import os
import asyncio
import weakref
import carb
import carb.settings
import carb.tokens
import omni.client
import omni.kit.app
import omni.kit.ui
import omni.ext
from omni import ui
WINDOW_NAME = "About"
class PrivacyWindow:
def __init__(self, privacy_file=None):
if not privacy_file:
... |
omniverse-code/kit/exts/omni.kit.window.privacy/omni/kit/window/privacy/tests/__init__.py | from .test_window_privacy import *
|
omniverse-code/kit/exts/omni.kit.window.privacy/omni/kit/window/privacy/tests/test_window_privacy.py | import tempfile
import toml
import omni.kit.test
import omni.kit.window.privacy
class TestPrivacyWindow(omni.kit.test.AsyncTestCase):
async def test_privacy(self):
with tempfile.TemporaryDirectory() as tmp_dir:
privacy_file = f"{tmp_dir}/privacy.toml"
def write_data(data):
... |
omniverse-code/kit/exts/omni.kit.window.privacy/docs/index.rst | omni.kit.window.privacy
###########################
.. toctree::
:maxdepth: 1
CHANGELOG
|
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/ext_utils.py | from __future__ import annotations
from collections import defaultdict
from contextlib import suppress
from types import ModuleType
from typing import Dict, Tuple
import fnmatch
import sys
import unittest
import carb
import omni.kit.app
from .unittests import get_tests_to_remove_from_modules
# Type for collecting m... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/ext_test_generator.py | # WARNING: This file/interface is likely to be removed after transition from Legacy Viewport is complete.
# Seee merge_requests/17255
__all__ = ["get_tests_to_run"]
# Rewrite a Legacy Viewport test to launch with Viewport backend only
def _get_viewport_next_test_config(test):
# Check for flag to run test only on... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/teamcity.py | import os
import sys
import time
import pathlib
from functools import lru_cache
_quote = {"'": "|'", "|": "||", "\n": "|n", "\r": "|r", "[": "|[", "]": "|]"}
def escape_value(value):
return "".join(_quote.get(x, x) for x in value)
@lru_cache()
def is_running_in_teamcity():
return bool(os.getenv("TEAMCITY_... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/repo_test_context.py | import json
import logging
import os
logger = logging.getLogger(__name__)
class RepoTestContext: # pragma: no cover
def __init__(self):
self.context = None
repo_test_context_file = os.environ.get("REPO_TEST_CONTEXT", None)
if repo_test_context_file and os.path.exists(repo_test_context_f... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/nvdf.py | import itertools
import json
import logging
import os
import re
import sys
import time
import urllib.error
import urllib.request
from collections import defaultdict
from functools import lru_cache
from pathlib import Path
from typing import Dict, List, Tuple
import carb.settings
import omni.kit.app
from .gitlab impor... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/__init__.py | import asyncio
import omni.kit.app
import omni.ext
from .async_unittest import AsyncTestCase
from .async_unittest import AsyncTestCaseFailOnLogError
from .async_unittest import AsyncTestSuite
from .utils import get_setting, get_global_test_output_path, get_test_output_path
from .ext_utils import decompose_test_list
fr... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/sampling.py | import datetime
import logging
import random
from statistics import mean
from .nvdf import get_app_info, query_nvdf
from .utils import clamp, get_setting, is_running_on_ci
logger = logging.getLogger(__name__)
class SamplingFactor:
LOWER_BOUND = 0.0
UPPER_BOUND = 1.0
MID_POINT = 0.5
class Sampling:
... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/test_populators.py | """Support for the population of a test list from various configurable sources"""
from __future__ import annotations
import abc
import unittest
from .ext_utils import find_disabled_tests
from .unittests import get_tests
__all__ = [
"DEFAULT_POPULATOR_NAME",
"TestPopulator",
"TestPopulateAll",
"TestPo... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/crash_process.py | def _error(stream, msg):
stream.write(f"[error] [{__file__}] {msg}\n")
def _crash_process_win(pid):
# fmt: off
import ctypes
POINTER = ctypes.POINTER
LPVOID = ctypes.c_void_p
PVOID = LPVOID
HANDLE = LPVOID
PHANDLE = ... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/utils.py | import glob
import hashlib
import os
import shutil
import sys
from datetime import datetime
from functools import lru_cache
from pathlib import Path
from typing import List, Tuple
import carb
import carb.settings
import carb.tokens
import omni.ext
from .gitlab import is_running_in_gitlab
from .teamcity import is_runn... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/test_reporters.py | from enum import Enum
from typing import Callable, Any
class TestRunStatus(Enum):
UNKNOWN = 0
RUNNING = 1
PASSED = 2
FAILED = 3
_callbacks = []
def add_test_status_report_cb(callback: Callable[[str, TestRunStatus, Any], None]):
"""Add callback to be called when tests start, fail, pass."""
... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/async_unittest.py | """Async version of python unittest module.
AsyncTestCase, AsyncTestSuite and AsyncTextTestRunner classes were copied from python unittest source and async/await
keywords were added.
There are two ways of registering tests, which must all be in the 'tests' submodule of your python module.
1. 'from X import *" fr... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/reporter.py | import fnmatch
import glob
import json
import os
import platform
import shutil
import sys
import time
import xml.etree.ElementTree as ET
from collections import defaultdict
from dataclasses import dataclass
from datetime import datetime
from enum import Enum
from functools import lru_cache
from pathlib import Path
from... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/test_coverage.py | import os
import shutil
from datetime import datetime
from functools import lru_cache
from pathlib import Path
import carb.settings
import coverage
import omni.kit.app
from .teamcity import teamcity_publish_artifact
from .utils import get_global_test_output_path, get_setting
# For Coverage.py to be able to combine d... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/flaky.py | import datetime
import logging
import os
from collections import defaultdict
import carb
from .utils import get_test_output_path
from .nvdf import get_app_info, query_nvdf
logger = logging.getLogger(__name__)
FLAKY_TESTS_QUERY_DAYS = 30
class FlakyTestAnalyzer:
"""Basic Flaky Tests Analyzer"""
AGG_TEST_I... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/unittests.py | import asyncio
import fnmatch
import os
import random
import sys
import traceback
import unittest
from contextlib import suppress
from glob import glob
from importlib import import_module
from itertools import islice
from os.path import basename, dirname, isfile, join, splitext
from types import ModuleType
from typing ... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/exttests.py | from __future__ import annotations
import asyncio
import fnmatch
import io
import multiprocessing
import os
import pprint
import random
import re
import subprocess
import sys
import time
from collections import defaultdict
from enum import IntEnum
from typing import Dict, List, Set, Tuple
import carb.dictionary
impor... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/code_change_analyzer.py | import json
import os
import omni.kit.app
import logging
from typing import List
from .repo_test_context import RepoTestContext
from .utils import sha1_path, sha1_list, get_global_test_output_path
logger = logging.getLogger(__name__)
KNOWN_EXT_SOURCE_PATH = ["kit/source/extensions/", "source/extensions/"]
# We ... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/gitlab.py | import os
from functools import lru_cache
# GitLab CI/CD variables :
# https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
@lru_cache()
def is_running_in_gitlab():
return bool(os.getenv("GITLAB_CI"))
@lru_cache()
def get_gitlab_build_url() -> str:
return os.getenv("CI_PIPELINE_URL") or ""
|
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/test_reporter.py | from pathlib import Path
import omni.kit.test
from ..reporter import _calculate_durations, _load_report_data, _load_coverage_results, _generate_html_report
CURRENT_PATH = Path(__file__).parent
DATA_TESTS_PATH = CURRENT_PATH.parent.parent.parent.parent.joinpath("data/tests")
class TestReporter(omni.kit.test.AsyncTe... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/test_kit_test.py | import unittest
import carb
import omni.kit.app
import omni.kit.test
# uncomment for dev work
# import unittest
class TestKitTest(omni.kit.test.AsyncTestCase):
async def test_test_settings(self):
# See [[test]] section
carb.log_error("This message will not fail the test because it is excluded in... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/test_nvdf.py | import omni.kit.test
from ..nvdf import remove_nvdf_form, to_nvdf_form
class TestNVDF(omni.kit.test.AsyncTestCase):
async def test_convert_basic_types(self):
d = {
"some_boolean": True,
"some_int": -123,
"some_float": 0.001,
"array_of_string": ["a", "b"],
... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/__init__.py | from .test_kit_test import *
from .test_lookups import *
from .test_nvdf import *
from .test_reporter import *
from .test_sampling import *
|
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/test_lookups.py | """Test the functionality used by the test runner."""
import omni.kit.app
import omni.kit.test
class TestLookups(omni.kit.test.AsyncTestCase):
async def test_lookups(self):
"""Oddly self-referencing test that uses the test runner test lookup utility to confirm that the utility
finds this test.
... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/test/tests/test_sampling.py | import urllib.error
from contextlib import suppress
import omni.kit.test
from ..nvdf import get_app_info
from ..sampling import Sampling
class TestSampling(omni.kit.test.AsyncTestCase):
def setUp(self):
self.sampling = Sampling(get_app_info())
self.unittests = ["test_one", "test_two", "test_thre... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/omni_test_registry/__init__.py | __copyright__ = " Copyright (c) 2022-2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribut... |
omniverse-code/kit/exts/omni.kit.test/omni/kit/omni_test_registry/omni_test_registry.py | def omni_test_registry(*args, **kwargs):
"""
The decorator for Python tests.
NOTE: currently passing in the test uuid as a kwarg 'guid'
"""
def decorator(func):
func.guid = kwargs.get("guid", None)
return func
return decorator
|
omniverse-code/kit/exts/omni.kit.test/docs/omni_test_registry.rst | :orphan:
.. _omni.kit.omni_test_registry:
omni.kit.omni_test_registry
###########################
This extension pulls in the `repo_test GUID decorator <https://gitlab-master.nvidia.com/omniverse/repo/repo_test/-/tree/main/omni/repo/test/guid>` via the `omniverse_test packman package <http://packman.ov.nvidia.com/pa... |
omniverse-code/kit/exts/omni.kit.test/docs/index.rst | omni.kit.test
###########################
Python asyncio-centric testing system.
To create a test derive from :class:`omni.kit.test.AsyncTestCase` and add a method that starts with ``test_``, like in :mod:`unittest`. Method can be either async or regular one.
.. code:: python
import omni.kit.test
class MyT... |
omniverse-code/kit/exts/omni.kit.test_suite.menu/PACKAGE-LICENSES/omni.kit.test_suite.menu-LICENSE.md | Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docume... |
omniverse-code/kit/exts/omni.kit.test_suite.menu/config/extension.toml | [package]
# Semantic Versioning is used: https://semver.org/
version = "1.0.1"
category = "Internal"
# Lists people or organizations that are considered the "authors" of the package.
authors = ["NVIDIA"]
# The title and description fields are primarily for displaying extension info in UI
title = "omni.kit.test_suit... |
omniverse-code/kit/exts/omni.kit.test_suite.menu/omni/kit/test_suite/menu/__init__.py | from .scripts import *
|
omniverse-code/kit/exts/omni.kit.test_suite.menu/omni/kit/test_suite/menu/scripts/__init__.py | |
omniverse-code/kit/exts/omni.kit.test_suite.menu/omni/kit/test_suite/menu/tests/__init__.py | from .context_menu_bind_material_listview import *
|
omniverse-code/kit/exts/omni.kit.test_suite.menu/omni/kit/test_suite/menu/tests/context_menu_bind_material_listview.py | ## Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software a... |
omniverse-code/kit/exts/omni.kit.test_suite.menu/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.1] - 2022-07-25
### Changes
- Refactored unittests to make use of content_browser test helpers
## [1.0.0] - 2022-02-09
### Changes
- Created
|
omniverse-code/kit/exts/omni.kit.test_suite.menu/docs/README.md | # omni.kit.test_suite.menu
## omni.kit.test_suite.menu
Test Suite
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.