Skip to content

Commit 1ee5d7b

Browse files
Conditionally set matplotlib backend to Agg only if running in GitHub Actions and OS is windows, since GHA macos apparently doesn't like Agg backend (https://github.com/softwareengineerprogrammer/GEOPHIRES/actions/runs/14779862524/job/41496253000\#step:5:721)
1 parent 12bfa8d commit 1ee5d7b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
3+
import matplotlib as mpl
4+
5+
if os.name == 'nt' and 'TOXPYTHON' in os.environ:
6+
# Backend should be 'Agg' in GitHub Actions to prevent intermittent Windows failures
7+
# per https://github.com/NREL/GEOPHIRES-X/issues/365
8+
mpl.use('Agg')
9+
10+
print(f'[DEBUG] matplotlib backend: {mpl.get_backend()}')

0 commit comments

Comments
 (0)