From ed7d180451d1b76da3f6fd6e1740f9bcc725b980 Mon Sep 17 00:00:00 2001 From: Julie Prestopnik Date: Mon, 9 Jun 2025 10:33:28 -0600 Subject: [PATCH 01/32] Feature METplus2857 main v3.1 support (#512) * Making index consistent with other METplus repositories * Initial commit of overview --- docs/Users_Guide/index.rst | 3 +- docs/Users_Guide/overview.rst | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 docs/Users_Guide/overview.rst diff --git a/docs/Users_Guide/index.rst b/docs/Users_Guide/index.rst index 1cc0cbf92..9b2730acf 100644 --- a/docs/Users_Guide/index.rst +++ b/docs/Users_Guide/index.rst @@ -65,6 +65,8 @@ Atmospheric Research (NCAR), sponsored by National Science Foundation. :titlesonly: :numbered: 4 + overview + release-notes installation line box @@ -94,7 +96,6 @@ Atmospheric Research (NCAR), sponsored by National Science Foundation. fv3_physics tcmpr_plots scatter - release-notes references diff --git a/docs/Users_Guide/overview.rst b/docs/Users_Guide/overview.rst new file mode 100644 index 000000000..0365ac52e --- /dev/null +++ b/docs/Users_Guide/overview.rst @@ -0,0 +1,55 @@ +******** +Overview +******** + +Purpose and Organization of the User's Guide +============================================ + +The goal of this User’s Guide is to provide basic information for users of +METplotpy. METplotpy is a Python-based plotting library designed to generate +a wide range of diagnostic and verification visualizations. It helps users +interpret verification statistics through meaningful plots, making it easier +to evaluate forecast performance and model behavior. + +The METplotpy User's Guide is organized as follows. An overview of METplotpy +can be found below. The guide also includes information about how to create +a variety of plots and diagrams including, for example but not limited to, +box plots, bar plots, performance diagrams, reliability diagrams, and more. + +The Developmental Testbed Center (DTC) +====================================== + +METplotpy has been developed, and will be maintained and enhanced, by the +Developmental Testbed Center (DTC; http://www.dtcenter.org/ ). +The main goal of the DTC is to serve as a bridge between operations and +research, to facilitate the activities of these two important components of +the numerical weather prediction (NWP) community. The DTC provides an +environment that is functionally equivalent to the operational environment +in which the research community can test model enhancements; the operational +community benefits from DTC testing and evaluation of models before new models +are implemented operationally. METplotpy serves both the research and +operational communities in this way - offering capabilities for researchers +to test their own enhancements to models and providing a capability for +the DTC to evaluate the strengths and weaknesses of advances in NWP +prior to operational implementation. + +METplotpy will also be available to DTC visitors and to the modeling community +for testing and evaluation of new model capabilities, applications in new +environments, and so on. + +Future Development Plans +======================== + +METplotpy is an evolving software package. New capabilities are planned in +controlled, successive version releases. Bug fixes and user-identified +problems will be addressed as they are found. Plans are also in place to +incorporate new capabilities and options in future releases of METplotpy. + +User Support +============ + +METplotpy is one component of the larger METplus system for which user support +is provided through the +`METplus GitHub Discussions Forum `_, +as described in the +`METplus User's Guide `_. From 69c28d14f43295987a6a3b1f4b395da2db6c4360 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 9 Jun 2025 10:59:24 -0600 Subject: [PATCH 02/32] Per #515, remove deprecated import (#516) --- .../contributed/stratosphere_diagnostics/stratosphere_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py b/metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py index d95099c3c..d6da90892 100644 --- a/metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py +++ b/metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py @@ -109,7 +109,7 @@ 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 (inset_axes, InsetPosition, mark_inset) + from mpl_toolkits.axes_grid1.inset_locator import (inset_axes, mark_inset) fig = plt.figure(4) From 6239d5a43f6de3ec631bbae0652355078ede87d5 Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:53:41 -0600 Subject: [PATCH 03/32] Update base_plot.py comment out the pio.kaleido.scope line, this is now causing tests to fail due to kaleido warning for deprecations in September 2025 --- metplotpy/plots/base_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 4897c0f0e..27d68a74b 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -28,7 +28,7 @@ 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",) +# pio.kaleido.scope.chromium_args += ("--single-process",) class BasePlot: """A class that provides methods for building Plotly plot's common features From 4dedb9f90e544f83f1b6bff2940ee1d7f759ee55 Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:31:05 -0600 Subject: [PATCH 04/32] Update base_plot.py backing out the latest from pio.kaleido line. WARNING: GHA tests may fail due to upcoming deprecation and warnings that emanate due to Python 3.12 still features that will be deprecated. --- metplotpy/plots/base_plot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 27d68a74b..e1001edbc 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -28,7 +28,8 @@ 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",) +# NOTE: this may result in GHA tests failing due to impending deprecations in kaleido +pio.kaleido.scope.chromium_args += ("--single-process",) class BasePlot: """A class that provides methods for building Plotly plot's common features From 0b165a254d0465342ac5a465f62b0377c3d278a1 Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Fri, 27 Jun 2025 18:20:43 -0600 Subject: [PATCH 05/32] Update test_scatter.py Tests pass outside of GHA. Something in GHA is causing issues with Python 3.12 and kaleido (causes AssertionError in kaleido) --- test/scatter/test_scatter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/scatter/test_scatter.py b/test/scatter/test_scatter.py index aee0593f4..e232dd3d9 100644 --- a/test/scatter/test_scatter.py +++ b/test/scatter/test_scatter.py @@ -23,6 +23,7 @@ def read_config(config_filename) -> dict: return parms except yaml.YAMLError as exc: print(exc) +@pytest.mark.skip("Skipping until GHA issue with Python 3.12 and kaleido are resolved") def test_files_exist(): """ Generate a scatter plot from reformatted MPR Usecase data and From e272a1e935323f84a9d1f2ac06965d63c25296d2 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Mon, 30 Jun 2025 07:47:01 -0600 Subject: [PATCH 06/32] Remove soon to be deprecated call to plotly.io.kaleido.scope --- metplotpy/plots/base_plot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index e1001edbc..0a7e139d7 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -29,7 +29,10 @@ # set kaleido to use single process to prevent GPU errors in containers # NOTE: this may result in GHA tests failing due to impending deprecations in kaleido -pio.kaleido.scope.chromium_args += ("--single-process",) + +# kaleido.scope will be deprecated after September 2025 +# using plotly.io.defaults.* instead is recommended, but there is no way to add chromium args in this package. +#pio.kaleido.scope.chromium_args += ("--single-process",) class BasePlot: """A class that provides methods for building Plotly plot's common features From 6a0e26285771106b4cd066cf2222bc9cf4bdc228 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Mon, 30 Jun 2025 11:41:31 -0600 Subject: [PATCH 07/32] Comment out soon-to-be deprecated call to plolty.io.kaleido.scope --- metplotpy/plots/base_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 0a7e139d7..a85bcf461 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -31,7 +31,7 @@ # NOTE: this may result in GHA tests failing due to impending deprecations in kaleido # kaleido.scope will be deprecated after September 2025 -# using plotly.io.defaults.* instead is recommended, but there is no way to add chromium args in this package. +# using plotly.io.defaults.* is recommended, but there is no way to add chromium args in this package. #pio.kaleido.scope.chromium_args += ("--single-process",) class BasePlot: From ea2f281831122abbf0c730b5f1964d397c358c16 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 08:44:19 -0600 Subject: [PATCH 08/32] add call to install chrome --- metplotpy/plots/base_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index a85bcf461..03bc84e80 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -33,7 +33,7 @@ # kaleido.scope will be deprecated after September 2025 # using plotly.io.defaults.* is recommended, but there is no way to add chromium args in this package. #pio.kaleido.scope.chromium_args += ("--single-process",) - +pio.install_chrome() class BasePlot: """A class that provides methods for building Plotly plot's common features like title, axis, legend. From 9cbe7cb230858e956b1bebb8a0a699fa3a6a6bbb Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 08:45:23 -0600 Subject: [PATCH 09/32] Add test_* to trigger and setup test to use test_requirements.txt --- .github/workflows/unit_tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 514f051a6..2a971058d 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -11,6 +11,7 @@ on: - feature_* - main_* - bugfix_* + - test_* paths-ignore: - 'docs/**' - '.github/pull_request_template.md' @@ -48,7 +49,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi # Checking the branch name, not necessary but useful when setting things up. From d62311664da3648461b7e75a9ff4a7e9a5e59897 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 08:46:03 -0600 Subject: [PATCH 10/32] To test plotly/kaleido updates --- test_requirements.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test_requirements.txt diff --git a/test_requirements.txt b/test_requirements.txt new file mode 100644 index 000000000..443427f44 --- /dev/null +++ b/test_requirements.txt @@ -0,0 +1,16 @@ +Cartopy==0.24.0 +matplotlib==3.10.3 +metcalcpy==2.1 +metpy==1.7.0 +netcdf4==1.7.2 +numpy==2.3.1 +pandas==2.3.0 +Pillow==11.3.0 +plotly==6.1.1 +pyproj==3.7.1 +pyresample==1.34.2 +PyYAML==6.0.2 +PyYAML==6.0.2 +scipy==1.16.0 +setuptools==80.9.0 +xarray==2025.6.1 From 0b6f185c3180a14a96b80ca19297bdf9edc8161f Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:25:09 -0600 Subject: [PATCH 11/32] Try using kaleido_get_chrome_sync --- metplotpy/plots/base_plot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 03bc84e80..fca03e877 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -33,7 +33,14 @@ # kaleido.scope will be deprecated after September 2025 # using plotly.io.defaults.* is recommended, but there is no way to add chromium args in this package. #pio.kaleido.scope.chromium_args += ("--single-process",) -pio.install_chrome() + +# this does not work +#pio.install_chrome() + +import kaleido +kaleido.get_chrome_sync() + + class BasePlot: """A class that provides methods for building Plotly plot's common features like title, axis, legend. From dd03b3fae1dd65d750fdef51819e1c2033754790 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:30:23 -0600 Subject: [PATCH 12/32] Update import to use ploty.io._kaleido --- metplotpy/plots/base_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index fca03e877..1a9af6804 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -37,7 +37,7 @@ # this does not work #pio.install_chrome() -import kaleido +from plotly.io import _kaleido as kaleido kaleido.get_chrome_sync() From 2422aa8bc256cdf2836f5fa59941352297f68656 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:37:26 -0600 Subject: [PATCH 13/32] Using latest import, invoke the get_chrome() method instead of get_chrome_sync() --- metplotpy/plots/base_plot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 1a9af6804..099bcde9e 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -38,7 +38,8 @@ #pio.install_chrome() from plotly.io import _kaleido as kaleido -kaleido.get_chrome_sync() +#kaleido.get_chrome_sync() +kaleido.get_chrome() class BasePlot: From 183315995c9f323a1efcd5fd33794cfe43b341db Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:53:00 -0600 Subject: [PATCH 14/32] explicitly pip install kaleido 1.0 --- .github/workflows/unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 2a971058d..5d523831b 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -50,6 +50,7 @@ jobs: run: | python -m pip install --upgrade pip if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi + pip install --upgrade kaleido # Checking the branch name, not necessary but useful when setting things up. From 96d33fa8b3e56b8e66aae52932cfa71a4a07ad4f Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:57:51 -0600 Subject: [PATCH 15/32] Add Google Chrome action --- .github/workflows/unit_tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 5d523831b..c692971ad 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,6 +52,9 @@ jobs: if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi pip install --upgrade kaleido + - name: Install Google Chrome for Plotly + - uses: browser-actions/setup-chrome@v1 + - run: chrome --version # Checking the branch name, not necessary but useful when setting things up. # - name: Extract branch name From 0a37fce9c55a2a42ef3056996a5780e678713ea4 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 09:59:29 -0600 Subject: [PATCH 16/32] fix syntax error --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index c692971ad..4ff88b09e 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,8 +52,8 @@ jobs: if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi pip install --upgrade kaleido + - uses: browser-actions/setup-chrome@v1 - name: Install Google Chrome for Plotly - - uses: browser-actions/setup-chrome@v1 - run: chrome --version # Checking the branch name, not necessary but useful when setting things up. From fec296140d7969ac5fd9b55f2a3d54b708de610c Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 10:02:49 -0600 Subject: [PATCH 17/32] remove - from the run command --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 4ff88b09e..097c558ce 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -54,7 +54,7 @@ jobs: - uses: browser-actions/setup-chrome@v1 - name: Install Google Chrome for Plotly - - run: chrome --version + run: chrome --version # Checking the branch name, not necessary but useful when setting things up. # - name: Extract branch name From e00bfffcfeb263fae71d023acd92e763273cf14a Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 11:29:58 -0600 Subject: [PATCH 18/32] Explicitly get the Chrome environment, bypass the calls to plotly.io.kaleido for installing chrome, which already exists --- metplotpy/plots/base_plot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 099bcde9e..6b615dbf7 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -38,8 +38,7 @@ #pio.install_chrome() from plotly.io import _kaleido as kaleido -#kaleido.get_chrome_sync() -kaleido.get_chrome() +os.environ['CHROME_INSTALL'] class BasePlot: From 141ec5e7bfcaaf09564d68a7924ef41df3a3e2b0 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 11:31:05 -0600 Subject: [PATCH 19/32] Set up a CHROME_INSTALL path and save it as an environment --- .github/workflows/unit_tests.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 097c558ce..628b006fc 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -22,6 +22,8 @@ on: pull_request: types: [opened, reopened, synchronize] + + jobs: build: @@ -52,10 +54,17 @@ jobs: if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi pip install --upgrade kaleido + - uses: browser-actions/setup-chrome@v1 - name: Install Google Chrome for Plotly - run: chrome --version - + run: | + chrome --version + #${{ steps.setup-chrome.outputs.chrome-path }} --version + no-sudo + env: + CHROME_INSTALL: ${{ steps.setup-chrome.outputs.chrome-path }} --version + + # Checking the branch name, not necessary but useful when setting things up. # - name: Extract branch name # shell: bash From 077517d85422c3d4e11813ad421cd68a8c045455 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 11:33:33 -0600 Subject: [PATCH 20/32] remove no-sudo --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 628b006fc..28911e57a 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -60,9 +60,9 @@ jobs: run: | chrome --version #${{ steps.setup-chrome.outputs.chrome-path }} --version - no-sudo env: CHROME_INSTALL: ${{ steps.setup-chrome.outputs.chrome-path }} --version + # Checking the branch name, not necessary but useful when setting things up. From 6119238885ebfd8783b3acd48fb58e9051b7d1ab Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 11:34:26 -0600 Subject: [PATCH 21/32] removed extra line at top of file --- .github/workflows/unit_tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 28911e57a..c4e7d233a 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -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: From c49572bc0dc3f561d40897b9b5a1714e7ef55ff5 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 11:35:27 -0600 Subject: [PATCH 22/32] move env definition by indenting --- .github/workflows/unit_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index c4e7d233a..4a2aff212 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -59,8 +59,8 @@ jobs: run: | chrome --version #${{ steps.setup-chrome.outputs.chrome-path }} --version - env: - CHROME_INSTALL: ${{ steps.setup-chrome.outputs.chrome-path }} --version + env: + CHROME_INSTALL: ${{ steps.setup-chrome.outputs.chrome-path }} --version From ceab0dc7b28c94ddad332c04d027de94fcac0d3a Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 13:00:42 -0600 Subject: [PATCH 23/32] Removed all imports that didn't work and the soon to be deprecated reference to kaleido.scope. Running after installing Chrome without setting an ENV variable. --- metplotpy/plots/base_plot.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 6b615dbf7..4db7ad98e 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -34,11 +34,6 @@ # using plotly.io.defaults.* is recommended, but there is no way to add chromium args in this package. #pio.kaleido.scope.chromium_args += ("--single-process",) -# this does not work -#pio.install_chrome() - -from plotly.io import _kaleido as kaleido -os.environ['CHROME_INSTALL'] class BasePlot: From 659ffae868a7c56224c66d51378b93801d6c4f2a Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 13:02:13 -0600 Subject: [PATCH 24/32] Remove any attempt to set an env --- .github/workflows/unit_tests.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 4a2aff212..87672e045 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -58,9 +58,7 @@ jobs: - name: Install Google Chrome for Plotly run: | chrome --version - #${{ steps.setup-chrome.outputs.chrome-path }} --version - env: - CHROME_INSTALL: ${{ steps.setup-chrome.outputs.chrome-path }} --version + ${{ steps.setup-chrome.outputs.chrome-path }} --version From 71c7df87c5296fd295d8a4803a7550e0396d946e Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 13:04:05 -0600 Subject: [PATCH 25/32] Remove the --version to the path under the chrome installation --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 87672e045..a030e2ada 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -58,7 +58,7 @@ jobs: - name: Install Google Chrome for Plotly run: | chrome --version - ${{ steps.setup-chrome.outputs.chrome-path }} --version + ${{ steps.setup-chrome.outputs.chrome-path }} From 89f1ff6fcce604300dd360220bdca5f81413870f Mon Sep 17 00:00:00 2001 From: bikegeek Date: Tue, 1 Jul 2025 13:06:51 -0600 Subject: [PATCH 26/32] Remove skip --- test/scatter/test_scatter.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/scatter/test_scatter.py b/test/scatter/test_scatter.py index e232dd3d9..aee0593f4 100644 --- a/test/scatter/test_scatter.py +++ b/test/scatter/test_scatter.py @@ -23,7 +23,6 @@ def read_config(config_filename) -> dict: return parms except yaml.YAMLError as exc: print(exc) -@pytest.mark.skip("Skipping until GHA issue with Python 3.12 and kaleido are resolved") def test_files_exist(): """ Generate a scatter plot from reformatted MPR Usecase data and From fb2ec739577c59e2a0f86b06263b67bfc73ffa8e Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:00:56 -0600 Subject: [PATCH 27/32] Update test_requirements.txt match up with requirements.txt except for kaleido and plotly --- test_requirements.txt | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/test_requirements.txt b/test_requirements.txt index 443427f44..eeb792d5f 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,16 +1,21 @@ -Cartopy==0.24.0 -matplotlib==3.10.3 -metcalcpy==2.1 -metpy==1.7.0 -netcdf4==1.7.2 -numpy==2.3.1 -pandas==2.3.0 -Pillow==11.3.0 -plotly==6.1.1 -pyproj==3.7.1 -pyresample==1.34.2 -PyYAML==6.0.2 -PyYAML==6.0.2 -scipy==1.16.0 -setuptools==80.9.0 -xarray==2025.6.1 + +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 From 41791d4cec0087b4b7a3afef39c25b59caa67f83 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Thu, 3 Jul 2025 07:58:25 -0600 Subject: [PATCH 28/32] Attempt to get chrome via kaleido.get_chrome_sync() --- metplotpy/plots/base_plot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 0a7e139d7..43f515fcf 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -31,8 +31,12 @@ # NOTE: this may result in GHA tests failing due to impending deprecations in kaleido # kaleido.scope will be deprecated after September 2025 -# using plotly.io.defaults.* instead is recommended, but there is no way to add chromium args in this package. -#pio.kaleido.scope.chromium_args += ("--single-process",) +# using plotly.io.defaults.* instead is recommended, but there is no way to add chromium args in this package +# because Chrome is being used from now on. +# pio.kaleido.scope.chromium_args += ("--single-process",) +# pio.install_chrome() +import kaleido +kaleido.get_chrome_sync() class BasePlot: """A class that provides methods for building Plotly plot's common features From afb2d387d329e18c644672e586e88fce66eb3d9e Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:48:03 -0600 Subject: [PATCH 29/32] Update unit_tests.yaml Comment out installation of Chrome for now but don't delete it in the event that Chrome will need to be explicitly available. --- .github/workflows/unit_tests.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index a030e2ada..c040725a4 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -54,11 +54,11 @@ jobs: 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 }} +# - uses: browser-actions/setup-chrome@v1 +# - name: Install Google Chrome for Plotly +# run: | +# chrome --version +# ${{ steps.setup-chrome.outputs.chrome-path }} From 9a32b75ce16a62027a6d854384ed49c24f4c5cdd Mon Sep 17 00:00:00 2001 From: MWin <3753118+bikegeek@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:50:36 -0600 Subject: [PATCH 30/32] Update base_plot.py Remove old comment and update to reflect upcoming changes to kaleido --- metplotpy/plots/base_plot.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index 3c6dfa95a..9b35d5102 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -27,11 +27,8 @@ from .config import Config from metplotpy.plots.context_filter import ContextFilter -# set kaleido to use single process to prevent GPU errors in containers -# NOTE: this may result in GHA tests failing due to impending deprecations in kaleido - -# kaleido.scope will be deprecated after September 2025 - +# 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() From e080cc251967cbd7ddf7ba1133b52bbd73cdf572 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Thu, 3 Jul 2025 14:18:17 -0600 Subject: [PATCH 31/32] Replace test_requirements.txt with requirements.txt --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index c040725a4..702a7ec89 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -50,7 +50,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install --upgrade kaleido From 18691548eef72f64d5fa82436b3b092cccf38f12 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Thu, 3 Jul 2025 14:19:30 -0600 Subject: [PATCH 32/32] Update Plotly from 6.0.0 to 6.1.1 and kaleido from 0.2.1 to 1.0.0 --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3aafb80e6..eeb792d5f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ + 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 @@ -8,7 +9,7 @@ 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 @@ -18,4 +19,3 @@ eofs>=2.0.0 cartopy>=0.24.0 scikit-learn>=1.6.1 cmocean>=4.0.3 -