Conversation
bemcdonnell
approved these changes
Feb 26, 2026
bemcdonnell
approved these changes
Feb 26, 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 new date and time handling features to the SWMM Python Toolkit, adds comprehensive tests for these features, and improves the handling of output data arrays. The changes enhance the toolkit's ability to work with simulation timestamps and date series, and ensure the accuracy and consistency of time-aligned data between solver and output modules.
New date/time functionality:
get_date_time,get_date_series, anddecode_dateare now available in the Python API, allowing users to access and interpret simulation times and date series directly. ([[1]](https://github.com/pyswmm/swmm-python/pull/164/files#diff-a691acca3324b074cae74b3a5df81b4de08e5d3a2f9c3b299d368bbaa7958e7fR23-R26),[[2]](https://github.com/pyswmm/swmm-python/pull/164/files#diff-92dfce8fa8e4e10201cfd5fc3d666df9f130b17ae8c5e15180d3422be7cddae1L64-R77))[swmm-toolkit/src/swmm/toolkit/output.iR94-R110](https://github.com/pyswmm/swmm-python/pull/164/files#diff-92dfce8fa8e4e10201cfd5fc3d666df9f130b17ae8c5e15180d3422be7cddae1R94-R110))Testing enhancements:
test_output.pyto verify the correctness of date/time functions, including checks for timestamp spacing, monotonicity, and decoded date components. ([swmm-toolkit/tests/test_output.pyR88-R146](https://github.com/pyswmm/swmm-python/pull/164/files#diff-eb18eab07b5171bc7ae0aeabf274a073a7745f509c5633fa259573e40b13f436R88-R146))test_series.pythat compares time-aligned series from the solver and output modules, ensuring their values and timestamps match within a specified decimal digit tolerance. ([swmm-toolkit/tests/test_series.pyR1-R160](https://github.com/pyswmm/swmm-python/pull/164/files#diff-bfdeaa8681e908a2c4109b5743e4a703e7de6df65f2719581384fcabe6d29fe8R1-R160))Other improvements:
[swmm-toolkit/swmm-solverL1-R1](https://github.com/pyswmm/swmm-python/pull/164/files#diff-ce7799fb6c1a9cc3bc4c34f98191307182b02e8260fbd4bb468eaab187e28051L1-R1))0.17.0to reflect the addition of new features. ([swmm-toolkit/pyproject.tomlL7-R7](https://github.com/pyswmm/swmm-python/pull/164/files#diff-44715816921842ae50648cd26c8d83bb0ef7543ba7dcddd3cb1451e48d5e0f44L7-R7))[swmm-toolkit/src/swmm/toolkit/output.iL64-R77](https://github.com/pyswmm/swmm-python/pull/164/files#diff-92dfce8fa8e4e10201cfd5fc3d666df9f130b17ae8c5e15180d3422be7cddae1L64-R77))These changes collectively improve the toolkit's usability for time-based analyses and strengthen the reliability of its Python bindings.