Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d198f62
move exception handling to prevent error from iterating over None
georgemccabe Jan 22, 2026
b846020
Refactor pytests: write output to test/test_output (unless METPLOTPY_…
georgemccabe Jan 22, 2026
d920485
create directory for pointsN file creation so it doesn't fail when di…
georgemccabe Jan 22, 2026
5bdec44
fix bug in write_html and remove_html functions that cause output fil…
georgemccabe Jan 23, 2026
0e1ba74
use os.makedirs to ensure that parent directories are handled
georgemccabe Jan 23, 2026
31f9935
PyCharm files that we may want to ignore
georgemccabe Jan 23, 2026
22418da
create directory before writing file to prevent failure when director…
georgemccabe Jan 23, 2026
8d99261
remove logic that appears to not have any purpose
georgemccabe Jan 23, 2026
85e0cf4
improve logging when verifying config values to alert users which par…
georgemccabe Jan 23, 2026
c8d7bc6
include log output when tests fail for easier debugging, do not creat…
georgemccabe Jan 23, 2026
89fcdd8
delete file that was accidentally committed
georgemccabe Jan 23, 2026
8db8638
add missing import
georgemccabe Jan 23, 2026
acd1283
removed files that were not allowing hovmoeller tests to find top lev…
georgemccabe Jan 23, 2026
f15fea4
only capture INFO or lower logs to avoid excessive DEBUG logs from ex…
georgemccabe Jan 23, 2026
ec77d7b
more updates to tests to write to output directory, removed redundant…
georgemccabe Jan 23, 2026
96d57ff
create directories before writing files to prevent failures when dire…
georgemccabe Jan 23, 2026
7d3c364
update wind_rose and tcmpr_plots tests to write to output directory
georgemccabe Jan 27, 2026
45d3e99
create directory containing output image if it does not already exist…
georgemccabe Jan 27, 2026
17ef868
fix bug in logic to read skew_t data
georgemccabe Jan 27, 2026
2ed2e59
commit PyCharm files to avoid seeing diffs -- will resolve this later
georgemccabe Jan 27, 2026
1e00817
create directory for output file
georgemccabe Jan 27, 2026
3820b3d
remove accidental slash
georgemccabe Jan 27, 2026
cd46593
create test_output directory under wherever the top-level test output…
georgemccabe Jan 27, 2026
6c7d0ec
update scatter, skew_t, and taylor_diagram tests to write to output d…
georgemccabe Jan 27, 2026
923e01a
revise performance_diagram tests to write to output directory
georgemccabe Jan 27, 2026
908ddd6
clean up tests to be consistent with other tests
georgemccabe Jan 27, 2026
05b78c0
update tests to run pytest from top level to run all tests and set PY…
georgemccabe Jan 28, 2026
20c62e1
don't need to set PYTHONPATH because METcalcpy is installed via pip
georgemccabe Jan 28, 2026
52bc09d
use raw string to get rid of SyntaxWarning for invalid escape sequenc…
georgemccabe Jan 28, 2026
1e8a4f1
merged develop and resolved conflicts
georgemccabe Jan 28, 2026
bbd4246
Merge branch 'develop' into feature_555_replace_plotly
georgemccabe Feb 4, 2026
98bfd24
update testing workflow to 1) write test output to directory and uplo…
georgemccabe Feb 4, 2026
38679c7
fix branch matrix by using a separate job to define it, then read it …
georgemccabe Feb 4, 2026
9c293c9
add missing dependency
georgemccabe Feb 4, 2026
eeff04d
write output relative to runner workspace
georgemccabe Feb 4, 2026
bf3d185
add job to diff results if more than 1 branch is tested, added workfl…
georgemccabe Feb 4, 2026
b8c942d
install diff util dependencies
georgemccabe Feb 4, 2026
02012c1
use develop branch version of diff_util.py and add skip keywords over…
georgemccabe Feb 5, 2026
54b0cea
use both branches from PR instead of always develop
georgemccabe Feb 5, 2026
64bc3c5
clean up skew_t tests to ensure only list of expected PNG files are c…
georgemccabe Feb 6, 2026
c25b415
run tests for both Python 3.12 and Python 3.13
georgemccabe Feb 6, 2026
ed8cf64
use pandas <3 for Python 3.12 to ensure backwards compatibility and p…
georgemccabe Feb 6, 2026
aafffd9
set the workflow title to 'branch vs. branch' for workflow dispatch runs
georgemccabe Feb 6, 2026
642c93a
handle multiple test_*.py files in a test directory by checking the n…
georgemccabe Feb 17, 2026
8f94c44
Merge branch 'develop' into feature_555_replace_plotly
georgemccabe Feb 24, 2026
ef7167a
Feature 556 copy base and common functionality (#566)
bikegeek Feb 25, 2026
e166cc2
Feature #558 bar, box, histogram, revision_box (#568)
georgemccabe Mar 9, 2026
9b3bf89
Feature #569 ROC diagram, reliability diagram, and ens_ss - plotly to…
georgemccabe Mar 13, 2026
468111e
Feature #557 line, eclv, equivalance testing bounds, revision series,…
georgemccabe Apr 14, 2026
e56416a
Feature #573 Wind Rose, MPR, Hovmoeller, TCMPR, 2D Histogram (#574)
georgemccabe Apr 14, 2026
26856e8
update version of upload-artifact action to remove Node.js 20 depreca…
georgemccabe Apr 17, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:

steps:

- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# Disable shallow clones for better analysis
fetch-depth: 0

- name: Set up Python 3.12
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand Down
165 changes: 134 additions & 31 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 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
name: Python Tests
run-name: ${{ github.event_name == 'workflow_dispatch' && format('{0} vs. {1}', github.ref_name, github.event.inputs.version_to_compare) || github.event.head_commit.message || github.event.pull_request.title }}

on:
push:
Expand All @@ -17,57 +18,159 @@ on:
- '.github/ISSUE_TEMPLATE/**'
- '**/README.md'
- '**/LICENSE.md'

pull_request:
types: [opened, reopened, synchronize]


workflow_dispatch:
inputs:
version_to_compare:
description: 'Name of branch to diff against current branch (default: develop)'
default: 'develop'

jobs:
# New job to determine which branches to test
setup-matrix:
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.set-branches.outputs.branches }}
python-versions: ${{ steps.set-py-versions.outputs.versions }}
steps:
- id: set-py-versions
run: echo "versions=[\"3.12\", \"3.14\"]" >> $GITHUB_OUTPUT
- id: set-branches
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "branches=[\"${{ github.head_ref }}\", \"${{ github.base_ref }}\"]" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "branches=[\"${{ github.ref_name }}\", \"${{ github.event.inputs.version_to_compare }}\"]" >> $GITHUB_OUTPUT
else
echo "branches=[\"${{ github.ref_name }}\"]" >> $GITHUB_OUTPUT
fi

