Skip to content

Commit 64ca58f

Browse files
committed
Add integration tests and update pytest markers
- Introduced a new test file `test_network_correction.py` containing comprehensive unit tests for the `NetworkIDWCorrector` and `NetworkOICorrector` classes. - Implemented various test cases covering single and multiple observations, handling of NaN values, and validation of correction behavior. - Added integration tests that utilize real data files to ensure the correctness of the correction algorithms in practical scenarios. - Updated `pyproject.toml` to include a new pytest marker for integration tests.
1 parent a4d70fd commit 64ca58f

4 files changed

Lines changed: 1558 additions & 0 deletions

File tree

.github/network-ec-correction.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Network-Aware EC Correction — pydsm Core Algorithm
2+
3+
See full design document in the `dsm2ui` repository:
4+
5+
`dsm2ui/.github/network-ec-correction.md`
6+
7+
## Summary
8+
9+
This package provides the core algorithm:
10+
11+
- `pydsm/analysis/network_correction.py`
12+
- `NetworkCorrector` (ABC)
13+
- `NetworkIDWCorrector` — directed graph, IDW weights
14+
- `NetworkOICorrector` — undirected graph, OI with exponential/channel-direction kernel
15+
- `exponential_kernel()`, `channel_direction_kernel()` — kernel factories
16+
- `extract_channel_end_values()` — QualH5 → channel-end DataFrame
17+
- `snap_stations_to_channel_ends()` — project x/y stations onto network
18+
19+
The animation integration (`CorrectedQualH5ConcentrationReader`, CLI options,
20+
UI correction card) lives in `dsm2ui/animate.py` and `dsm2ui/animate_cli.py`.
21+
22+
## Test location
23+
24+
`pydsm/tests/test_network_correction.py` — 47 tests covering IDW, OI, both
25+
kernels, SPD guarantee, missing-observation handling, and real H5 integration.

0 commit comments

Comments
 (0)