diff --git a/AUTHORS b/AUTHORS index b9f1405..f0cb0b2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -68,6 +68,11 @@ year of their first commit. GitHub handle is optional. ---- - Jinzhe Zeng (@njzjz) + +2024 +---- + +- Friedrich Haubensak (@hsk17) We gratefully acknowledge code fixes contributed by @quantifiedcode-bot from Quantified Code https://www.quantifiedcode.com diff --git a/CHANGES b/CHANGES index bbf6f0b..c3e58a0 100644 --- a/CHANGES +++ b/CHANGES @@ -3,7 +3,7 @@ ============================== 2024-??-?? 0.9.1 -orbeckst +orbeckst, hsk17 * templates in `config.templates` are now stored as `importlib.resources.abc.Traversable` (PosixPath-like) objects instead of diff --git a/gromacs/fileformats/mdp.py b/gromacs/fileformats/mdp.py index 01c93c5..7e3d6f4 100644 --- a/gromacs/fileformats/mdp.py +++ b/gromacs/fileformats/mdp.py @@ -55,7 +55,7 @@ class MDP(odict, utilities.FileUtils): default_extension = "mdp" logger = logging.getLogger("gromacs.formats.MDP") - COMMENT = re.compile("""\s*;\s*(?P.*)""") # eat initial ws + COMMENT = re.compile(r"""\s*;\s*(?P.*)""") # eat initial ws # see regex in cbook.edit_mdp() PARAMETER = re.compile( r""" diff --git a/gromacs/qsub.py b/gromacs/qsub.py index b1da692..7f853a6 100644 --- a/gromacs/qsub.py +++ b/gromacs/qsub.py @@ -405,13 +405,13 @@ def write_script(template): template, [ ("^ *DEFFNM=", "(?<==)(.*)", deffnm), - ("^#.*(-J)", "((?<=-J\s))\s*\w+", jobname), + ("^#.*(-J)", r"((?<=-J\s))\s*\w+", jobname), ( "^#.*(-A|account_no)", - "((?<=-A\s)|(?<=account_no\s))\s*\w+", + r"((?<=-A\s)|(?<=account_no\s))\s*\w+", budget, ), - ("^#.*(-t)", "(?<=-t\s)(\d+:\d+:\d+)", walltime), + ("^#.*(-t)", r"(?<=-t\s)(\d+:\d+:\d+)", walltime), ("^ *WALL_HOURS=", "(?<==)(.*)", wall_hours), ("^ *STARTDIR=", "(?<==)(.*)", startdir), ("^ *NPME=", "(?<==)(.*)", npme), @@ -430,15 +430,19 @@ def write_script(template): template, [ ("^ *DEFFNM=", "(?<==)(.*)", deffnm), - ("^#.*(-N|job_name)", "((?<=-N\s)|(?<=job_name\s))\s*\w+", jobname), + ( + "^#.*(-N|job_name)", + r"((?<=-N\s)|(?<=job_name\s))\s*\w+", + jobname, + ), ( "^#.*(-A|account_no)", - "((?<=-A\s)|(?<=account_no\s))\s*\w+", + r"((?<=-A\s)|(?<=account_no\s))\s*\w+", budget, ), ( "^#.*(-l walltime|wall_clock_limit)", - "(?<==)(\d+:\d+:\d+)", + r"(?<==)(\d+:\d+:\d+)", walltime, ), ("^ *WALL_HOURS=", "(?<==)(.*)", wall_hours),