UDST / developer

Redesigned UrbanSim developer/pro forma models
https://udst.github.io/developer/
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Print warning about insufficient units only if target_units is a number #66

Closed hanase closed 5 years ago

hanase commented 5 years ago

In our case, self.target_units is a dictionary that contains the required number of units for each building type. The selection itself is handled by our own custom_selection_func. Because the self.target_units is not a number, the warning about insufficient units is always printed, regardless of the actual numbers.

Here I added a condition that the warning should be printed only if self.target_units is a number. Other possibility is to print the warning only if custom_selection_func is not set.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 35


Totals Coverage Status
Change from base Build 34: 0.005%
Covered Lines: 786
Relevant Lines: 821

💛 - Coveralls
janowicz commented 5 years ago

Thanks for this @hanase! Looks good.