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(annotations): use postponed evaluation #124

Merged
merged 1 commit into from
Sep 12, 2023
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
10 changes: 8 additions & 2 deletions .github/workflows/ex-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.8

- name: Print python version
run: |
Expand Down Expand Up @@ -89,6 +89,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [3.8, 3.9, "3.10", "3.11"]
env:
script-directory: scripts
etc-directory: etc
Expand Down Expand Up @@ -118,7 +120,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python }}

- name: Install Python packages
run: |
Expand Down Expand Up @@ -147,11 +149,13 @@ jobs:
working-directory: ${{env.etc-directory}}

- name: Run processing script
if: matrix.python == '3.9'
run: |
python process-scripts.py
working-directory: ${{env.script-directory}}

- name: Build mf6examples LaTeX document
if: matrix.python == '3.9'
shell: python
run: |
import sys
Expand Down Expand Up @@ -182,12 +186,14 @@ jobs:
print(stderr)

- name: Rename and move the LaTeX document
if: matrix.python == '3.9'
run: |
ls -l ./doc/
mv ./doc/mf6examples.pdf mf6examples.pdf
ls -l ./

- name: Upload build artifacts for current release
if: matrix.python == '3.9'
uses: actions/upload-artifact@v3
with:
name: current
Expand Down
2 changes: 2 additions & 0 deletions common/DisvGridMerger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from math import sqrt
import copy

Expand Down
11 changes: 6 additions & 5 deletions common/DisvPropertyContainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import copy
from itertools import cycle
from typing import List

import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -104,10 +105,10 @@ class DisvPropertyContainer:
nlay: int
ncpl: int
nvert: int
vertices: List[list] # [[iv, xv, yv], ...]
cell2d: List[list] # [[ic, xc, yc, ncvert, icvert], ...]
vertices: list[list] # [[iv, xv, yv], ...]
cell2d: list[list] # [[ic, xc, yc, ncvert, icvert], ...]
top: np.ndarray
botm: List[np.ndarray]
botm: list[np.ndarray]
origin_x: float
origin_y: float
rotation: float
Expand Down Expand Up @@ -541,7 +542,7 @@ def plot_grid(
plot_time = -1.0

if not isinstance(grid_color, tuple):
grid_color = (grid_color, )
grid_color = (grid_color,)

ColorCycler = grid_color
if plot_time > 0.0 and grid_color == ("grey",):
Expand Down