Skip to content

Commit

Permalink
KPMP-5665: keep expression, skip derived
Browse files Browse the repository at this point in the history
  • Loading branch information
zwright committed Dec 17, 2024
1 parent e40cef9 commit 1571425
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/packageChecker/packageChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def find_empty_packages(self, move_derived=False):
else:
for file in files:
ext = os.path.splitext(file)
if not ext[1] == ".bfmemo" and not "expression_matrix" in ext[0]:
if not ext[1] == ".bfmemo" and not "derived" in ext[0]:
actual_file_names.append(file)

if file == "metadata.json" and len(files) == 1:
Expand Down Expand Up @@ -142,16 +142,16 @@ def move_file_to_derived(self, package_directory, file_name):
file_path = package_directory + "/" + file_name
print(f"Moving file '{file_path}' to '{derived_dir}'.")

if not os.path.exists(derived_dir):
os.makedirs(derived_dir)

try:
shutil.move(file_path, derived_dir)
print(f"File '{file_path}' moved to '{derived_dir}' successfully.")
except FileNotFoundError:
print(f"Error: File '{source_file}' not found.")
except Exception as e:
print(f"An error occurred: {e}")
# if not os.path.exists(derived_dir):
# os.makedirs(derived_dir)
#
# try:
# shutil.move(file_path, derived_dir)
# print(f"File '{file_path}' moved to '{derived_dir}' successfully.")
# except FileNotFoundError:
# print(f"Error: File '{source_file}' not found.")
# except Exception as e:
# print(f"An error occurred: {e}")


if __name__ == "__main__":
Expand Down

0 comments on commit 1571425

Please sign in to comment.