Skip to content

Commit f8165f0

Browse files
authored
Merge pull request #485 from LAAC-LSCP/annotations/outdated_missing
Annotations/outdated missing
2 parents 7aa8a1b + c3d836b commit f8165f0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
1212

1313
### Fixed
1414

15+
- does not fail anymore when annotations are missing their merged_from set
1516
- audio conversions in basic and standard now always include conversion filename and edit the file properly
1617

1718
## [0.2.2] 2024-06-26

ChildProject/annotations.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,16 @@ def _check_for_outdated_merged_sets(self, sets: set = None):
455455
for j in row['merged_from'].split(','):
456456
#if a list of sets was given and the set is not in that list, skip it
457457
if (sets is not None and j in sets) or sets is None:
458-
if row['imported_at'] < last_modif[j]:
459-
warnings.append("set {} is outdated because the {} set it is merged from was modified. Consider updating or rerunning the creation of the {} set.".format(i,j,i))
458+
if j not in last_modif:
459+
warnings.append("set {} was originally derived from set {} which does not exist anymore.\
460+
Consider adding the set {} or updating the information.".format(i,j,j))
461+
else:
462+
if row['imported_at'] < last_modif[j]:
463+
warnings.append("set {} is outdated because the {} set it is merged from was modified.\
464+
Consider updating or rerunning the creation of the {} set.".format(i,j,i))
460465

461466
return warnings
467+
462468
def _import_annotation(
463469
self, import_function: Callable[[str], pd.DataFrame],
464470
params: dict,

0 commit comments

Comments
 (0)