Skip to content

refactor(vtk): use pathlib, corrections to docstrings#1603

Merged
jdhughes-dev merged 2 commits into
modflowpy:developfrom
mwtoews:pathlib-vtk
Oct 26, 2022
Merged

refactor(vtk): use pathlib, corrections to docstrings#1603
jdhughes-dev merged 2 commits into
modflowpy:developfrom
mwtoews:pathlib-vtk

Conversation

@mwtoews
Copy link
Copy Markdown
Contributor

@mwtoews mwtoews commented Oct 23, 2022

This PR is primarily focused with the vtk export module:

  • Ensure the vtk module works with pathlib and str path objects
  • Use more pathlib throughout vtk module and test_export.py
  • Many corrections to docstrings for vtk module
  • Use Sphinx's deprecated directive with a link to the recommended method(s)
  • Remove binary option with count_lines_in_file since it wasn't used and does not make sense
  • Add is_binary_file and use it instead of "exists()" checks

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 23, 2022

Codecov Report

Merging #1603 (21d42f7) into develop (09e3bc5) will increase coverage by 0.0%.
The diff coverage is 76.1%.

@@           Coverage Diff           @@
##           develop   #1603   +/-   ##
=======================================
  Coverage     72.7%   72.7%           
=======================================
  Files          251     251           
  Lines        54488   54485    -3     
=======================================
- Hits         39650   39648    -2     
+ Misses       14838   14837    -1     
Impacted Files Coverage Δ
flopy/export/vtk.py 69.8% <76.1%> (+<0.1%) ⬆️

Comment thread flopy/export/vtk.py Outdated
Comment thread flopy/export/vtk.py Outdated
@mwtoews
Copy link
Copy Markdown
Contributor Author

mwtoews commented Oct 26, 2022

Thanks @jdhughes-usgs I've used more with_suffix functions to simplify further.

Also, the docstrings are adjusted to use os.PathLike, which is a superclass of Path and other path-like objects (e.g. path), which could also be used (in theory).

@jdhughes-dev jdhughes-dev merged commit 2f71612 into modflowpy:develop Oct 26, 2022
@mwtoews mwtoews deleted the pathlib-vtk branch October 26, 2022 23:17
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
* fixes for review; use os.PathLike instead of Path for docstring
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
* fixes for review; use os.PathLike instead of Path for docstring
wpbonelli pushed a commit that referenced this pull request Dec 14, 2022
* fixes for review; use os.PathLike instead of Path for docstring
wpbonelli pushed a commit to wpbonelli/flopy that referenced this pull request Dec 14, 2022
* fixes for review; use os.PathLike instead of Path for docstring
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