Skip to content

Commit

Permalink
assert curve indices are between 0 and 1 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Aug 26, 2024
1 parent 3767f1b commit ff90828
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_trait_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,17 @@ def test_younger_monocot_pipeline(rice_pipeline_output_folder):
assert (
rice_traits["curve_index"].fillna(0) >= 0
).all(), "curve_index in rice_traits contains negative values"
assert rice_traits["curve_index"].fillna(0).max() <= 1, "curve_index in rice_traits contains values greater than 1"
assert (
all_traits["curve_index_median"] >= 0
).all(), "curve_index in all_traits contains negative values"
assert all_traits["curve_index_median"].max() <= 1, "curve_index in all_traits contains values greater than 1"
assert (
all_traits["crown_curve_indices_mean_median"] >= 0
).all(), "crown_curve_indices_mean_median in all_traits contains negative values"
assert (
all_traits["crown_curve_indices_mean_median"] <= 1
).all(), "crown_curve_indices_mean_median in all_traits contains values greater than 1"
assert (
(0 <= rice_traits["crown_angles_proximal_p95"])
& (rice_traits["crown_angles_proximal_p95"] <= 180)
Expand Down Expand Up @@ -214,6 +219,9 @@ def test_older_monocot_pipeline(rice_10do_pipeline_output_folder):
assert (
all_traits["crown_curve_indices_mean_median"] >= 0
).all(), "crown_curve_indices_mean_median in all_traits contains negative values"
assert (
all_traits["crown_curve_indices_mean_median"] <= 1
).all(), "crown_curve_indices_mean_median in all_traits contains values greater than 1"
assert (
(0 <= rice_traits["crown_angles_proximal_p95"])
& (rice_traits["crown_angles_proximal_p95"] <= 180)
Expand Down

0 comments on commit ff90828

Please sign in to comment.