Skip to content

Conversation

@pevogam
Copy link
Member

@pevogam pevogam commented Dec 17, 2025

Add minimal MacOS coverage and changes needed for more passing tests.

Summary by CodeRabbit

  • New Features

    • Added a macOS CI job and clarified the Windows CI job name for broader coverage.
  • Tests

    • Improved cross-platform detection; added macOS-specific test skips and refined Windows checks.
    • Updated image-coordinate expectations and related assertions.
  • Style

    • UI styling refactor: consistent fonts, layout spacing, DPI handling, and explicit image rendering.
  • Behavior

    • Tighter startup flow: guarded entry and stricter initialization/argument handling for image display.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Walkthrough

Adds a macOS CI job; refactors Qt6 test apps for explicit DPI, font, pixmap, and layout handling and moves QApplication creation under main guards; standardizes platform checks to platform.system() and updates test skip annotations and several expected coordinates.

Changes

Cohort / File(s) Change Summary
CI / Workflow
/.github/workflows/ci.yml
Add macOS CI job ("MacOS with any available coverage") with Python 3.12 setup, pip cache, non-Python deps, model cache, fake display and test steps; rename/clarify Windows job name/comment; Linux job unchanged.
Qt6 UI & DPI refactor
tests/qt6_application.py, tests/qt6_image.py
Move QT env var setup before app creation; set HighDPI rounding policy to PassThrough; switch stylesheet font usage to explicit QFont (Arial); set QPixmap.setDevicePixelRatio(1.0); tighten layout margins/spacing/alignment; require image path in qt6_image.py; create QApplication inside if __name__ == "__main__" and remove module-level app.
Platform detection & test skips
tests/test_region_control.py, tests/test_region_expect.py, tests/test_controller.py, tests/test_calibrator.py
Replace os.name == 'nt' checks with platform.system() == 'Windows'; add macOS (Darwin) specific skips for AutoPy-related tests; select Python launcher based on platform.system().
Test expectations & coordinates
tests/test_region_expect.py
Update expected coordinates and match lists for multiple tests (global shifts in x/y values and updated expected_matches arrays).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify no accidental multiple QApplication instances or top-level app left behind in tests/qt6_application.py.
  • Confirm DPI rounding policy and setDevicePixelRatio(1.0) behave correctly across target platforms.
  • Validate updated expected coordinates against the test image assets and CI environments (macOS differences).

Possibly related PRs

Poem

🐰 I hopped into CI with a macOS cheer,
Fonts turned to Arial, pixels crisp and clear,
DPI set steady, layouts tucked in tight,
Tests now ask the platform what's right.
A happy rabbit nudges the green light. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding a macOS CI workflow and fixing platform-specific test issues, which are the primary objectives reflected in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pevogam pevogam linked an issue Dec 17, 2025 that may be closed by this pull request
@pevogam pevogam self-assigned this Dec 17, 2025
@pevogam pevogam added the good first issue Good for newcomers label Dec 17, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

172-212: macOS CI job structure looks good, with one minor typo.

The macOS job correctly mirrors the Windows configuration with appropriate feature disabling. However, there's a typo on line 205:

-          # TODO: is tesseract availalbe for MacOS
+          # TODO: is tesseract available for macOS

Note: Tesseract is available via Homebrew on macOS (brew install tesseract). You could potentially enable OCR tests on macOS by adding the installation step.

Would you like me to suggest how to enable OCR support on macOS?

🧹 Nitpick comments (1)
tests/test_region_expect.py (1)

79-79: Consider updating platform detection for consistency.

This line still uses os.name == 'nt' while test_region_control.py has been updated to use platform.system() == 'Windows'. Consider aligning this for consistency across the test suite.

+import platform
+
 def show_image(self, filename: str) -> None:
     filename = self.file_resolver.search(filename)
