Skip to content

PairedData bug fix and CSV functionality#116

Merged
ultjeremy merged 6 commits into
HydrologicEngineeringCenter:mainfrom
ultjeremy:paired-data-csv
Jul 15, 2026
Merged

PairedData bug fix and CSV functionality#116
ultjeremy merged 6 commits into
HydrologicEngineeringCenter:mainfrom
ultjeremy:paired-data-csv

Conversation

@ultjeremy

Copy link
Copy Markdown
Collaborator
  • Added to_csv and read_csv functionality for PairedData type
  • Fixed bug in curve_count(), which returned number of ordinates rather than number of curves
  • Added extensive testing suite for CSV functionality

@ultjeremy
ultjeremy requested review from ktarbet and oskarhurst July 14, 2026 22:40
Comment thread src/hecdss/dss_csv.py
value_str: str = row[2].strip()
try:
value: float = float(value_str) if value_str else 0.0
value: float = float(value_str) if value_str else DEFAULT_MISSING_VALUE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have a valid date-time, but not a valid value, let's use DEFAULT_MISSING_VALUE instead of skipping the row (to preserve regular intervals).

And for DEFAULT_MISSING_VALUE let's use either null or the DSS definition of Missing: -3.402823466e+38 . check if there is an example with time-series to keep consistency.

@ultjeremy
ultjeremy marked this pull request as ready for review July 15, 2026 20:00
@ultjeremy
ultjeremy merged commit fd34746 into HydrologicEngineeringCenter:main Jul 15, 2026
2 checks passed
@ultjeremy
ultjeremy deleted the paired-data-csv branch July 15, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants