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

Merged
merged 8 commits into from
Jan 10, 2025

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

All modified and coverable lines are covered by tests ✅

Project coverage is 76.3%. Comparing base (bb9824e) to head (391c4d8).
Report is 32 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2408     +/-   ##
=========================================
+ Coverage     68.4%   76.3%   +7.9%     
=========================================
  Files          294     294             
  Lines        59390   59803    +413     
=========================================
+ Hits         40652   45664   +5012     
+ Misses       18738   14139   -4599     
Files with missing lines Coverage Δ
flopy/mbase.py 72.3% <100.0%> (+2.4%) ⬆️

... and 248 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.

@martclanor martclanor force-pushed the fix_test_resolve_exe branch 2 times, most recently from ba9a028 to 1ea2e19 Compare December 27, 2024 18:36
@wpbonelli wpbonelli modified the milestone: 3.9.1 Jan 6, 2025
@martclanor martclanor force-pushed the fix_test_resolve_exe branch from c3b2208 to 391c4d8 Compare January 9, 2025 22:28
@martclanor martclanor marked this pull request as ready for review January 9, 2025 22:59
Copy link
Member

@wpbonelli wpbonelli left a comment

Choose a reason for hiding this comment

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

thanks @martclanor and sorry it took so long to get ci running again

@wpbonelli wpbonelli merged commit 4deabe1 into modflowpy:develop Jan 10, 2025
23 checks passed
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