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

Add coverage for the LID_USAGE section #193

Merged
merged 4 commits into from
May 15, 2023

Conversation

aerispaha
Copy link
Member

Summary

This introduces coverage for the [LID_USAGE] inp section to the swmmio.inp API.

Makes progress on #57

@aerispaha
Copy link
Member Author

@asselapathirana I created this PR with your fork. However, your fork needs to be updated with the latest changes from aerispaha:swmmio, and merge conflict need to be resolved before we can move forward with this PR. I think the best way to do this is to include only the getter and setter methods for the lid_usage inp section, that you've proposed.

Can you update your fork of swmmio accordingly?

Thanks so much for contributing!

@asselapathirana
Copy link
Collaborator

Will update the code and get back. Thanks!

@asselapathirana
Copy link
Collaborator

asselapathirana commented May 3, 2023 via email

Copy link
Member Author

@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.

Thanks for this PR, @asselapathirana! I have just a couple minor changes requested - with those resolved, we can get this into the next release.

for section in self._sections:
# reformate the [SECTION] to section (and _section_df)
sect_id = section.translate({ord(i): None for i in '[]'}).lower()
sect_id_private = '_{}_df'.format(sect_id)
#print(sect_id_private)
Copy link
Member Author

Choose a reason for hiding this comment

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

Can you remove this commented line?

INFLOWS: [Node, Constituent, Time Series, Type, Mfactor, Sfactor, Baseline, Pattern]
LID_USAGE: [Subcatchment, 'LID_Process', Number, Area, Width, InitSat, FromImp, ToPerv, RptFile, DrainTo, FromPerv,]
Copy link
Member Author

Choose a reason for hiding this comment

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

Please replace this line with the following:

  LID_USAGE: [Subcatchment, LID_Process, Number, Area, Width, InitSat, FromImp, ToPerv, RptFile, DrainTo, FromPerv,]

This edit just removes the extra white space. Thanks!

return self._lid_usage_df

@property
def raingages(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

This raingages getter section is already defined above around line 731. Please remove this property.

@@ -498,6 +499,20 @@ def headers(self):

return self._rpt_section_details

@property
def external_outflow_volume(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

This is really cool! It is making think, though, that we need to provide coverage for the whole Flow Routing Continuity section of the rpt file. What do you think?

If you agree, maybe we can tackle that in a separate issue.
Then we could extend that logic to provide coverage for the rest of the rpt sections that follow this structure.

Copy link
Member Author

Choose a reason for hiding this comment

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

This could be handled in #194

@aerispaha
Copy link
Member Author

@asselapathirana I'm going to merge these changes, and then I'll address my comments in a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants