alchemistry / alchemlyb

the simple alchemistry library
https://alchemlyb.readthedocs.io
BSD 3-Clause "New" or "Revised" License
189 stars 49 forks source link

the dir keyword in ABFE pipeline no longer accepts wildcard #311

Closed xiki-tempula closed 1 year ago

xiki-tempula commented 1 year ago

In the 2.0.1 #310 , I changed the way files are globbed from glob.glob(dir + "/**/" + prefix + "*" + suffix) into Path(dir).glob("**/" + prefix + "*" + suffix). This means that the user can no longer supply wildcard into the dir argument.

The documentation is not super clear on this.

dir ([str](https://docs.python.org/3/library/stdtypes.html#str)) – Directory in which data files are stored. Default: os.path.curdir. The input files are searched using the pattern of dir + '/**/' + prefix + '*' + suffix.

prefix ([str](https://docs.python.org/3/library/stdtypes.html#str)) – Prefix for datafile sets. Default: ‘dhdl’.

suffix ([str](https://docs.python.org/3/library/stdtypes.html#str)) – Suffix for datafile sets. Default: ‘xvg’.

This is in some sense a good change as we expect the user to supply regular expression into prefix and in some sense suffix but we do expect the user to supply a real directory into dir.