Skip to content

Commit

Permalink
Make sure to use correct black version in genStubs
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Feb 13, 2024
1 parent de2e3be commit 9cd8a83
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ class ICesiumOmniverseCppTestsInterface:
def run_all_tests(self) -> None: ...
def set_up_tests(self, arg0: int) -> None: ...

def acquire_cesium_omniverse_tests_interface(plugin_name: str = ..., library_path: str = ...) -> ICesiumOmniverseCppTestsInterface: ...
def acquire_cesium_omniverse_tests_interface(
plugin_name: str = ..., library_path: str = ...
) -> ICesiumOmniverseCppTestsInterface: ...
def release_cesium_omniverse_tests_interface(arg0: ICesiumOmniverseCppTestsInterface) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ICesiumOmniverseInterface:
def credits_start_next_frame(self) -> None: ...
def get_asset_token_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_asset_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_credits(self) -> List[Tuple[str,bool]]: ...
def get_credits(self) -> List[Tuple[str, bool]]: ...
def get_default_token_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_render_statistics(self, *args, **kwargs) -> Any: ...
def get_server_path(self) -> str: ...
Expand Down Expand Up @@ -174,5 +174,7 @@ class Viewport:
width: float
def __init__(self) -> None: ...

def acquire_cesium_omniverse_interface(plugin_name: str = ..., library_path: str = ...) -> ICesiumOmniverseInterface: ...
def acquire_cesium_omniverse_interface(
plugin_name: str = ..., library_path: str = ...
) -> ICesiumOmniverseInterface: ...
def release_cesium_omniverse_interface(arg0: ICesiumOmniverseInterface) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ from typing import Any, ClassVar
import Boost.Python
import pxr.Usd
import pxr.UsdGeom

__MFB_FULL_PACKAGE_NAME: str

class Data(pxr.Usd.Typed):
Expand Down
10 changes: 5 additions & 5 deletions genStubs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ set CESIUM_TESTS_STUB_PATH=%PROJECT_ROOT%\exts\cesium.omniverse.cpp.tests\cesium

set PYTHONPATH=%NVIDIA_USD_PYTHON_LIBS%;%PYTHONPATH%

echo "Ensuring mypy is installed"
%NVIDIA_PYTHON_EXECUTABLE% -m pip install mypy==1.6.1
echo "Ensuring mypy and black are installed"
%NVIDIA_PYTHON_EXECUTABLE% -m pip install mypy==1.6.1 black==23.1.0

echo "Building lib files flat in temp dir"
cmake -B build-stubs
Expand All @@ -45,9 +45,9 @@ copy out\_CesiumUsdSchemas.pyi %CESIUM_USD_STUB_PATH%
copy out\CesiumOmniverseCppTestsPythonBindings.pyi %CESIUM_TESTS_STUB_PATH%

echo "Formatting stubs"
black %CESIUM_OMNI_STUB_PATH%
black %CESIUM_USD_STUB_PATH%
black %CESIUM_TESTS_STUB_PATH%
%NVIDIA_PYTHON_EXECUTABLE% -m black %CESIUM_OMNI_STUB_PATH%
%NVIDIA_PYTHON_EXECUTABLE% -m black %CESIUM_USD_STUB_PATH%
%NVIDIA_PYTHON_EXECUTABLE% -m black %CESIUM_TESTS_STUB_PATH%

echo "Cleaning up temp dir"
cd %PROJECT_ROOT%
Expand Down
10 changes: 5 additions & 5 deletions genStubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ CESIUM_TESTS_STUB_PATH="$PROJECT_ROOT/exts/cesium.omniverse.cpp.tests/cesium/omn

export PYTHONPATH="$NVIDIA_USD_PYTHON_LIBS:$PYTHONPATH"

echo "Ensuring mypy is installed"
$NVIDIA_PYTHON_EXECUTABLE -m pip install mypy==1.6.1
echo "Ensuring mypy and black are installed"
$NVIDIA_PYTHON_EXECUTABLE -m pip install mypy==1.6.1 black==23.1.0

echo "Building lib files flat in temp dir"
cmake -B build
Expand All @@ -45,9 +45,9 @@ cp "out/_CesiumUsdSchemas.pyi" $CESIUM_USD_STUB_PATH
cp "out/CesiumOmniverseCppTestsPythonBindings.pyi" $CESIUM_TESTS_STUB_PATH

echo "Formatting stubs"
black $CESIUM_OMNI_STUB_PATH
black $CESIUM_USD_STUB_PATH
black $CESIUM_TESTS_STUB_PATH
$NVIDIA_PYTHON_EXECUTABLE -m black $CESIUM_OMNI_STUB_PATH
$NVIDIA_PYTHON_EXECUTABLE -m black $CESIUM_USD_STUB_PATH
$NVIDIA_PYTHON_EXECUTABLE -m black $CESIUM_TESTS_STUB_PATH

echo "Cleaning up temp dir"
rm -rf $FLAT_LIBRARIES_DIR

0 comments on commit 9cd8a83

Please sign in to comment.