Conversation
|
What is now the conceptual difference between the packer and the exporter? I'm interested in your vision on the overall pyETM architecture with this addition! |
I can see why you ask - maybe it's a bit over-designed. I see the packer as the orchestrator - collecting and packaging the individual packs in a format agnostic way. The excel exporter specifically formats excel outputs, but in theory a parquet_exporter or json_exporter (etc) could be added alongside to extend the export formats. I think before the packer was doing a lot, and it may not have been so easy to extend. Hopefully this approach makes it easier to export to alternative formats. Arguably the packer is still doing too much, or is still too architecturally complex. I think abstracting the 'from excel' methods out as well would mean you could have multiple importers and exporters that end up in the unified packer. However perhaps that is out of scope for now. |
Context
Decouples excel formatting from the packer, introducing ExportDataCollection as a format-agnostic container for scenario export data. This enables multiple formats of export such as excel, parquet, json and csv.
Implemented changes
Usage
Excel exports (same):
packer.to_excel("output.xlsx", include_inputs=True)New multi-format exports:
Or serialize to dict for JSON
Related
Closes #133
Closes #130
Checklist