Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR integrates Pydantic models to improve configuration handling and type safety across the framework while adding support for the Selenium driver. It also refactors various modules (runner, logging, factories, APIs, etc.) with enhanced type annotations and clearer error handling.
- Introduces Pydantic-based configuration models and updates existing data structures.
- Refactors several modules for improved readability and consistency (e.g., logging, API endpoints, factories).
- Adds support for Selenium driver and adjusts dependency mappings and session creation accordingly.
Reviewed Changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| optics_framework/common/runner/test_runnner.py | Switches TypedDicts to Pydantic models and adapts diff access accordingly. |
| optics_framework/common/runner/test.py | Removes an outdated test file. |
| optics_framework/common/runner/keyword_register.py | Adds explicit type annotations to the registry methods. |
| optics_framework/common/runner/csv_reader.py | Incorporates Optional file path and additional checks in iterable parsing. |
| optics_framework/common/optics_builder.py | Migrates driver and detection configurations to a new Pydantic configuration model. |
| optics_framework/common/logging_config.py | Updates log formatting and handler initializations using config fields. |
| optics_framework/common/image_interface.py | Updates documentation and type signatures for the image detection interface. |
| optics_framework/common/image_factory.py | Renames methods and switches discovery to use a Pydantic configuration model. |
| optics_framework/common/expose_api.py | Refactors API endpoints and transforms session configuration to align with Config. |
| optics_framework/common/execution.py | Revises execution parameter models and improves result status checks. |
| optics_framework/common/elementsource_interface.py | Updates type hints and docstrings for element source methods. |
| optics_framework/common/elementsource_factory.py | Integrates Pydantic-based configuration for element sources. |
| optics_framework/common/driver_factory.py | Integrates Pydantic-based configuration for driver discovery and instantiation. |
| optics_framework/common/config_handler.py | Switches from dataclasses to Pydantic models and uses model_dump for YAML output. |
| optics_framework/common/base_factory.py | Introduces a Pydantic-based FactoryState for module discovery and caching. |
| optics_framework/api/verifier.py | Improves type annotations and streamlines docstrings for verification functions. |
| optics_framework/api/flow_control.py | Introduces explicit runner checks and adds type annotations to flow control methods. |
| optics_framework/api/app_management.py | Updates method signatures and error logging for application management. |
| optics_framework/api/action_keyword.py | Adds type hints and refines decorators and method signatures for action keywords. |
Comments suppressed due to low confidence (1)
optics_framework/common/runner/csv_reader.py:137
- [nitpick] The explicit check 'if key is not None' may be redundant since CSV header keys are typically strings. Verify whether this check is necessary or if it can be removed.
if key is not None # Add this check
| "elements_sources": [{"name": DependencyConfig(enabled=True)} for name in config.elements_sources], | ||
| "text_detection": [{"name": DependencyConfig(enabled=True)} for name in config.text_detection], | ||
| "image_detection": [{"name": DependencyConfig(enabled=True)} for name in config.image_detection], | ||
| "project_path": config.project_path |
There was a problem hiding this comment.
The session configuration mapping references 'config.project_path' although the SessionConfig model does not define a 'project_path' field. Please consider adding this field to SessionConfig or updating the mapping accordingly.
19d3a2a to
a6fb71c
Compare
sheshnath1st
pushed a commit
to sheshnath1st/optics-framework
that referenced
this pull request
Jan 12, 2026
# This is the 1st commit message: test(playwright): add unit test for app launch # This is the commit message mozarkai#2: test(playwright): verify youtube search box is clickable # This is the commit message mozarkai#3: test(playwright): verify youtube search box click with delay # This is the commit message mozarkai#4: test(playwright): change config sample # This is the commit message mozarkai#5: test(playwright): add youtube search box click and sleep test # This is the commit message mozarkai#6: test(playwright): add comprehensive framework feature coverage launch_app , add_and_get_element , clear_element_text , _flow , validation_methods , get_text
sheshnath1st
pushed a commit
to sheshnath1st/optics-framework
that referenced
this pull request
Jan 12, 2026
# This is the 1st commit message: refactor: centralize retry logic to remove duplication # This is the commit message mozarkai#2: refactor: centralize locator resolve+exists to eliminate duplication # This is the commit message mozarkai#3: refactor: collapse retry logic to single loop to eliminate duplication # This is the commit message mozarkai#4: refactor: remove duplicated assertion retry logic # This is the commit message mozarkai#5: refactor: remove duplicated percentage using method about # This is the commit message mozarkai#6: refactor: remove duplicated percentage using method about # This is the commit message mozarkai#7: refactor: remove duplicated percentage using method about # This is the commit message mozarkai#8: refactor: remove duplicated percentage using method about
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: merge this after merging pydantic integration