Skip to content

Conversation

@muyr
Copy link
Contributor

@muyr muyr commented Jul 8, 2025

No description provided.

muyr and others added 30 commits August 17, 2023 19:11
zhuolyang and others added 19 commits April 27, 2025 11:35
- Add version-specific initialization for CompatStyle class
- Skip super().__init__() call for Python 3.11+ with PySide2 to prevent checkbox issues
- Maintain backward compatibility with Python 3.10 and earlier versions
- Fix table view checkbox becoming unresponsive after right-clicking on headers

This resolves compatibility issues between Python 3.11's stricter object
initialization and PySide2's C++ binding mechanism that was causing checkbox
controls to become non-functional in table views, specifically in Houdini 20.5
environment.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
- Add try/except block for qtpy.API import to handle older qtpy versions
- Fallback to environment variable QT_API for Maya 2022 compatibility
- Maintain functionality while ensuring compatibility with legacy environments

This resolves CI test failures in Maya 2022 environment where older qtpy
versions may not expose the API constant directly.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
- Change fail-fast from false to true in CI configuration
- Remove try/catch blocks in maya_test.py to expose real errors
- Add detailed debugging output for qtpy and dayu_widgets imports
- Add traceback printing for better error diagnosis
- Test both qtpy.API import and environment variable fallback

This is a debugging commit to identify the root cause of Maya compatibility
issues. Will revert exception handling after identifying the problem.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
- Restore fail-fast: false to allow other CI jobs to continue
- Add better Docker image pull error handling with fallback to existing images
- Simplify test script output with clear success/failure indicators
- Add --user root flag to avoid Docker permission issues
- Add basic container functionality test when main test fails
- Improve error messages and debugging information

Focus on debugging Maya 2024 test failure while keeping other tests running.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
- Add automatic installation of qtpy>=2.3.1 in Maya test script
- Add automatic installation of PySide2>=5.15.2.1 if not available
- Use subprocess.check_call to install dependencies before testing
- Resolve 'No module named qtpy' error in Maya Docker containers

This fixes the Maya test failures by ensuring required dependencies
are available in the Maya Docker environment before running tests.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
- Add Python version detection in Maya test script
- Use PySide6>=6.2.0 for Python 3.11+ (Maya 2025)
- Keep PySide2>=5.15.2.1 for Python 3.10 and below (Maya 2022-2024)
- Resolve PySide2 version compatibility issue with Python 3.11

Maya 2025 uses Python 3.11.4, but PySide2 5.15.2.1 only supports up to
Python 3.10. This change ensures the correct Qt binding is installed
based on the Python version in each Maya Docker container.

Signed-off-by: yangzhuo <zhuolyang@tencent.com>
@muyr muyr requested a review from loonghao July 8, 2025 09:43
from examples.demo import MDemo

# Start the application
with application() as app:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable 'app' is assigned to but never used


# Import the demo module
from examples.demo import MDemo

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

# Add the examples directory to the Python path
examples_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'examples')
sys.path.insert(0, os.path.dirname(examples_dir))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

from examples.demo import MDemo

# Start the application
with application() as app:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable 'app' is assigned to but never used


# Import the demo module
from examples.demo import MDemo

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

# Add the examples directory to the Python path
examples_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'examples')
sys.path.insert(0, os.path.dirname(examples_dir))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

else index.internalPointer()
)
selected = (
self.selectionModel().selectedRows() or
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

def get_obj_list(self):
"""
Get the list of objects.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

):
"""
Go to a specific path.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_menu_button_clicked(self, index, data_dict):
"""
Handle menu button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_button_clicked(self, index):
"""
Handle button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

class MDBPathButtons(QtWidgets.QFrame):
"""
Path buttons widget for navigation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def __init__(self, data_dict, parent=None):
"""
Initialize the base button.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

class MBaseButton(QtWidgets.QWidget):
"""
Base button widget for path navigation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Args:
path (str): File system path to parse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


"""
Parse file system path into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

else index.internalPointer()
)
selected = (
self.selectionModel().selectedRows() or
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

def get_obj_list(self):
"""
Get the list of objects.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

):
"""
Go to a specific path.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_menu_button_clicked(self, index, data_dict):
"""
Handle menu button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_button_clicked(self, index):
"""
Handle button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

class MDBPathButtons(QtWidgets.QFrame):
"""
Path buttons widget for navigation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def __init__(self, data_dict, parent=None):
"""
Initialize the base button.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

class MBaseButton(QtWidgets.QWidget):
"""
Base button widget for path navigation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Args:
path (str): File system path to parse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


"""
Parse file system path into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Args:
orm: Database ORM object that contains name, parent and tablename attributes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def parse_db_orm(orm):
"""
Parse database ORM object into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

and event.propertyName() == "dayu_text"
):
is_text_change = (
event.type() == QtCore.QEvent.DynamicPropertyChange and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
MLineTabWidget
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace


class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace


# Run the Docker container with better error handling
print("Running Docker container...")
print(f"Docker command: docker run --rm -v {docker_path}:/dayu_widgets -w /dayu_widgets mottosso/maya:{maya_version} mayapy maya_test_script.py")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (153 > 120 characters)

@@ -0,0 +1,234 @@
# Import built-in modules
import os
import sys
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'sys' imported but unused

"""
if THIS_ROOT not in sys.path:
sys.path.insert(0, str(THIS_ROOT))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


def setup_qt_test_env():
"""Setup environment for Qt testing.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

from nox_actions.test import test
from nox_actions.lint import lint, lint_fix
from nox_actions.maya_test import maya_test
from nox_actions.blender_test import blender_test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants