Skip to content

Refactor Runner & printer and added support for pytest#5

Merged
malto101 merged 4 commits intomozarkai:mainfrom
malto101:feature/main/pytest
Apr 4, 2025
Merged

Refactor Runner & printer and added support for pytest#5
malto101 merged 4 commits intomozarkai:mainfrom
malto101:feature/main/pytest

Conversation

@malto101
Copy link
Member

@malto101 malto101 commented Apr 3, 2025

Note: should be merged after selenium PR

@malto101 malto101 requested a review from davidamo9 April 3, 2025 11:16
@malto101 malto101 assigned malto101 and davidamo9 and unassigned malto101 Apr 3, 2025
@malto101 malto101 requested review from Copilot and removed request for davidamo9 April 3, 2025 11:17
Copy link
Contributor

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 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

@malto101 malto101 requested a review from davidamo9 April 4, 2025 09:45
@malto101 malto101 merged commit 23f9974 into mozarkai:main Apr 4, 2025
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
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