cai-causal-graph 0.5.4.dev2__tar.gz → 0.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/PKG-INFO +1 -1
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/__init__.py +1 -1
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/causal_graph.py +4 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/exceptions.py +3 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/pyproject.toml +1 -1
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/LICENSE +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/README.md +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/graph_components.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/identify_utils.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/interfaces.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/metadata_handler.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/time_series_causal_graph.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/type_definitions.py +0 -0
- {cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/utils.py +0 -0
|
@@ -741,6 +741,10 @@ class CausalGraph(HasIdentifier, HasMetadata, CanDictSerialize, CanDictDeseriali
|
|
|
741
741
|
edge.destination
|
|
742
742
|
)
|
|
743
743
|
|
|
744
|
+
# raise an error if reverse edge from destination to source has already been defined
|
|
745
|
+
if self._edges_by_source[destination].get(source) is not None:
|
|
746
|
+
raise CausalGraphErrors.ReverseEdgeExistsError()
|
|
747
|
+
|
|
744
748
|
self._edges_by_source[source][destination] = edge
|
|
745
749
|
self._edges_by_destination[destination][source] = edge
|
|
746
750
|
|
|
@@ -45,6 +45,9 @@ class CausalGraphErrors:
|
|
|
45
45
|
class EdgeExistsError(Exception):
|
|
46
46
|
"""Error raised when edge already exists in the graph."""
|
|
47
47
|
|
|
48
|
+
class ReverseEdgeExistsError(Exception):
|
|
49
|
+
"""Error raised when the reverse edge already exists in the graph."""
|
|
50
|
+
|
|
48
51
|
class EdgeDoesNotExistError(Exception):
|
|
49
52
|
"""Error raised when edge does not exist in the graph."""
|
|
50
53
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cai_causal_graph-0.5.4.dev2 → cai_causal_graph-0.5.5}/cai_causal_graph/time_series_causal_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|