Skip to content

MNT: Refactor CfRadial1#387

Open
syedhamidali wants to merge 2 commits into
openradar:mainfrom
syedhamidali:main
Open

MNT: Refactor CfRadial1#387
syedhamidali wants to merge 2 commits into
openradar:mainfrom
syedhamidali:main

Conversation

@syedhamidali

Copy link
Copy Markdown
Member

Cleans up the CfRadial1 writer ahead of v1.0: descriptive helper names;
_extract_root_dataset
_combine_sweeps
_map_radar_calibration
_collect_sweep_metadata
clearer locals/named constants, fixes the calibs bool/variable collision, more robust error handling (history attr, missing elevation, dtree=None), and a shared _build_cfradial1_dataset reused by transform.to_cfradial1 to drop ~40 duplicated lines. No behavior change; all CfRadial1/transform tests pass.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.35%. Comparing base (79ba495) to head (fc3dd98).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
+ Coverage   94.20%   94.35%   +0.15%     
==========================================
  Files          29       29              
  Lines        6417     6398      -19     
==========================================
- Hits         6045     6037       -8     
+ Misses        372      361      -11     
Flag Coverage Δ
notebooktests 0.00% <0.00%> (ø)
unittests 94.35% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add tests for the previously-uncovered branches in the CfRadial1 writer so
codecov patch coverage passes:
- to_cfradial1(filename=None) auto-derives the output name
- calculate_sweep_indices warns and skips a sweep group with no elevation
- _build_cfradial1_dataset raises ValueError on dtree=None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Refactor CfRadial1 writer code quality before v1.0

1 participant