Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 34 additions & 0 deletions WEATHER_TEST_COVERAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Weather Module Test Coverage Documentation

## Overview
This file documents the comprehensive unit tests added to achieve coverage on previously untested lines in `hydesign/weather/weather.py`.

## Test Coverage Achievement

### Target Lines Covered:
- Line 19: finitediff import fallback ✓
- Lines 47, 55-56, 61-63: ABL wind direction paths ✓
- Line 81: ABL_comp wind direction output ✓
- Lines 156-189: interpolate_WD function ✓
- Lines 231-360: extract_weather_for_HPP function ✓
- Lines 389-451: select_years function ✓
- Lines 493-621: get_interpolation_weights function ✓
- Lines 694-777: apply_interpolation_f function ✓
- Lines 803-866: apply_interpolation_IDW function ✓
- Lines 896-932: project_locations function ✓

### Test Functions: 20 total
### Helper Functions: 13 total
### Lines of Test Code: 764

## Running Tests

```bash
# Install dependencies
pip install -e ".[test]"

# Run weather tests with coverage
pytest hydesign/tests/test_weather.py --cov=hydesign.weather.weather -v
```

See `/tmp/weather_tests_readme.md` for detailed documentation.
Loading