Skip to content
Closed
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
16 changes: 14 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,18 @@ 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
25 changes: 25 additions & 0 deletions internal/scripts/installation/modulefiles/3.1.0_ursa
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#%Module######################################################################
##
## METplotpy
##
proc ModulesHelp { } {
puts stderr "Sets up the paths and environment variables to use the METplotpy-3.1.0.
*** For help see the official MET webpage at http://www.dtcenter.org/met/users ***"
}

prereq intel-oneapi-compilers/2025.1.1

setenv METPLOTPY_SOURCE /contrib/METplotpy/METplotpy-3.1.0
setenv METPLOTPY_BASE /contrib/METplotpy/METplotpy-3.1.0

prepend-path PATH /scratch3/BMC/dtc/METplus/miniconda/miniconda3/envs/metplus_v6.1_py3.12/bin
prepend-path PATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/contributed
prepend-path PATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/plots/performance_diagram
prepend-path PATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/plots
prepend-path PATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy
prepend-path PATH /contrib/METplotpy/METplotpy-3.1.0
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/contributed
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/plots/performance_diagram
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy/plots
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.1.0/metplotpy
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.1.0
25 changes: 25 additions & 0 deletions internal/scripts/installation/modulefiles/3.2.0_ursa
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#%Module######################################################################
##
## METplotpy
##
proc ModulesHelp { } {
puts stderr "Sets up the paths and environment variables to use the METplotpy-3.2.0.
*** For help see the official MET webpage at http://www.dtcenter.org/met/users ***"
}

prereq intel-oneapi-compilers/2025.1.1

setenv METPLOTPY_SOURCE /contrib/METplotpy/METplotpy-3.2.0
setenv METPLOTPY_BASE /contrib/METplotpy/METplotpy-3.2.0

prepend-path PATH /scratch3/BMC/dtc/METplus/miniconda/miniconda3/envs/metplus_v6.1_py3.12/bin
prepend-path PATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/contributed
prepend-path PATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/plots/performance_diagram
prepend-path PATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/plots
prepend-path PATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy
prepend-path PATH /contrib/METplotpy/METplotpy-3.2.0
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/contributed
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/plots/performance_diagram
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy/plots
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.2.0/metplotpy
prepend-path PYTHONPATH /contrib/METplotpy/METplotpy-3.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +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 mark_inset

fig = plt.figure(4)
Expand Down
8 changes: 6 additions & 2 deletions metplotpy/plots/base_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
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