Browse Source

sg_mbp_release now also copies frms

master
Holger Frey 2 years ago
parent
commit
4ed7e89a6c
  1. 2
      work_helpers/sensospot_rename.py
  2. 10
      work_helpers/sg_mbp_release.py

2
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: def write_rename_map(map_file:pathlib.Path) -> None:
images = list_images(directory) images = list_images(map_file.parent)
parts = get_unique_parts(images) parts = get_unique_parts(images)
headers = ["stems", "wells", "exposures"] headers = ["stems", "wells", "exposures"]

10
work_helpers/sg_mbp_release.py

@ -133,6 +133,15 @@ def copy_workbooks(destination, release_version):
print(excel_file.name, "->", new_path) print(excel_file.name, "->", new_path)
shutil.copyfile(excel_file, 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.command()
@click.option( @click.option(
@ -188,3 +197,4 @@ def sg_mbp_release(dev_version):
copy_workbooks(new_folder_path, release_version) copy_workbooks(new_folder_path, release_version)
copy_workbook_changelogs(new_folder_path, latest, release_version) copy_workbook_changelogs(new_folder_path, latest, release_version)
copy_changelog(new_folder_path, release_version) copy_changelog(new_folder_path, release_version)
copy_frms(new_folder_path, release_version)

Loading…
Cancel
Save