build:

needs: setup-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
python-version: ${{ fromJSON(needs.setup-matrix.outputs.python-versions) }}
branch: ${{ fromJSON(needs.setup-matrix.outputs.branches) }}

steps:
- uses: actions/checkout@v4
# checkout METplotpy
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}

# checkout METcalcpy
- uses: actions/checkout@v6
with:
repository: dtcenter/METcalcpy
path: METcalcpy
ref: develop

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Retrieve METcalcpy repository develop branch
run: |
metcalcpy_dir="$RUNNER_WORKSPACE/METcalcpy"
git clone https://github.com/dtcenter/METcalcpy ${metcalcpy_dir}
cd ${metcalcpy_dir}
git -C ${metcalcpy_dir} checkout develop
python -m pip install -e ${metcalcpy_dir}


- name: Install dependencies
run: |
python -m pip install --upgrade pip

# force pandas to be less than 3.0.0 for Python 3.12 to test for backward compatibility
if [ ${{ matrix.python-version }} == "3.12" ]; then pip install "pandas<3"; fi

python -m pip install -e METcalcpy
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
# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
# id: extract_branch

- name: Download additional input data
run: |
mkdir -p ${{ runner.workspace }}/test_input
wget -P ${{ runner.workspace }}/test_input \
https://dtcenter.ucar.edu/dfiles/code/METplus/METplotpy_Data/develop/sample_data_METplotpy.tgz
tar -xzf ${{ runner.workspace }}/test_input/sample_data_METplotpy.tgz -C ${{ runner.workspace }}/test_input

- name: Test with pytest
run: |
export METPLOTPY_TEST_OUTPUT=${{ runner.workspace }}/output/${{ matrix.branch }}
export METPLOTPY_TEST_INPUT=${{ runner.workspace }}/test_input/METplotpy_Data
pytest

- name: Upload output data artifact
uses: actions/upload-artifact@v6
with:
name: test_output_${{ matrix.branch }}_${{ matrix.python-version }}
path: ${{ runner.workspace }}/output/${{ matrix.branch }}/test_output

compare-output:
needs: [setup-matrix, build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(needs.setup-matrix.outputs.python-versions) }}

