Refactor Runner & printer and added support for pytest#5
Merged
malto101 merged 4 commits intomozarkai:mainfrom Apr 4, 2025
malto101:feature/main/pytest
Merged
Refactor Runner & printer and added support for pytest#5malto101 merged 4 commits intomozarkai:mainfrom malto101:feature/main/pytest
malto101 merged 4 commits intomozarkai:mainfrom
malto101:feature/main/pytest
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the existing Runner and Printer implementations and integrates support for pytest, while also converting several configuration and factory components to leverage Pydantic models for improved type safety and clarity. Key changes include:
- Removal of legacy test code from the runner test file and consolidation of live logging into the new printers module.
- Conversion of configuration structures in optics_builder, driver_factory, elementsource_factory, and config_handler to use Pydantic models.
- Updates to API endpoint schemas and execution logic to incorporate the new pytest runner and enhanced parameter typing.
Reviewed Changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| optics_framework/common/runner/test.py | Removed legacy live demonstration test code. |
| optics_framework/common/runner/printers.py | New implementation of result printer using Rich and Pydantic integration. |
| optics_framework/common/runner/csv_reader.py | Updated type hints and added a null-check for dictionary keys. |
| optics_framework/common/optics_builder.py | Refactored configuration handling using a dedicated Pydantic model. |
| optics_framework/common/logging_config.py | Enhanced logging configuration to utilize Pydantic Config definitions. |
| optics_framework/common/execution.py | Integrated PytestRunner support and consolidated execution parameters. |
| ... (other files updated similarly) | Numerous type annotations and Pydantic-based refactoring across the codebase. |
Comments suppressed due to low confidence (1)
optics_framework/common/runner/csv_reader.py:137
- The newly added 'if key is not None' check should be reviewed to ensure it is necessary. If dictionary keys are always defined by design, this extra check could hide data quality issues or be redundant; consider documenting its purpose for clarity.
if key is not None # Add this check
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: should be merged after selenium PR