Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(resolve_exe): allow shutil.which() to find exe without suffix in Windows #2408

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

martclanor
Copy link
Contributor

This PR aims to address an issue found in local testing in Windows with Python 3.13.1. The issue is seen in the failing test: test_mbase.py::test_run_model_exe_rel_path and is caused by a behavior change in shutil.which (in Windows) introduced in python/cpython#127035.

For more context, in test_run_model_exe_rel_path, the mf6 executable is copied to a relative path, ../bin/mf6 (without extension). Within the test, shutil.which is used to locate the executable path. However, with the new changes in shutil.which, by default, it would only search for the path with an extension in PATHEXT, excluding paths without extension.

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.3%. Comparing base (bb9824e) to head (c3b2208).
Report is 26 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/mbase.py 93.7% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2408     +/-   ##
=========================================
+ Coverage     68.4%   76.3%   +7.9%     
=========================================
  Files          294     294             
  Lines        59390   59781    +391     
=========================================
+ Hits         40652   45655   +5003     
+ Misses       18738   14126   -4612     
Files with missing lines Coverage Δ
flopy/mbase.py 72.3% <93.7%> (+2.4%) ⬆️

... and 245 files with indirect coverage changes

@wpbonelli
Copy link
Member

@martclanor there was an issue with the latest executables release, which is what gets installed for all these CI jobs. I deleted the release while we figure it out. If you restart I think the CI should pass now.

@wpbonelli wpbonelli modified the milestone: 3.9.1 Jan 6, 2025
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.

2 participants