Skip to content

test: add Mac python.org locator coverage#430

Merged
karthiknadig merged 2 commits intomainfrom
test/issue-389-mac-python-org
Apr 22, 2026
Merged

test: add Mac python.org locator coverage#430
karthiknadig merged 2 commits intomainfrom
test/issue-389-mac-python-org

Conversation

@karthiknadig
Copy link
Copy Markdown
Member

@karthiknadig karthiknadig commented Apr 15, 2026

Adds focused direct coverage for the Mac python.org locator while continuing the #389 coverage work.

  • Adds deterministic tests for python.org framework path matching, locator metadata, and non-macOS rejection.
  • Narrows python.org classification to interpreter-shaped framework paths under /Library/Frameworks/Python.framework/Versions/{version}/bin/.
  • Covers false positives for python-config scripts, nested bin paths, Homebrew framework paths, and unrelated frameworks.

Validation:

  • cargo fmt --all
  • wsl bash -lc 'cd /mnt/c/GIT/projects/python-environment-tools && cargo test -p pet-mac-python-org'
  • wsl bash -lc 'cd /mnt/c/GIT/projects/python-environment-tools && cargo clippy --all -- -D warnings'

Refs #389

@karthiknadig karthiknadig requested a review from Copilot April 15, 2026 23:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 56ms 481ms 76ms -20ms
Full Refresh 115ms 25964ms 143ms -28ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 71.65%
Base Branch Coverage 71.26%
Delta 0.39% ✅

Coverage increased! Great work!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Performance Report (Windows) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 9ms 14ms 12ms -3ms -25%
Full Refresh 147ms 1484ms 217ms -70ms -32.3%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 75.0%
Base Branch Coverage 74.6%
Delta .4% ✅

Coverage increased! Great work!

Copy link
Copy Markdown

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds more deterministic matching and unit tests for identifying python.org macOS framework-based Python environments, reducing false positives while continuing work for #389.

Changes:

  • Refines python.org environment detection to require /Library/Frameworks/Python.framework/Versions/<version>/bin/<python-exe>-shaped paths.
  • Introduces helper functions for framework path and executable-name validation.
  • Adds focused unit tests for accepted/rejected paths and non-macOS behavior.
Show a summary per file
File Description
crates/pet-mac-python-org/src/lib.rs Tightens path matching logic and adds unit tests for python.org framework detection.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

Comment thread crates/pet-mac-python-org/src/lib.rs Outdated
Comment thread crates/pet-mac-python-org/src/lib.rs
Comment thread crates/pet-mac-python-org/src/lib.rs Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Performance Report (Linux) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 75ms 380ms 77ms -2ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

Copy link
Copy Markdown

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.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@karthiknadig karthiknadig marked this pull request as ready for review April 22, 2026 21:46
@karthiknadig karthiknadig enabled auto-merge (squash) April 22, 2026 21:46
@karthiknadig karthiknadig merged commit d482aa7 into main Apr 22, 2026
34 checks passed
@karthiknadig karthiknadig deleted the test/issue-389-mac-python-org branch April 22, 2026 22:26
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