Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/power_grid_model_ds/_core/model/graphs/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import dataclasses
from dataclasses import dataclass
from pathlib import PosixPath
from typing import Generator

import numpy as np
Expand Down Expand Up @@ -119,15 +118,6 @@ def make_inactive(self, branch: BranchArray) -> None:
graph.delete_branch(from_ext_node_id=from_node, to_ext_node_id=to_node)
setattr(self, field.name, graph)

def cache(self, cache_dir: PosixPath, compress: bool) -> PosixPath:
"""Cache the container into a folder with .pkl and graph files"""
cache_dir.mkdir(parents=True, exist_ok=True)

for field in self.graph_attributes:
graph = getattr(self, field.name)
graph.cache(cache_dir=cache_dir, graph_name=field.name, compress=compress)
return cache_dir

@classmethod
def from_arrays(cls, arrays: MinimalGridArrays) -> "GraphContainer":
"""Build from arrays"""
Expand Down