austinorr / swmmnetwork

SWMMNetwork helps users of EPA SWMM 5.1 perform water quality and load reduction calculations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swmmnetwork allows for mixed dtypes in `self`

lucashtnguyen opened this issue · comments

While iterating thorugh the nodes in line156 these can be mixed types. This causes line222 to fail if the node is an int.

This is ultimately an upstream issue with ScenarioLoading but I think that SwmmNetwork needs to also enforce string types so that if any([i in node for i in self.outfall_flags]) does not fail.

In SwmmNetwork, node id's are allowed to be int, but id names read from the SWMM5.1 report file and/or input file should all be strings. I believe this is addressed fully by #5 and a few tweaks to how the id's are split into volume reduced flags, or treatment flags, so I'll close this. I have written a unit test that completes as I expect with int and string types in the SwmmNetwork object, and we'll also add a test for files loaded via the scenario builder objects.

Thanks!