Conversation
Closed
There was a problem hiding this comment.
Pull request overview
This PR enhances the SWMM Toolkit Python bindings with improved date/time handling capabilities and validates alignment between solver and output module time series. The changes enable extraction of date/time information from output files and ensure that solver and output modules produce consistent time-aligned results.
Changes:
- Added Python API functions (
get_date_time,get_date_series,decode_date) with corresponding SWIG interface definitions and typemaps for date/time component extraction - Introduced comprehensive tests validating date/time operations, time series monotonicity, and solver-output alignment with custom decimal digit accuracy checks
- Updated SWMM solver submodule to bring in upstream improvements
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| swmm-toolkit/tests/test_series.py | New test file comparing time-aligned solver and output series using custom decimal digit checks |
| swmm-toolkit/tests/test_output.py | Added tests for date/time extraction, date series, and date decoding with validation of monotonicity and component plausibility |
| swmm-toolkit/swmm-solver | Updated submodule commit reference |
| swmm-toolkit/src/swmm/toolkit/output_rename.i | Added Python API name mappings for new date/time functions |
| swmm-toolkit/src/swmm/toolkit/output.i | Extended SWIG typemaps for date components and double arrays, disabled exception handling for decode_date |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
karosc
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the SWMM Toolkit Python bindings, focusing on improved date/time handling and series alignment between solver and output modules. The main changes include new functions for date/time extraction and decoding, expanded SWIG typemaps for date components, and comprehensive tests to ensure correctness and alignment of time series data.
Date/Time Handling Improvements:
get_date_time,get_date_series) and decode date components (decode_date) in the SWIG interface and renamed them for Python API clarity. [1] [2]SMO_decodeDatein the SWIG interface.Testing and Validation:
test_output.pyfor date/time extraction, date series, and date decoding, validating monotonicity, spacing, and plausibility of decoded components.test_series.pyto compare time-aligned solver and output series, ensuring matching time axes and values within tolerance using custom decimal digit checks.Submodule Update: