Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ed7d180
Feature METplus2857 main v3.1 support (#512)
jprestop Jun 9, 2025
69c28d1
Per #515, remove deprecated import (#516)
georgemccabe Jun 9, 2025
6239d5a
Update base_plot.py
bikegeek Jun 27, 2025
4dedb9f
Update base_plot.py
bikegeek Jun 27, 2025
0b165a2
Update test_scatter.py
bikegeek Jun 28, 2025
e272a1e
Remove soon to be deprecated call to plotly.io.kaleido.scope
bikegeek Jun 30, 2025
6a0e262
Comment out soon-to-be deprecated call to plolty.io.kaleido.scope
bikegeek Jun 30, 2025
ea2f281
add call to install chrome
bikegeek Jul 1, 2025
9cbe7cb
Add test_* to trigger and setup test to use test_requirements.txt
bikegeek Jul 1, 2025
d623116
To test plotly/kaleido updates
bikegeek Jul 1, 2025
0b6f185
Try using kaleido_get_chrome_sync
bikegeek Jul 1, 2025
dd03b3f
Update import to use ploty.io._kaleido
bikegeek Jul 1, 2025
2422aa8
Using latest import, invoke the get_chrome() method instead of get_ch…
bikegeek Jul 1, 2025
1833159
explicitly pip install kaleido 1.0
bikegeek Jul 1, 2025
96d33fa
Add Google Chrome action
bikegeek Jul 1, 2025
0a37fce
fix syntax error
bikegeek Jul 1, 2025
fec2961
remove - from the run command
bikegeek Jul 1, 2025
e00bfff
Explicitly get the Chrome environment, bypass the calls to plotly.io.…
bikegeek Jul 1, 2025
141ec5e
Set up a CHROME_INSTALL path and save it as an environment
bikegeek Jul 1, 2025
077517d
remove no-sudo
bikegeek Jul 1, 2025
6119238
removed extra line at top of file
bikegeek Jul 1, 2025
c49572b
move env definition by indenting
bikegeek Jul 1, 2025
ceab0dc
Removed all imports that didn't work and the soon to be deprecated re…
bikegeek Jul 1, 2025
659ffae
Remove any attempt to set an env
bikegeek Jul 1, 2025
71c7df8
Remove the --version to the path under the chrome installation
bikegeek Jul 1, 2025
89f1ff6
Remove skip
bikegeek Jul 1, 2025
fb2ec73
Update test_requirements.txt
bikegeek Jul 1, 2025
41791d4
Attempt to get chrome via kaleido.get_chrome_sync()
bikegeek Jul 3, 2025
01032a5
Merge branch 'test_plotly' of https://github.com/dtcenter/METplotpy i…
bikegeek Jul 3, 2025
afb2d38
Update unit_tests.yaml
bikegeek Jul 3, 2025
9a32b75
Update base_plot.py
bikegeek Jul 3, 2025
e080cc2
Replace test_requirements.txt with requirements.txt
bikegeek Jul 3, 2025
1869154
Update Plotly from 6.0.0 to 6.1.1 and kaleido from 0.2.1 to 1.0.0
bikegeek Jul 3, 2025
eac0c30
Merge branch 'develop' into feature_525_update_plotly_kaleido
bikegeek Jul 8, 2025
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
15 changes: 13 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This workflow will install Python dependencies, run tests the specified Python version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python 3.12 tests

on:
Expand All @@ -11,6 +10,7 @@ on:
- feature_*
- main_*
- bugfix_*
- test_*
paths-ignore:
- 'docs/**'
- '.github/pull_request_template.md'
Expand All @@ -21,6 +21,8 @@ on:
pull_request:
types: [opened, reopened, synchronize]



jobs:
build:

Expand Down Expand Up @@ -49,8 +51,17 @@ jobs:
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install --upgrade kaleido



# - uses: browser-actions/setup-chrome@v1
# - name: Install Google Chrome for Plotly
# run: |
# chrome --version
# ${{ steps.setup-chrome.outputs.chrome-path }}



# Checking the branch name, not necessary but useful when setting things up.
# - name: Extract branch name
# shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ def plot_qbo_phase_circuits(inits,periods,rean_qbo_pcs,rfcst_qbo_pcs,outfile):

def plot_qbo_phase_space(rean_qbo_pcs,eofs,ptitle,outfile):


from mpl_toolkits.axes_grid1.inset_locator import mark_inset


fig = plt.figure(4)

ax = fig.add_subplot(1,1,1)
Expand Down
7 changes: 5 additions & 2 deletions metplotpy/plots/base_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
from .config import Config
from metplotpy.plots.context_filter import ContextFilter

# set kaleido to use single process to prevent GPU errors in containers
# pio.kaleido.scope.chromium_args += ("--single-process",)
# kaleido 0.x will be deprecated after September 2025 and Chrome will no longer
# be included with kaleido from version 1.0.0. Explicitly get Chrome via call to kaleido.
import kaleido
kaleido.get_chrome_sync()


class BasePlot:
"""A class that provides methods for building Plotly plot's common features
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

imageio>=2.37.0
imutils>=0.5.4
kaleido>=0.2.1
kaleido>=1.0.0
matplotlib>=3.10.0
metpy>=1.6.3
netcdf4>=1.7.2
numpy>=2.2.2
opencv-python>=4.10.0
pandas>=2.2.3
pint>=0.24.4
plotly>=6.0.0
plotly>=6.1.1
pytest>=8.3.4
pyyaml>=6.0.2
scikit-image>=0.25.1
Expand All @@ -18,4 +19,3 @@ eofs>=2.0.0
cartopy>=0.24.0
scikit-learn>=1.6.1
cmocean>=4.0.3

21 changes: 21 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

imageio>=2.37.0
imutils>=0.5.4
kaleido>=1.0.0
matplotlib>=3.10.0
metpy>=1.6.3
netcdf4>=1.7.2
numpy>=2.2.2
opencv-python>=4.10.0
pandas>=2.2.3
pint>=0.24.4
plotly>=6.1.1
pytest>=8.3.4
pyyaml>=6.0.2
scikit-image>=0.25.1
scipy>=1.15.1
xarray>=2025.1.2
eofs>=2.0.0
cartopy>=0.24.0
scikit-learn>=1.6.1
cmocean>=4.0.3