aiidalab / aiidalab/aiidalab-widgets-base

Better design of `_StructureDataBaseViewer` and `StructureDataViewer`

Offen
#342 3 Kommentare 1 Reaktion 3 zugewiesene Personen Beansprucht von @unkcpz Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
10
Forks
19
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
20

Beschreibung

As a developer, one would like to have a clear separation of concern between `_StructureDataBaseViewer` and `StructureDataViewer` allowing for easy further improvements and modifications.

The base class is meant to provide a common functionality of structure viewer and (yet to come) trajectory viewer. Unfortunately, due to some design flows it cannot be easily done with the current implementation.

Herein, after a meeting with @unkcpz and @danielhollas, we agreed to have a closer look at those two classes and come up with a better design.

## Known issues

1. Both `structure` and `displayed_structure` traits are defined in the `StructureDataViewer` class but used in `_StructureDataBaseViewer`.
2. Point 1. also makes it impossible to use `_StructureDataBaseViewer` as the base class for the trajectory viewer.
3. An addition of new displayed properties requires new traits to `_StructureDataBaseViewer`, which is not optimal as most of the features are stored in the `structure` trait.

Pinging @danielhollas and @unkcpz for additional input.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.