Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ jobs:
uses: actions/cache@v2.1.0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ hashFiles('etc/environment.yml', 'flopy') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ hashFiles('etc/environment.yml') }}

# Standard python fails on windows without GDAL installation
# Using custom bash shell ("shell: bash -l {0}") with Miniconda
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ jobs:
uses: actions/cache@v2.1.0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ hashFiles('etc/environment.yml', 'flopy') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ hashFiles('etc/environment.yml') }}

# Standard python fails on windows without GDAL installation
# Using custom bash shell ("shell: bash -l {0}") with Miniconda
Expand Down
8 changes: 7 additions & 1 deletion flopy/discretization/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ def _warn_intersect(self, module, lineno):

Should be be removed after a couple of releases. Added in 3.3.5

Updated in 3.3.6 to raise an error and exit if intersect interface
is called incorrectly.

Should be removed in flopy 3.3.7

Parameters
----------
module : str
Expand All @@ -698,7 +703,8 @@ def _warn_intersect(self, module, lineno):
"intersect(self, x, y, z=None, local=False, "
"forgive=False) interface instead."
)
warnings.warn_explicit(warning, UserWarning, module, lineno)

raise UserWarning(warning)

def set_coord_info(
self,
Expand Down
7 changes: 4 additions & 3 deletions flopy/discretization/structuredgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,10 @@ def intersect(self, x, y, z=None, local=False, forgive=False):
The column number

"""
# trigger interface change warning
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)
if isinstance(z, bool):
# trigger interface change warning
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)

# transform x and y to local coordinates
x, y = super().intersect(x, y, local, forgive)
Expand Down
5 changes: 3 additions & 2 deletions flopy/discretization/unstructuredgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,9 @@ def intersect(self, x, y, z=None, local=False, forgive=False):
The CELL2D number

"""
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)
if isinstance(z, bool):
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)

if local:
# transform x and y to real-world coordinates
Expand Down
5 changes: 3 additions & 2 deletions flopy/discretization/vertexgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ def intersect(self, x, y, z=None, local=False, forgive=False):
The CELL2D number

"""
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)
if isinstance(z, bool):
frame_info = inspect.getframeinfo(inspect.currentframe())
self._warn_intersect(frame_info.filename, frame_info.lineno)

if local:
# transform x and y to real-world coordinates
Expand Down