// Reference Audio Analyzer measurements are not organized by type
measurements = list(glob(os.path.join(ROOT_DIR, "measurements", source, "data", "*")))
else:
measurements = list(glob(os.path.join(ROOT_DIR, "measurements", source, "data", "*", "*")))
measurements = [os.path.split(measurement)[1].lower() for measurement in measurements]
if name.lower() not in measurements and name != "README.md":
print(f"Removing "{path}" ...")
shutil.rmtree(path)
After Change
os.path.join(ROOT_DIR, "measurements", db, "data", "**", "*.csv"),
recursive=True
))
measurements = [os.path.split(measurement)[1].lower().replace(".csv", "") for measurement in measurements]
for path in glob(os.path.join(ROOT_DIR, "results", db, "*", "*")):
_, name = os.path.split(path)
if name.lower() not in measurements and name != "README.md":