From 82f321bd656f4a7f0a5d6216de23589c15a845d6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 13 Aug 2024 18:41:59 -0500 Subject: [PATCH] ensure notebook-testing script fails when notebooks fail (#1424) The notebook-testing CI job in this repo does not actually cause a loud CI failure if any errors are detected in notebooks. That's because of a `bash` mistake I made in #1407... that PR moved notebook-checking into a function, but didn't add a `set -E` to be sure errors from inside that function were appropriately trapped. This PR fixes that: * ensures that notebook failures actually cause CI failures * fixes 2 typos in `nyc_taxi_years_correlation.ipynb` code - *(not caught in #1422 because of this CI script bug)* Context: https://github.com/rapidsai/cuspatial/pull/1422#pullrequestreview-2212919011 ## Notes for Reviewers ### How I tested this Originally did not skip any notebooks. Saw the failures in one of the notebooks cause an actual merge-blocking CI failure. Build link: https://github.com/rapidsai/cuspatial/actions/runs/10199784404/job/28219162698?pr=1424 # Authors: - James Lamb (https://github.com/jameslamb) - Bradley Dice (https://github.com/bdice) Approvers: - Ray Douglass (https://github.com/raydouglass) - Mark Harris (https://github.com/harrism) - https://github.com/jakirkham URL: https://github.com/rapidsai/cuspatial/pull/1424 --- ci/test_notebooks.sh | 2 +- notebooks/nyc_taxi_years_correlation.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index 44353684a..c6cba4a15 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (c) 2020-2024, NVIDIA CORPORATION. -set -euo pipefail +set -eEuo pipefail . /opt/conda/etc/profile.d/conda.sh diff --git a/notebooks/nyc_taxi_years_correlation.ipynb b/notebooks/nyc_taxi_years_correlation.ipynb index d13ce0d3b..d1c377e6c 100644 --- a/notebooks/nyc_taxi_years_correlation.ipynb +++ b/notebooks/nyc_taxi_years_correlation.ipynb @@ -130,8 +130,8 @@ "taxi_zone_rings = cuspatial.GeoSeries.from_polygons_xy(\n", " polygons_xy=taxi_zones.polygons.xy,\n", " ring_offset=taxi_zones.polygons.ring_offset,\n", - " part_offsets=taxi_zones.polygons.part_offset,\n", - " geometry_offsets=cudf.Series(range(len(taxi_zones.polygons.part_offset)))\n", + " part_offset=taxi_zones.polygons.part_offset,\n", + " geometry_offset=cudf.Series(range(len(taxi_zones.polygons.part_offset)))\n", ")" ] },