Skip to content

Commit

Permalink
ADD: Add check for sweep in first part
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Mar 28, 2024
1 parent fab2d61 commit 5b2258c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xradar/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,16 @@ def get_sweep_keys(dt):
try:
# Try to set the second part of the tree key to an int
int(parts[1])
# Check for "sweep" in the first part of the key
assert "sweep" in parts[0]
sweep_group_keys.append(key)

# This would fail with strings - ex. sweep_group_attrs
except ValueError:
pass

# This would fail if "sweep" not in key - ex. radar_parameters
except AssertionError:
pass

Check warning on line 522 in xradar/util.py

View check run for this annotation

Codecov / codecov/patch

xradar/util.py#L521-L522

Added lines #L521 - L522 were not covered by tests

return sweep_group_keys

0 comments on commit 5b2258c

Please sign in to comment.