-
Notifications
You must be signed in to change notification settings - Fork 102
dayu_widget3 update #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
dayu_widget3 update #117
Conversation
fix: test ci
fix: test ci
feat: compatible pyside6
- 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>
| from examples.demo import MDemo | ||
|
|
||
| # Start the application | ||
| with application() as app: |
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
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)) | ||
|
|
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
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)) | ||
|
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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 | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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 | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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 | ||
There was a problem hiding this comment.
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. | ||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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""" | ||
| """ |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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)) | ||
|
|
There was a problem hiding this comment.
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. | ||
|
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
No description provided.