[Style] Check db_creator.py for consistent style #30
Labels
Comp:Core
This issue has to do with the main bulk of the code or document. (methods, main content)
Difficulty:1-Beginner
This issue does not require expert knowledge and may be a good issue for new contributors.
Priority:4-Low
This work is valuable, but not urgent or mission critical.
Type:Style
Is related to coding style guide compliance (e.g. PEP8 or google C++ style guide).
Type:Test
Is related to software testing. Failing tests, necessary new tests, test frameworks, etc.
The
db_creator
file should be checked for consistent style. For example, some functions that depend on regions will loop throughtech.regions
rather than the keys of the particular parameter.However, not all technologies have data for ALL places. I.e. Place 1 might have a capacity limit, but Place 2 does not. In which case, trying to call tech.max_capacity[place] would break the database creation. In some cases, there is a try/except block that attempts to access the data if it exists, otherwise it skips. There is an easier way to do this however, and that is to loop through the keys of the dictionary
tech.max_capacity.
That is one example where code should be made consistent throughout the module. There are sure to be others.
This issue should be resolved using Open Development practices.
The text was updated successfully, but these errors were encountered: