diff --git a/CHANGES b/CHANGES index c3964d27..db12b5b1 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,8 @@ Fixes - Fix the dE method in u_nk2series to use the difference between two lambda columns instead of using the next lambda column or the previous column for the last window (issue #299, PR #300). + - work around hanging tests on Mac M1 by using Path.glob instead of glob.glob + in ABFE workflow (issue #309, PR #310). 12/12/2022 xiki-tempula, orbeckst diff --git a/src/alchemlyb/workflows/abfe.py b/src/alchemlyb/workflows/abfe.py index 7b3bff00..df58b893 100644 --- a/src/alchemlyb/workflows/abfe.py +++ b/src/alchemlyb/workflows/abfe.py @@ -1,7 +1,7 @@ import logging import os -from glob import glob from os.path import join +from pathlib import Path import matplotlib.pyplot as plt import numpy as np @@ -81,8 +81,8 @@ def __init__( f"{suffix} under directory {dir} produced by " f"{software}" ) - reg_exp = dir + "/**/" + prefix + "*" + suffix - self.file_list = list(glob(reg_exp, recursive=True)) + reg_exp = "**/" + prefix + "*" + suffix + self.file_list = list(map(str, Path(dir).glob(reg_exp))) if len(self.file_list) == 0: raise ValueError(f"No file has been matched to {reg_exp}.")