Skip to content

Commit

Permalink
πŸ› Visualization multiple connections in same direction (#1028)
Browse files Browse the repository at this point in the history
# Description
### Before

![image](https://github.com/user-attachments/assets/c1be212b-d993-4d5a-93c1-d7fd37d51795)
#### After

![image](https://github.com/user-attachments/assets/de00ee3b-66ea-46ea-844a-7d62971fb762)


## Bump

- [x] Patch
- [ ] Minor
- [ ] Skip

## Changelog
### Fixed

- The `neat.show.data_model()` now supports visualization of multiple
connections in the same directions between two views/classes.
  • Loading branch information
doctrino authored Mar 4, 2025
1 parent a3a4785 commit d3b11d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cognite/neat/_rules/analysis/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,9 @@ def view_query_by_id(

return query_configs

def _dms_di_graph(self, format: Literal["data-model", "implements"] = "data-model") -> nx.DiGraph:
"""Generate a DiGraph from the DMS rules."""
di_graph = nx.DiGraph()
def _dms_di_graph(self, format: Literal["data-model", "implements"] = "data-model") -> nx.MultiDiGraph:
"""Generate a MultiDiGraph from the DMS rules."""
di_graph = nx.MultiDiGraph()

rules = self.dms

Expand Down Expand Up @@ -515,11 +515,11 @@ def _dms_di_graph(self, format: Literal["data-model", "implements"] = "data-mode

return di_graph

def _info_di_graph(self, format: Literal["data-model", "implements"] = "data-model") -> nx.DiGraph:
"""Generate DiGraph representing information data model."""
def _info_di_graph(self, format: Literal["data-model", "implements"] = "data-model") -> nx.MultiDiGraph:
"""Generate MultiDiGraph representing information data model."""

rules = self.information
di_graph = nx.DiGraph()
di_graph = nx.MultiDiGraph()

# Add nodes and edges from Views sheet
for class_ in rules.classes:
Expand Down

0 comments on commit d3b11d0

Please sign in to comment.