Skip to content

Commit

Permalink
chore: remove unused/nonfunctional cache on graphcontainer (#30)
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Koppen <[email protected]>
  • Loading branch information
vincentkoppen authored Feb 4, 2025
1 parent acc890f commit d28aba7
Showing 1 changed file with 0 additions and 10 deletions.
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

0 comments on commit d28aba7

Please sign in to comment.