USEPA / ElectricityLCI

Creative Commons Zero v1.0 Universal
24 stars 10 forks source link

Duplicate method #208

Open dt-woods opened 8 months ago

dt-woods commented 8 months ago

It is unclear what the distinction is between exchange_table_creation_ref_cons and exchange_table_creation_ref methods in process_dictionary_writer.py. Note that the data parameter is unused in both. I found a reference in eia_io_trading.py, but that didn't provide much clarity.

https://github.com/USEPA/ElectricityLCI/blob/2232c41f2cb4fd333ad59c8710aa55906e6a7ed3/electricitylci/process_dictionary_writer.py#L139

dt-woods commented 8 months ago

Looks like it might be a bad copy-and-paste of exchange_table_creation_input_genmix.

m-jamieson commented 7 months ago

I believe the intent there is to create the reference flow for the eventual consumption mix unit process (electricity_at_grid_flow should be electricity_at_user_flow), but this looks to be handled later by https://github.com/USEPA/ElectricityLCI/blob/master/electricitylci/process_dictionary_writer.py#L663. My guess would be that we could get rid of the call to this and get rid of the function, and the consumption mix processes would still be generated.

dt-woods commented 7 months ago

Mmm. The method is referenced in olca_schema_consumption_mix in eia_io_trading.py, which is called by write_consumption_mix_to_dict in __init__.py, which is (I believe) in the default trading block of main in main.py. I will fix the flow, though.