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
73 stars 17 forks source link

New Entity pane tab living alongside parameter value and parameter definition tabs #2102

Open DillonJ opened 1 year ago

DillonJ commented 1 year ago

Currently we have parameter value and parameter definition tabs. The scope of what they display is controlled via selection in the tree. E.g. if an object class is selected, in the parameter value pane, we see only parameter values for those object classes.

However, objects/entities themselves have properties, like a description, meta data. We currently have no nice way of seeing this information, all at once. The idea here is to add a third tab that would show objects and their descriptive properties, like their description, metadata etc. This pane would work similarly to the parameter value pane where what the objects it displays is driven by selection in the tree. This pane could be used to easily create new objects/entities by simply copying and pasting into it.

We have also been discussing the issue of alternatives defined for entities and this new object/entity pane could be the place to display and manage what alternatives are associated with an object/entity, so you can have alternative "versions" of objects that each have different descriptions etc.

This new object/entity pane could also be used to display and manage "special" parameter/relationships as discussed here This. For example, the temporal structure of an entity (for example) as discussed below... but that might need more thinking through since this is not something generic and temporal structures don't apply to all entities. My feeling is that this object/entity pane should only show was is universal to all entities. and not be entity specific, which is what relationships and parameters are for.

manuelma commented 1 year ago

So the metadata and description won't depend on the alternative. Each entity will have a single description and a single metadata, and multiple alternatives. That means that showing entities, alternatives, metadata and description will lead to duplicating the two latter for each row in the table. That would be awkward in my opinion.

We already have an entity metadata pane which is quite capable, have you tried it @DillonJ ? Maybe we can extend it to also handle description (or maybe the description itself should go into the metadata)?

Anyways, what I think we need is a new pane to show and edit entities and their alternatives exclusively. This could allow us to prune some of the stuff we don't want to see in the entity tree, like the node__temporal_block class.

DillonJ commented 1 year ago

I want to see a list of object/entites and their descriptions and metadata whose scope is connected to the tree selection just like parameter value pane etc. If this isn't the place for alternatives, then I would consider another pane... but a tree controlled entity pane with desciptions and metadata is what i would like to see so I can see a tree selection controlled list of entities that I can paste into to create new entities

DillonJ commented 1 year ago

@manuelma how does one access this metadata pane?

Edit. sorry I see it - it's a docked widget - it's nice but it's not serving the purpose I'm describing above

manuelma commented 1 year ago

Yes, I think we can use the current entity_metadata pane for that. The 'problem' with that widget at the moment is if an entity does not have metadata, then it is not shown but we could show it anyways while leaving the metadata column empty.

Another thought, when creating new entities the user will need to be able to specify the alternative, so in my opinion we clearly need an entity_alternative pane.

@manuelma how does one access this metadata pane?

It's one of the docks in DB editor (hamburger -> View -> Docks... -> item metadata)

manuelma commented 1 year ago

it's nice but it's not serving the purpose I'm describing above

@DillonJ The 'problem' with that widget at the moment is if an entity does not have metadata, then it is not shown but we could show it anyways while leaving the metadata column empty. I think that would go a long way in achieving the functionality you want.

DillonJ commented 1 year ago

Perhaps - add the description field, make it connected to the tree selection and have it as a tab with parameter value and parameter definition tabs... and have it support copy/paste to create new entities

jkiviluo commented 1 year ago

Probably best to update these after we've moved to the entity version.