-    python = 'python.exe' if os.name == 'nt' else 'python3'
+    python = 'python.exe' if platform.system() == 'Windows' else 'python3'
     self.child_img = subprocess.Popen([python, self.script_img, filename])
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77b2dce and 70f5708.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml (1 hunks)
  • tests/qt6_application.py (5 hunks)
  • tests/qt6_image.py (2 hunks)
  • tests/test_region_control.py (5 hunks)
  • tests/test_region_expect.py (4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/test_region_expect.py (1)
guibot/region.py (2)
  • find (422-434)
  • find_all (436-516)
🪛 GitHub Check: CodeQL
tests/qt6_image.py

[notice] 65-65: Unused global variable
The global variable 'widget' is not used.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Linux deb.ubuntu.noble with Python 3.12
  • GitHub Check: Linux pip with Python 3.12
  • GitHub Check: Linux pip with Python 3.11
  • GitHub Check: Linux pip with Python 3.10.8
  • GitHub Check: Linux pip with Python 3.13
  • GitHub Check: Linux rpm.fedora.40 with Python 3.12
  • GitHub Check: macos
  • GitHub Check: windows
🔇 Additional comments (13)
tests/test_region_control.py (2)

17-18: Platform detection change looks good, but there's an inconsistency.

The switch from os.name == 'nt' to platform.system() == 'Windows' is a valid approach for cross-platform detection. However, tests/test_region_expect.py (line 79) still uses os.name == 'nt' for the same purpose in show_image(). Consider updating that file as well to maintain consistency across the test suite.

Also applies to: 81-81


330-332: LGTM!

The Windows skip decorators are consistently applied to typing-related tests that trigger AutoPy issues. The platform detection is now uniform across the file.

Also applies to: 339-341, 354-356

tests/test_region_expect.py (2)

124-125: Coordinate adjustments align with layout changes.

The updated expected coordinates (from ~30,190 to ~20,180) are consistent with the zero-margin layout and explicit DPI settings introduced in qt6_image.py. The image now renders closer to the top-left corner as expected.

Also applies to: 131-132


185-186: LGTM!

All expected_matches coordinate adjustments follow the same pattern as test_find, reflecting the tighter layout margins in the test application.

Also applies to: 192-192, 208-208, 222-222

.github/workflows/ci.yml (1)

165-170: LGTM!

Windows test isolation is properly extended with documented reasons for each disabled feature.

tests/qt6_application.py (5)

24-33: LGTM! Proper DPI configuration for cross-platform consistency.

Setting these environment variables and the DPI rounding policy before QApplication creation is the correct approach for consistent rendering across platforms with different display scaling.


42-49: LGTM! Font-based styling improves cross-platform consistency.

Moving from stylesheet-based fonts to explicit QFont assignments is a good practice for test applications where pixel-precise rendering matters.

Also applies to: 55-55, 61-61, 66-67, 76-77, 81-81, 86-86, 92-92, 96-96, 100-100, 104-104


107-114: LGTM! Explicit device pixel ratio ensures consistent image dimensions.

Setting setDevicePixelRatio(1.0) on pixmaps ensures images render at their actual pixel dimensions regardless of display scaling, which is essential for visual testing.


119-162: LGTM! Layout standardization supports predictable widget positioning.

The explicit margins and spacing values ensure consistent layout across platforms, which is critical for the coordinate-based tests in test_region_control.py.


264-269: LGTM!

Moving QApplication creation inside __main__ is the standard pattern and avoids issues when the module is imported elsewhere.

tests/qt6_image.py (3)

17-31: LGTM! DPI configuration consistent with qt6_application.py.

The environment setup mirrors the changes in qt6_application.py, ensuring both test applications render consistently across platforms.


41-55: LGTM! Layout changes explain the coordinate adjustments in test_region_expect.py.

The zero margins, explicit device pixel ratio, and top-left alignment ensure images render at consistent, predictable positions—justifying the updated expected coordinates in the tests.


58-66: The widget variable is intentionally required—static analysis is a false positive.

The widget variable must remain in scope to prevent the ImageWithLayout instance from being garbage collected before app.exec() completes. This is standard Qt practice. You could optionally suppress the warning or make intent clearer:

-    widget = ImageWithLayout(sys.argv[1])
+    widget = ImageWithLayout(sys.argv[1])  # noqa: F841 - must remain in scope

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.23%. Comparing base (194e01b) to head (beb244c).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #83   +/-   ##
=======================================
  Coverage   89.23%   89.23%           
=======================================
  Files          17       17           
  Lines        4643     4643           
=======================================
  Hits         4143     4143           
  Misses        500      500           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/test_region_expect.py (1)

125-126: Coordinate adjustments are justified by Qt6 rendering updates.

The test coordinate expectations reflect the changes made in qt6_application.py and qt6_image.py, which include:

  • Explicit Arial font configuration across all UI elements
  • Qt 6 Per-Monitor DPI Aware V2 by default with disabled high-DPI scaling (QT_ENABLE_HIGHDPI_SCALING=0 and setHighDpiScaleFactorRoundingPolicy(PassThrough))
  • Layout margin adjustments via setContentsMargins() calls
  • Arial's more rounded design with softer, fuller curves and more open counters compared to other fonts affects text metrics and visual positioning

The coordinate shifts at lines 125–126, 132–133, and 186–187 (expecting (20, 180)) and the varied shifts in lines 193, 209, and 223 align with these rendering changes. The delta=5 tolerance is appropriate for UI element positioning across different rendering contexts.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 70f5708 and 14b0aa7.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml (2 hunks)
  • tests/qt6_application.py (5 hunks)
  • tests/qt6_image.py (2 hunks)
  • tests/test_region_control.py (7 hunks)
  • tests/test_region_expect.py (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_region_control.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Linux pip with Python 3.13
  • GitHub Check: Linux pip with Python 3.10.8
  • GitHub Check: Linux pip with Python 3.11
  • GitHub Check: Linux deb.ubuntu.noble with Python 3.12
  • GitHub Check: Linux rpm.fedora.40 with Python 3.12
  • GitHub Check: Linux pip with Python 3.12
  • GitHub Check: Windows with any available coverage
  • GitHub Check: MacOS with any available coverage
🔇 Additional comments (13)
tests/test_region_expect.py (1)

18-18: LGTM: Platform detection refactored for clarity.

The change from os.name == 'nt' to platform.system() == 'Windows' is more explicit and aligns with the PR's broader platform detection unification.

Also applies to: 80-80

.github/workflows/ci.yml (2)

131-131: LGTM: Documentation improvements for clarity.

The job name and comment updates explicitly clarify the platform-specific limitations, which aligns well with the addition of the new macOS job.

Also applies to: 166-166


173-216: No compatibility concerns with wxPython 4.2.4 on macOS.

The macOS job correctly uses wxPython 4.2.4, which has official binary wheels for macOS 11.0+ and x86-64 macOS 10.13+, supporting Python 3.12. The job structure and configuration are appropriate.

tests/qt6_application.py (6)

24-33: LGTM: DPI handling ensures consistent cross-platform rendering.

The environment setup disables Qt's automatic DPI scaling before QApplication creation, which is the correct approach for reproducible test rendering across platforms.


42-43: LGTM: Arial provides better cross-platform font availability.

Changing from Helvetica to Arial ensures consistent font rendering across Windows, macOS, and Linux, which is essential for reproducible test coordinates.


49-49: LGTM: Explicit font objects improve maintainability.

Replacing inline stylesheet font declarations with explicit QFont objects is a best practice that ensures consistent font application and improves code maintainability.

Also applies to: 55-55, 61-61, 66-66, 76-77, 81-82, 86-87, 92-93, 96-97, 100-101, 104-104


107-115: LGTM: Explicit device pixel ratio ensures consistent image rendering.

Setting devicePixelRatio to 1.0 for both pixmaps ensures consistent image rendering across different DPI screens, which is essential for reproducible test coordinates.


120-162: LGTM: Explicit layout margins ensure consistent rendering.

Adding explicit margins and spacing to all layouts ensures consistent rendering across platforms, which is essential for reproducible test coordinates.


265-265: LGTM: QApplication initialization inside main guard is correct.

Placing the QApplication initialization inside the main guard is appropriate for a test script.

tests/qt6_image.py (4)

17-17: LGTM: Consistent environment setup across Qt6 test files.

The environment setup matches qt6_application.py, ensuring consistent DPI handling and rendering behavior across all Qt6 test utilities.

Also applies to: 22-31


36-36: LGTM: Adding default parent parameter follows Qt conventions.

Adding the parent parameter with a default value of None aligns with Qt widget initialization conventions and improves flexibility.


41-55: LGTM: Zero margins and explicit device pixel ratio ensure precise coordinate testing.

The horizontal layout with zero margins, combined with device pixel ratio set to 1.0, ensures that images are positioned at precise coordinates for testing purposes.


59-66: LGTM: Argument validation improves script usability.

Adding argument validation with a helpful usage message prevents errors and makes the script more user-friendly.

@pevogam pevogam changed the title MacOS coverage Add macOS CI workflow and fix platform-specific test issues Dec 17, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14b0aa7 and e0fd70e.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml (2 hunks)
  • tests/test_controller.py (1 hunks)
  • tests/test_region_control.py (11 hunks)
  • tests/test_region_expect.py (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/test_region_control.py
  • tests/test_region_expect.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Analyze (python)
  • GitHub Check: Linux pip with Python 3.11
  • GitHub Check: Linux pip with Python 3.10.8
  • GitHub Check: Linux deb.ubuntu.noble with Python 3.12
  • GitHub Check: Linux pip with Python 3.12
  • GitHub Check: Linux rpm.fedora.40 with Python 3.12
  • GitHub Check: MacOS with any available coverage
  • GitHub Check: Linux pip with Python 3.13
  • GitHub Check: Windows with any available coverage
🔇 Additional comments (3)
.github/workflows/ci.yml (3)

131-131: LGTM!

Adding a descriptive job name improves workflow readability and is consistent with the naming pattern used for other jobs.


166-166: LGTM!

The comment clarification explicitly identifies AutoPy as the source of drag/drop issues on Windows, improving documentation.


173-216: LGTM!

The new macOS CI job is well-structured and consistent with the Windows job pattern. Key strengths:

  • Uses Python 3.12, matching the Windows job
  • Follows the same workflow structure for consistency
  • Caches ML models with the same key across all platforms
  • Appropriately disables platform-incompatible features (xdotool, vncdotool)
  • Documents known issues (AutoPy drag/drop) and future work (OCR, PyAutoGUI) with clear comments

The new variant is a simple duplicate of the windows one.
Use environment variables for the fixed DPI settings that should
make pixel counts independent of the environment screen.

Fix zero margins and spacing for the Qt6 image window but adapt
the locations once while taking the other possible approach for
the Qt6 app - keep the prevous locations but fix the margins and
spacing to match the previous ones for certain default displays.
Zero spacing and magins was too ugly for the Qt6 application but
not that relevant for the simpler Qt6 image. Also use fixed and
more universal fonts in a more standard way (not stylesheet).

Additionally sort the Qt imports better and only load the Qt app
if running as a script.
This comprises mostly of tests not finding the green box in the CI
(but finding it in a non-CI macOS environment as well as environment
with identical resolution) which need more debugging as well as
problems with AutoPy handling the SHIFT key on macOS, drag/drop
problems, and mouse-up and middle-click problems.

Also standardize the platform checks for Windows in comparison.
This is easy enough to provide without the feedback of additional
interest compared to PyAutoGUI which has a lot more problems.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/qt6_application.py (1)

198-203: Consider removing the redundant close call.

Both self.parent().close() (line 199) and QtWidgets.QApplication.quit() (line 203) are called. The TODO comment suggests platform inconsistencies, but calling both is redundant since quit() will terminate the application regardless.

Consider keeping only one approach:

     def dragEnterEvent(self, e: QtGui.QDragEnterEvent) -> None:
-        self.parent().close()
-        # TODO: this only works on some platforms and not others despite
-        # identical version but likely due to different dependency versions
-        # self.parent().close()
         QtWidgets.QApplication.quit()
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c46b96 and beb244c.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml (2 hunks)
  • tests/qt6_application.py (5 hunks)
  • tests/qt6_image.py (2 hunks)
  • tests/test_calibrator.py (2 hunks)
  • tests/test_controller.py (5 hunks)
  • tests/test_region_control.py (12 hunks)
  • tests/test_region_expect.py (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/ci.yml
  • tests/test_calibrator.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Linux deb.ubuntu.noble with Python 3.12
  • GitHub Check: Linux pip with Python 3.13
  • GitHub Check: Linux pip with Python 3.10.8
  • GitHub Check: Linux rpm.fedora.40 with Python 3.12
  • GitHub Check: Linux pip with Python 3.12
  • GitHub Check: Linux pip with Python 3.11
  • GitHub Check: MacOS with any available coverage
  • GitHub Check: Windows with any available coverage
🔇 Additional comments (35)
tests/test_region_control.py (12)

17-18: LGTM!

Adding platform import aligns with the standardized approach for platform detection across the test suite.


80-84: LGTM!

Using platform.system() == 'Windows' is more explicit and consistent with the broader refactoring in this PR. This is preferable to os.name == 'nt' as it returns human-readable platform names.


119-121: LGTM!

The skip annotation with a descriptive reason for macOS-specific AutoPy behavior is appropriate.


151-158: LGTM!

Skip annotation for macOS middle-click issues is appropriate with clear reasoning.


182-184: LGTM!

Consistent Darwin skip pattern for green box detection issue.


196-198: LGTM!

Consistent Darwin skip pattern.


228-231: LGTM!

Skip annotation for macOS mouse up issues with clear reasoning.


319-319: LGTM!

Darwin skip for SHIFT key handling issue is appropriate.


332-334: LGTM!

Combined skip reason covers both SHIFT and green box detection issues on macOS.


343-345: LGTM!

Consistent migration from os.name == 'nt' to platform.system() == 'Windows'.


352-354: LGTM!

Consistent Windows platform check.


367-369: LGTM!

Consistent Windows platform check.

tests/test_region_expect.py (6)

17-18: LGTM!

Adding platform import aligns with the standardized platform detection approach.


78-83: LGTM!

Consistent use of platform.system() == 'Windows' for Python interpreter selection.


125-135: Verify the updated expected coordinates align with Qt6 layout changes.

The expected coordinates changed from (30, 190) to (20, 180). This appears to correspond to the layout margin and spacing adjustments made in qt6_image.py (zero margins and explicit DPI settings).


186-193: Updated coordinates reflect Qt6 DPI/layout fixes.

The expected match coordinates have been consistently adjusted. The changes from (25, 25) to (15, 15) etc. align with the zero-margin layout configuration in the Qt6 image viewer.


209-209: LGTM!

Expected matches updated consistently with other coordinate changes.


223-223: LGTM!

Expected matches updated consistently.

tests/test_controller.py (5)

17-18: LGTM!

Adding platform import for standardized platform detection.


143-147: LGTM!

Consistent use of platform.system() == 'Windows' for Python interpreter selection.


264-267: LGTM!

Runtime skip for macOS instant mouse move issues is appropriate. Using a continue statement within the loop is the correct approach here since @unittest.skipIf can't selectively skip loop iterations.


325-328: LGTM!

Runtime skip for macOS mouse up issues is appropriate within the loop context.


386-388: LGTM!

Consistent migration from os.name == 'nt' to platform.system() == 'Windows'.

tests/qt6_application.py (7)

17-18: LGTM!

Import reordering to QtCore, QtGui, QtWidgets follows the conventional order from low-level to high-level modules.


24-33: LGTM!

Setting environment variables and DPI scaling policy before QApplication creation is the correct approach for consistent cross-platform rendering. This should resolve DPI-related test flakiness.


42-44: LGTM!

Arial is a more widely available cross-platform font than Helvetica, which may not be present on all systems.


46-67: LGTM!

Replacing inline styles with explicit setFont() calls is cleaner and more maintainable. The consistent font application across widgets ensures uniform appearance.


107-114: LGTM!

Explicitly setting device pixel ratio to 1.0 on QPixmap objects ensures consistent image sizes across different display configurations, which directly addresses cross-platform test reliability.


119-162: LGTM!

Explicit layout margins and spacing configuration provides predictable widget positioning, which is essential for coordinate-based testing. The small margins (2-10px) and consistent spacing align with the updated expected coordinates in the test files.


264-269: LGTM!

Moving QApplication creation inside the if __name__ == "__main__": guard is best practice. This prevents application instantiation when the module is imported, which aligns with the changes in qt6_image.py.

tests/qt6_image.py (5)

17-19: LGTM!

Added os import for environment variable access and reordered imports consistently with qt6_application.py.


22-31: LGTM!

Environment setup and DPI scaling policy configuration mirrors qt6_application.py, ensuring consistent behavior across both Qt6 test applications.


36-36: LGTM!

Adding a default parent parameter with None follows PyQt conventions and allows the widget to be used as a top-level window.


41-56: LGTM!

The explicit QPixmap creation with setDevicePixelRatio(1.0) and zero-margin layout configuration ensures consistent image positioning. This directly explains the coordinate adjustments in test_region_expect.py (e.g., from (30, 190) to (20, 180)).


58-67: LGTM!

Moving QApplication creation inside the main guard with proper argument validation is best practice. The usage message provides clear feedback when the image path is missing. The past review comment about an unused widget global variable appears to be resolved—this variable is no longer present in the current code.

@pevogam pevogam merged commit 0445f1b into intra2net:master Dec 17, 2025
14 checks passed
@pevogam pevogam deleted the macos-coverage branch December 17, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Additional Windows and OSX CI test variants and collectable artifacts

1 participant