spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
69 stars 17 forks source link

Refactor "file_pack" resources using the datapackage interface? #1698

Open manuelma opened 2 years ago

manuelma commented 2 years ago

I feel file_pack resources are the same concept as datapackage. The implementation of file_pack is a bit invasive in the sense we need to have a lot of if type == "file_pack" in different places. I wonder if it would be possible to refactor using a seamless method. I'm thinking we can at least move all those ifs to methods in ProjectItemResource that are called from the places where it's needed. In this way, it would be easier to see what's special about "file_pack".

soininen commented 2 years ago

I agree the file_pack stuff is a hack build on top of a system that was essentially designed for single files. It'd be great if we managed to improve it.