catalyst-cooperative / pudl

The Public Utility Data Liberation Project provides analysis-ready energy system data to climate advocates, researchers, policymakers, and journalists.
https://catalyst.coop/pudl
MIT License
456 stars 106 forks source link

Simplify table:method in datastore.py and etl.py #412

Closed gschivley closed 4 years ago

gschivley commented 4 years ago

Both pudl.workspace.datastore and pudl.etl have functions with a bunch of if/else statements depending on the datasource. As more datasources are added to PUDL this is going to get unwieldy. I'd propose a structure of defining small new functions that are accessed via a dictionary. Really, anything that gets rid of a long list of if/else statements.

zaneselvans commented 4 years ago

This is... definitely true. I was envisioning this happening as part of #374 and #182, which I would like to take care of before we add EIA 861 or the ISO/LMP data.

zaneselvans commented 4 years ago

Closing this as a duplicate of #374 and #182 -- we will get rid of the excessive if/else statements!