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: deprecate unused flopy.utils.binaryfile.binaryread_struct #2201

Merged
merged 1 commit into from
May 31, 2024

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented May 30, 2024

This PR deprecates binaryread_struct() (documented here), since it is not used. Before FloPy migrated to GitHub, this function was replaced by binaryread() as the default method used internally due to better performance of NumPy's fromfile() over struct's unpack().

This PR also improves the docstring for binaryread(), and provides low-level testing/coverage for both methods.

@mwtoews mwtoews force-pushed the dep-binaryread_struct branch 2 times, most recently from 155b222 to 27a37e0 Compare May 30, 2024 23:28
@mwtoews mwtoews force-pushed the dep-binaryread_struct branch from 27a37e0 to b8cc205 Compare May 30, 2024 23:31
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.

Looks good to me but I will defer to others with longer history on the project, thanks @mwtoews

@wpbonelli wpbonelli requested a review from langevin-usgs May 31, 2024 02:08
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.

Good idea to deprecate that old struct approach. Thanks for the docs and test.

@langevin-usgs langevin-usgs merged commit bbabf86 into modflowpy:develop May 31, 2024
24 checks passed
@mwtoews mwtoews deleted the dep-binaryread_struct branch May 31, 2024 11:07
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