Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address issue #103 and #102 #105

Merged
merged 12 commits into from
Sep 28, 2020
Merged

Address issue #103 and #102 #105

merged 12 commits into from
Sep 28, 2020

Conversation

jennwuu
Copy link
Contributor

@jennwuu jennwuu commented Sep 28, 2020

Closes #103
Identified an issue when subcatchments are named numerically (e.g. 1, 2, 3, 4), the polygon dataframe index is automatically converted to integer from string, so when coords column is assigned is not updated.

See example_1 model input.

Closes #102
Add flexibility in columns depending on swmm version number.

I add function to extract swmm version from .rpt file
https://github.com/jennwuu/swmmio/blob/cd03ae9b7cb1c7358b62e0b2d9259ab90c746f7b/swmmio/core.py#L459-L467

I add a new section in header yaml to allow more columns based on swmm version

https://github.com/jennwuu/swmmio/blob/cd03ae9b7cb1c7358b62e0b2d9259ab90c746f7b/swmmio/utils/text.py#L216-L224

swmm5_version:
  1.13:
    rpt_sections:
      Subcatchment Runoff Summary:
        - Name
        - TotalPrecip
        - TotalRunon
        - TotalEvap
        - TotalInfil
        - ImpervRunoff
        - PervRunoff
        - TotalRunoffIn
        - TotalRunoffMG
        - PeakRunoff
        - RunoffCoeff

@jennwuu jennwuu added the bug label Sep 28, 2020
@jennwuu jennwuu requested a review from aerispaha September 28, 2020 17:40
@jennwuu jennwuu self-assigned this Sep 28, 2020
@jennwuu
Copy link
Contributor Author

jennwuu commented Sep 28, 2020

@aerispaha, not sure why travis fails though

Copy link
Member

@aerispaha aerispaha left a comment

Choose a reason for hiding this comment

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

I like this a lot. I have a few comments and I'm going to push a couple changes momentarily. Thanks!

swmmio/tests/data/Example6.rpt Outdated Show resolved Hide resolved
swmmio/tests/data/__init__.py Outdated Show resolved Hide resolved
swmmio/utils/text.py Outdated Show resolved Hide resolved
@aerispaha aerispaha added this to the v0.4.5 milestone Sep 28, 2020
@aerispaha aerispaha merged commit 889c6e3 into pyswmm:master Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants