From fb1cc06f7cdb5508263caf5d77070fc6b673be5f Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 24 Oct 2024 13:38:47 -0400 Subject: [PATCH 1/2] fix: do not read entire files in memory --- workflow/rules/init.smk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/workflow/rules/init.smk b/workflow/rules/init.smk index 380271a..ce1a2ef 100644 --- a/workflow/rules/init.smk +++ b/workflow/rules/init.smk @@ -53,9 +53,8 @@ def append_files_in_list(flist, ofile): with open(ofile, "w") as outfile: for fname in flist: with open(fname) as infile: - l = infile.read() - l = l.strip() - outfile.write("%s\n" % (l)) + for line in infile: + outfile.write(line) return True From fcec511ee4b29f2884217070c41649d7feb949f2 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 24 Oct 2024 13:41:24 -0400 Subject: [PATCH 2/2] chore: update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cbc750..4a9bec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Update docker containers to set `$PYTHONPATH`. (#119, @kelly-sovacool) - Otherwise, this environment variable can be carried over and cause package conflicts when singularity is not run with `-C`. - Fix `reconfig` to correctly replace variables in the config file. (#121, @kelly-sovacool) +- Prevent using excessive memory when copying reference files. (#126, @kelly-sovacool) ## CHARLIE 0.11.0