-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tree printer to include all object types
Change the implementation of 'get_model_tree' to use the '_GRPC_PROPERTIES' class attribute, and thus include all newly-added object types in the representation. The style of the tree has changed in some ways: - The root node now shows the model name, instead of always 'Model' - Objects (name or id) are distinguished from collections by wrapping the string in single quotes - The additional nesting level for 'Materials', 'Selection Rules', and other 'logical' groupings which are not part of the PyACP hierarchy has been removed [1] [1] This change might be debatable since the ACP GUI does show this nesting level. Since the PyACP hierarchy does not include them, it would be complicated to add them in a generic way, however. To discuss: should the collection names be capitalized (as done currently), or not (matching the PyACP attribute names)? The new tree structure can be seen in the updated test cases. Partially addresses #348, interactive tree support in Jupyter notebooks is still missing.
- Loading branch information
Showing
2 changed files
with
134 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters