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

refactor(exe_name): remove unnecessary ".exe" suffix #1563

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Sep 29, 2022

This PR removes .exe suffix from various exe names in the main flopy module and in examples. There are a few reasons for this:

  • The .exe suffix unnecessary for Windows, since executables are defined as any file with suffixes listed in PATHEXT. Calling mf2005 in Windows will automatically find mf2005.EXE if it is in one of the folders from the PATH environment variable.
  • It is inconsistent for model classes and load methods to have defaults (e.g.) exe_name="mf2005.exe" that imply they are designed only for Windows, when these same classes and methods work cross-platform for Linux and macOS too.

Note that these changes should not break anything downstream, e.g. someone with a script with exe_name="mf2005.exe" will still continue to work on Linux/macOS (mbase.py will remove .exe if the executable is not found).

Other changes:

  • Change BaseModel.exe_name from mf2k.exe to mf2005, although this is an abstract base class, so this modification does not change anything.
  • Clean-up several import platform statements where the module is not used.

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #1563 (31a2dc1) into develop (14d69cb) will increase coverage by 0.0%.
The diff coverage is 0.0%.

@@           Coverage Diff           @@
##           develop   #1563   +/-   ##
=======================================
  Coverage     72.4%   72.4%           
=======================================
  Files          251     251           
  Lines        54216   54215    -1     
=======================================
+ Hits         39300   39303    +3     
+ Misses       14916   14912    -4     
Impacted Files Coverage Δ
flopy/mbase.py 68.8% <0.0%> (+0.3%) ⬆️
flopy/mf6/mfmodel.py 56.5% <ø> (ø)
flopy/mf6/modflow/mfgwf.py 100.0% <ø> (ø)
flopy/mf6/modflow/mfgwt.py 76.0% <ø> (ø)
flopy/mf6/modflow/mfsimulation.py 58.7% <ø> (ø)
flopy/mf6/utils/createpackages.py 7.4% <0.0%> (ø)
flopy/mfusg/mfusg.py 77.4% <ø> (ø)
flopy/modflow/mf.py 68.4% <ø> (ø)
flopy/modflowlgr/mflgr.py 52.5% <ø> (ø)
flopy/modpath/mp6.py 83.9% <ø> (ø)
... and 3 more

Copy link
Contributor

@langevin-usgs langevin-usgs left a comment

Choose a reason for hiding this comment

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

Long overdue. Two thumbs up.

@langevin-usgs langevin-usgs merged commit f520110 into modflowpy:develop Sep 30, 2022
@mwtoews mwtoews deleted the rm-exe-suffix branch September 30, 2022 17:15
mwtoews added a commit to mwtoews/flopy that referenced this pull request Oct 13, 2022
* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from modflowpy#1563 for Mt3dms
jdhughes-usgs pushed a commit that referenced this pull request Oct 13, 2022
…1583)

* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from #1563 for Mt3dms
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
…odflowpy#1583)

* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from modflowpy#1563 for Mt3dms
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
…odflowpy#1583)

* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from modflowpy#1563 for Mt3dms
wpbonelli pushed a commit that referenced this pull request Dec 14, 2022
…1583)

* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from #1563 for Mt3dms
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
…odflowpy#1583)

* Allow write_gridlines_shapefile to write .prj file
* Add test_write_gridlines_shapefile
* Add remaining file missed from modflowpy#1563 for Mt3dms
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