# Only run if there are exactly 2 branches to compare
if: fromJSON(needs.setup-matrix.outputs.branches)[1] != null
steps:
- name: Download artifacts
run: |
mkdir -p "${{ runner.workspace }}/artifacts"
gh run download --repo "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" --dir "${{ runner.workspace }}/artifacts"
env:
GH_TOKEN: ${{ github.token }}

- name: Checkout diff_util.py from METplus
uses: actions/checkout@v6
with:
repository: dtcenter/METplus
ref: develop
sparse-checkout: |
metplus/util/diff_util.py
sparse-checkout-cone-mode: false
path: METplus

- name: Set up Python for diff_util.py
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies for diff
run: |
pip install pillow pandas numpy netCDF4

- name: Run diff_util.py
run: |
# Extract branch names from the setup-matrix output
# assumes 1st branch is the current branch and the 2nd branch is the truth data
OUTPUT_BRANCH=$(echo '${{ needs.setup-matrix.outputs.branches }}' | jq -r '.[0]')
TRUTH_BRANCH=$(echo '${{ needs.setup-matrix.outputs.branches }}' | jq -r '.[1]')

# Define paths to the downloaded data
# Note: upload-artifact v4 nested paths differently, usually named by 'name' provided in upload
OUTPUT_DIR="${{ runner.workspace }}/artifacts/test_output_${OUTPUT_BRANCH}_${{ matrix.python-version }}"
TRUTH_DIR="${{ runner.workspace }}/artifacts/test_output_${TRUTH_BRANCH}_${{ matrix.python-version }}"
DIFF_DIR="${{ runner.workspace }}/diff_${{ matrix.python-version }}"

echo "Comparing $OUTPUT_DIR and $TRUTH_DIR"

# Ensure directories exist before running script
if [ -d "$OUTPUT_DIR" ] && [ -d "$TRUTH_DIR" ]; then
export METPLUS_DIFF_SKIP_KEYWORDS=".html,_rank.png"
python METplus/metplus/util/diff_util.py "$TRUTH_DIR" "$OUTPUT_DIR" --debug --save_diff --diff_dir "$DIFF_DIR"
else
echo "One or both data directories are missing."
ls ${{ runner.workspace }}/artifacts
exit 1
fi

- name: Upload diff artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: diff_${{ matrix.python-version }}
path: ${{ runner.workspace }}/diff_${{ matrix.python-version }}
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/vulnerabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
selftest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: install
run: |
python -m venv env/
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ __pycache__/
# files that are generated when package is installed
build/
metplotpy.egg-info/

.DS_Store
2 changes: 1 addition & 1 deletion docs/Users_Guide/histogram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ configuration file, which serves as a starting point for creating a
will be built.

**NOTE**: This default configuration file is automatically loaded by
**histogram.py, rank_hist.py, prob_hist.py, and rel_hist.py.**
**hist.py, rank_hist.py, prob_hist.py, and rel_hist.py.**


.. literalinclude:: ../../metplotpy/plots/config/hist_defaults.yaml
Expand Down
1 change: 0 additions & 1 deletion docs/Users_Guide/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ describes the bugfix, enhancement, or new feature:
METplotpy Version 4.0.0-beta1 release notes (20260205)
======================================================


.. dropdown:: New Plots

None
Expand Down
2 changes: 1 addition & 1 deletion docs/Users_Guide/reliability_diagram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ corresponding to the *plot_filename* setting in the default
configuration file. Otherwise, this will need to be specified in
*plot_filename* in the **minimal_box.yaml** file):

.. literalinclude:: ../../test/reliability_diagram/custom_reliability_use_defaults.yaml
.. literalinclude:: ../../test/reliability_diagram/minimal_reliability.yaml

Copy this file to the working directory:

Expand Down
2 changes: 1 addition & 1 deletion docs/copyright.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ============================*
# ** Copyright UCAR (c) 1992 - 2024
# ** Copyright UCAR (c) 1992 - 2026
# ** University Corporation for Atmospheric Research (UCAR)
# ** National Center for Atmospheric Research (NCAR)
# ** Research Applications Lab (RAL)
Expand Down
28 changes: 0 additions & 28 deletions internal/scripts/installation/modulefiles/3.1.0_derecho

This file was deleted.

25 changes: 0 additions & 25 deletions internal/scripts/installation/modulefiles/3.1.0_gaea

This file was deleted.

25 changes: 0 additions & 25 deletions internal/scripts/installation/modulefiles/3.1.0_hera

This file was deleted.

25 changes: 0 additions & 25 deletions internal/scripts/installation/modulefiles/3.1.0_jet

This file was deleted.

Loading
Loading