From 1de715530749018c334f8244a1d4cd25b61ef5a6 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Sun, 11 Feb 2024 21:02:04 -0500 Subject: [PATCH] Use cached_statepoint in groupby. --- signac/project.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/signac/project.py b/signac/project.py index 2b739bb81..f05829958 100644 --- a/signac/project.py +++ b/signac/project.py @@ -1913,7 +1913,7 @@ def keyfunction(job): else: def keyfunction(job): - return job.sp[stripped_key] + return job.cached_statepoint[stripped_key] else: if _is_doc_key(key): @@ -1924,7 +1924,7 @@ def keyfunction(job): else: def keyfunction(job): - return job.sp.get(stripped_key, default) + return job.cached_statepoint.get(stripped_key, default) elif isinstance(key, Iterable): sp_keys = [] @@ -1943,7 +1943,7 @@ def keyfunction(job): def keyfunction(job): return tuple( - [job.sp[k] for k in sp_keys] + [job.cached_statepoint[k] for k in sp_keys] + [job.document[k] for k in doc_keys] ) @@ -1951,7 +1951,7 @@ def keyfunction(job): def keyfunction(job): return tuple( - [job.sp.get(k, default) for k in sp_keys] + [job.cached_statepoint.get(k, default) for k in sp_keys] + [job.document.get(k, default) for k in doc_keys] )