diff --git a/work_helpers/sensospot_rename.py b/work_helpers/sensospot_rename.py index d88dc85..e8018ac 100644 --- a/work_helpers/sensospot_rename.py +++ b/work_helpers/sensospot_rename.py @@ -29,7 +29,7 @@ def get_unique_parts(images:list[pathlib.Path]) -> list[list[str], list[str], li def write_rename_map(map_file:pathlib.Path) -> None: - images = list_images(directory) + images = list_images(map_file.parent) parts = get_unique_parts(images) headers = ["stems", "wells", "exposures"] diff --git a/work_helpers/sg_mbp_release.py b/work_helpers/sg_mbp_release.py index cbe13da..3ce8040 100644 --- a/work_helpers/sg_mbp_release.py +++ b/work_helpers/sg_mbp_release.py @@ -133,6 +133,15 @@ def copy_workbooks(destination, release_version): print(excel_file.name, "->", new_path) shutil.copyfile(excel_file, new_path) +def copy_frms(destination, release_version): + all_folders = (f for f in PATH_WORKBOOKS.iterdir() if f.is_dir()) + all_frms = (f for f in all_folders if "frm" in f.name.lower()) + current_frms = (f for f in all_frms if f.name.endswith(release_version)) + for folder in current_frms: + new_path = destination / folder.name + print(folder.name, "->", new_path) + shutil.copytree(folder, new_path) + @click.command() @click.option( @@ -188,3 +197,4 @@ def sg_mbp_release(dev_version): copy_workbooks(new_folder_path, release_version) copy_workbook_changelogs(new_folder_path, latest, release_version) copy_changelog(new_folder_path, release_version) + copy_frms(new_folder_path, release_version)