-
Notifications
You must be signed in to change notification settings - Fork 44
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
write_inp_section changes - don't change the Polygons header #182
write_inp_section changes - don't change the Polygons header #182
Conversation
@aerispaha I'm not sure how to test the solution. Can I find a method in swmmio that reads the header in the inp file to compare it with the header after doing replace_inp_section? |
@BuczynskiRafal, I'm guessing you're adding this feature because of some kind of text version control issue. I think the best way to test it is to add a second INP file with |
@aerispaha @bemcdonnell Please review my PR. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BuczynskiRafal thanks for this great contribution to swmmio
! Overall, your bug fix seems to work great.
My only request is that we remove the new swmmio/tests/data/example_polygons.inp
file from this PR, and use a test inp file that already exists in the repo. I'd also suggest we refactor the unit test as I described below for a couple reasons:
- this way test files aren't left behind if this test fails
- I'd prefer to emphasize the
model.inp.<section> = <dataframe>
pattern for updating models, rather than using thereplace_inp_section
function directly.
Let me know what you think!
@aerispaha Thanks for the good points. I've made the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, @BuczynskiRafal! I'll get this integrated into the next release asap
Closes #181