Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix diff tests #2217

Merged
merged 19 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2c0332a
update diff util and test that changes properly diff failling diffs, …
georgemccabe Jun 14, 2023
905b409
turn off use case
georgemccabe Jun 14, 2023
c2b6e3a
catch any exception that occurs in NetCDF file diff, ci-skip-unit-tests
georgemccabe Jun 14, 2023
5fdee80
catch any exception from file diff instead of just in NetCDF diff, ci…
georgemccabe Jun 14, 2023
21af4b2
forgot to trigger diff, ci-run-diff, ci-skip-unit-tests
georgemccabe Jun 14, 2023
2172134
use pandas.isnull instead of numpy.isnan to prevent exceptions from o…
georgemccabe Jun 14, 2023
eefaa0c
capture failure in diff script, ci-run-diff, ci-skip-unit-tests
georgemccabe Jun 14, 2023
0201daa
ignore .idea directory that was auto-generated
georgemccabe Jun 14, 2023
194088d
fix incorrect syntax, ci-run-diff, ci-skip-unit-tests
georgemccabe Jun 14, 2023
8017d99
handle failing comparison when NetCDF values are stored as a string, …
georgemccabe Jun 14, 2023
d7981f2
Preserve backwards compatibility by forcing TC_PAIRS_RUN_ONCE=False i…
georgemccabe Jun 14, 2023
edbbe39
Merge branch 'bugfix_gha_diff' of github.com:dtcenter/METplus into bu…
georgemccabe Jun 14, 2023
c8a80b2
add pandas to diff conda environment used for diff tests in GHA to pr…
georgemccabe Jun 14, 2023
353fd15
turn off use cases after tests succeeded
georgemccabe Jun 14, 2023
52f5ceb
update apt-get to fix poppler-utils install error, add specific versi…
georgemccabe Jun 15, 2023
1421c18
run use case to test that diff.v5.1 conda env was created properly, c…
georgemccabe Jun 15, 2023
b29a7ac
check if values are completely equal inside _is_equal_rounded functio…
georgemccabe Jun 15, 2023
2b9bea5
turn off all use case groups before re-opening PR
georgemccabe Jun 15, 2023
0cbcff2
if both netcdf values are masked, consider them equal
georgemccabe Jun 15, 2023
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
2 changes: 2 additions & 0 deletions .github/jobs/run_difference_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ matrix_categories=$1
artifact_name=$2

.github/jobs/setup_and_run_diff.py ${matrix_categories} $artifact_name
ret=$?

if [ "$( ls -A ${RUNNER_WORKSPACE}/diff)" ]; then
echo "upload_diff=true" >> $GITHUB_OUTPUT
Expand All @@ -21,3 +22,4 @@ if [ "$( ls -A ${RUNNER_WORKSPACE}/diff)" ]; then
fi

echo "upload_diff=false" >> $GITHUB_OUTPUT
exit $ret
2 changes: 1 addition & 1 deletion .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
{
"category": "s2s",
"index_list": "3",
"run": true
"run": false
},
{
"category": "s2s",
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ ENV/
# pytest cache files
*.pytest_cache*

.idea

# tilda files generated by emacs
*~

Expand Down
7 changes: 5 additions & 2 deletions internal/scripts/docker_env/scripts/diff_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

################################################################################
# Environment: diff.v5.1
# Last Updated: 2023-01-31 (mccabe@ucar.edu)
# Last Updated: 2023-06-14 (mccabe@ucar.edu)
# Notes: Adds packages needed to run differences tests to compare output to
# truth data.
# Python Packages:
# pandas==2.0.2
# pillow==9.2.0
# pdf2image==1.16.0
#
Expand All @@ -23,8 +24,10 @@ ENV_NAME=diff.${METPLUS_VERSION}
BASE_ENV=netcdf4.${METPLUS_VERSION}

conda create -y --clone ${BASE_ENV} --name ${ENV_NAME}
conda install -y --name ${ENV_NAME} -c conda-forge pandas==2.0.2
conda install -y --name ${ENV_NAME} -c conda-forge pillow==9.2.0

apt install -y poppler-utils
apt-get update
apt-get install -y poppler-utils

conda install -y --name ${ENV_NAME} -c conda-forge pdf2image==1.16.0
Loading