From a1394fb279254fc8f408d1e01c689ee5493680ef Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Tue, 28 Jul 2020 10:31:24 -0700 Subject: [PATCH 1/2] copy samplesfile to merlin_info --- merlin/study/study.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/merlin/study/study.py b/merlin/study/study.py index 1b54783a9..258485bc5 100644 --- a/merlin/study/study.py +++ b/merlin/study/study.py @@ -397,6 +397,13 @@ def expanded_spec(self): env = result.get_study_environment() result.globals = self.load_pgen(self.pgen_file, self.pargs, env) + # copy the --samplesfile (if any) into merlin_info + if self.samples_file: + shutil.copyfile( + self.samples_file, + os.path.join(self.info, os.path.basename(self.samples_file)), + ) + # write expanded spec for provenance with open(expanded_filepath, "w") as f: f.write(result.dump()) From 9c566536d9d59277b3e1cf984bc23222c2a1d5be Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Tue, 28 Jul 2020 10:33:46 -0700 Subject: [PATCH 2/2] added to CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e66b46e53..fbc12330f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to Merlin will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added +- When using the `--samplesfile` flag, the samples file is now copied to `merlin_info` for + provenance. + ## [1.7.0] ### Added