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

Organize public-facing `pudl.transform` interface with selective imports #1925

Open zaneselvans opened 1 year ago

zaneselvans commented 1 year ago

Note: Do NOT import the individual transform functions, since they're meant to be used as methods.

Questions:

Should the function/parameters be split out into a separate module from the AbstractTableTransformer, since both of those are likely to grow? Seems like no... If we have people access them via pudl.transform.* namespace, then we can move them around later as needed without breaking a bunch of code -- we'll just need to change where they get imported from in __init__.py

Should the individual transform functions and multicolumn transform functions which are wrapped in methods be made _private(), to indicate that they are (primarily) meant to be accessed as methods in the TableTransformer classes?

zaneselvans commented 1 year ago

I created hierarchical imports in all the init.py files, but am putting off this bigger interface organization question until later after conversation with @cmgosnell