Skip to content

Comments

Vibeコーディングによるリポジトリの大幅回収#1

Open
yohawing wants to merge 12 commits intomasterfrom
feature/vibe
Open

Vibeコーディングによるリポジトリの大幅回収#1
yohawing wants to merge 12 commits intomasterfrom
feature/vibe

Conversation

@yohawing
Copy link
Owner

This pull request introduces several key changes to the YWTA Tools project, focusing on configuration management, project rules, and file organization. The most significant updates include the implementation of a robust configuration system, documentation of project rules and coding standards, and the addition of ignore rules for development-related files. Below is a structured summary of the most important changes:

Configuration System Enhancements:

  • maya/ywta/config/__init__.py: Introduced the configuration system module, including BaseConfig, ConfigError, ValidationError, SettingsManager, and ConfigSchema to manage environment variables, configuration files, and default values.
  • maya/ywta/config/base_config.py: Implemented the BaseConfig class and ConfigValue class to provide type-safe configuration management, validation, and support for environment variables and JSON configuration files.
  • maya/ywta/config/config_schema.py: Added ConfigSchema for defining validation rules and constraints for configuration values, including type constraints, range constraints, and path validation.

Project Rules Documentation:

  • .clinerules/project_summery.md: Documented project rules, coding standards, file structure, and development guidelines for Maya and Blender tools, emphasizing maintainability, PEP 8 compliance, and structured module organization.

Sprint-Specific Development Rules:

  • .clinerules/current-sprint.md: Added detailed development rules for the current sprint, including tasks for improving settings management, dependency clarity, error handling, plugin architecture, and test coverage.

File Ignore Rules:

  • .clineignore: Added ignore rules for compiled files, build directories, third-party libraries, IDE settings, temporary files, and large binary files to streamline version control.

Copilot AI review requested due to automatic review settings June 13, 2025 23:51

This comment was marked as outdated.

yohawing added 6 commits June 14, 2025 08:53
- Introduced `node_utils.py` for common node operations in Maya, including shape retrieval and distance calculations.
- Created `settings_utils.py` to manage user settings with QSettings, including functions for saving, loading, and resetting settings.
- Added `ui_utils.py` for UI-related utilities, including a base tree node class and singleton window mixin.
- Updated `__init__.py` files across various modules to declare dependencies.
- Refactored `shortcuts.py` to deprecate old functions and encourage direct imports from the new utility modules.
- Implemented tests for the new settings system to ensure functionality and compatibility.
- Removed the existing menu.py file and split its functionality into multiple modules for better organization and maintainability.
- Created a new core.py file to handle core menu functionalities such as creating and deleting the YWTA menu.
- Introduced separate modules for different menu categories: menu_animation.py, menu_mesh.py, menu_rigging.py, menu_deform.py, and menu_utility.py.
- Updated the create_menu function to call the new category-specific menu creation functions.
- Added annotations and improved documentation for better clarity.
- Removed the simple_unity_exporter.py script as it was deemed unnecessary.
- Updated import statements across various files to reflect the new module structure.
- Introduced common modules for testing across platforms (Maya, Blender).
- Created `BaseTestCase` for shared test functionalities.
- Implemented `TestSettings` for managing test configurations.
- Developed `MayaTestCase` for Maya-specific testing functionalities.
- Added sample unit tests for Maya environment.
- Created scripts for running tests in Blender and Maya environments.
- Established utility functions for test discovery and execution.
- Updated README.md to simplify test execution instructions and removed specific environment examples.
- Enhanced maya_test_case.py to initialize Maya in standalone mode for better test isolation.
- Added unit tests for blendshape functionality in a new test_blendshape.py file.
- Introduced a new test_config.py file to validate the new configuration system.
- Removed outdated sample tests from test_sample.py.
- Created skeleton tests in test_skeleton.py to validate skeleton data handling.
- Refined run_maya_tests.py to streamline test execution and improve error handling.
- Deleted run_maya_tests_in_ywta.py as it was redundant.
- Updated run_tests.py to integrate Maya test execution directly.
- Adjusted test_runner.py to provide clearer instructions for running Maya tests.
@yohawing yohawing requested a review from Copilot June 16, 2025 01:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes and documents the YWTA Tools repository by introducing a typed configuration system, refining core module imports, and adding comprehensive project rules and ignore rules.

  • Implemented a robust configuration system (config/): base classes, schema validation, defaults, and environment overrides
  • Reorganized core utilities under ywta.core with new README documentation
  • Added project and sprint documentation (.clinerules/) and streamlined version control with .clineignore

Reviewed Changes

Copilot reviewed 78 out of 78 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
maya/ywta/core/init.py Centralize core utility imports (uses wildcard imports)
maya/ywta/config/config_schema.py Add validation schema with dummy validator pattern
maya/ywta/config/base_config.py BaseConfig implementation with inconsistent validator logic
maya/ywta/init.py Update initialization function and imports indentation
.clineignore Add ignore rules for build artifacts and temp files
Comments suppressed due to low confidence (1)

maya/ywta/init.py:2

  • The import should be indented under def initialize():. Ensure import ywta.menu is inside the function body to match intended initialization flow and avoid top-level side effects.
import ywta.menu

Comment on lines +13 to +18
from ywta.core.maya_utils import *
from ywta.core.node_utils import *
from ywta.core.namespace_utils import *
from ywta.core.ui_utils import *
from ywta.core.settings_utils import *
from ywta.core.geometry_utils import *
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Avoid using wildcard imports in __init__.py. Explicitly import only the symbols you need or define __all__ in each submodule to keep namespace clean and improve readability.

Suggested change
from ywta.core.maya_utils import *
from ywta.core.node_utils import *
from ywta.core.namespace_utils import *
from ywta.core.ui_utils import *
from ywta.core.settings_utils import *
from ywta.core.geometry_utils import *
from ywta.core.maya_utils import MayaUtilityClass, maya_function1, maya_function2
from ywta.core.node_utils import NodeUtilityClass, node_function1, node_function2
from ywta.core.namespace_utils import NamespaceUtilityClass, namespace_function1, namespace_function2
from ywta.core.ui_utils import UIUtilityClass, ui_function1, ui_function2
from ywta.core.settings_utils import SettingsUtilityClass, settings_function1, settings_function2
from ywta.core.geometry_utils import GeometryUtilityClass, geometry_function1, geometry_function2

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +61
self.add_validator(key, lambda v: True, "") # ダミー
if key not in self.validators:
self.validators[key] = []
self.validators[key][-1] = range_validator
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The dummy validator insertion is confusing. Instead of adding and then replacing a placeholder, directly append the specific range_validator to self.validators[key] for clarity.

Suggested change
self.add_validator(key, lambda v: True, "") # ダミー
if key not in self.validators:
self.validators[key] = []
self.validators[key][-1] = range_validator
if key not in self.validators:
self.validators[key] = []
self.validators[key].append(range_validator)

Copilot uses AI. Check for mistakes.
Comment on lines +101 to +102
if not self.validator(value):
raise ValidationError(f"Validation failed for {self.key}: {value}")
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

The set method treats a None return from validator as failure. Validators currently raise exceptions rather than return booleans, so this check always fails. Wrap the call in try/except or adjust the API to expect boolean returns.

Suggested change
if not self.validator(value):
raise ValidationError(f"Validation failed for {self.key}: {value}")
try:
self.validator(value)
except Exception as e:
raise ValidationError(f"Validation failed for {self.key}: {value}. Error: {e}")

Copilot uses AI. Check for mistakes.
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.

1 participant