DSD-DBS / py-capellambse

A Python 3 headless implementation of the Capella modeling tool.
https://dsd-dbs.github.io/py-capellambse/
Apache License 2.0
50 stars 8 forks source link

Remove duplicated attributes #434

Open ewuerger opened 3 days ago

ewuerger commented 3 days ago

We need to finally remove the .functions attribute on Components because there is allocated_functions. The same for realized_components. There is somehow realized_logical_components which is the exact same. Duplicated information should go from the API. Let's investigate the public API.

Wuestengecko commented 2 days ago

Most of these dups are already deprecated anyways and so will be removed with the next major bump anyways. As for the ones that aren't, I was planning on looking through this at some not-so-distant point as well and adding deprecation markers there too.

Is there any reason to remove them now? You're making it sound somewhat urgent.

ewuerger commented 1 day ago

Displaying attributes on various model elements in the capella model explorer is a default feature. With the duplication of attributes under different names comes confusion and a bloated view for the user. It also displays the ambiguity in capellambse's API. Implementing templates for model elements in the model explorer should be seen as a chance to refine the public API of capellambse. :)

The ones I enumerated are just the attributes that I know of for quite a while. The deprecation warning probably, I'm not completely sure here, lasted for quite some time.

The additional logic for filtering the duplicated attributes out (needs to be assessed individually on every model element type) can be spared when it is just removed here. The effect: A cleaner appearance and more concise information of model elements in the model explorer views.