Skip to content

Commit d10535a

Browse files
authored
Merge pull request crs4#124 from kikkomep/feat/warning-on-unsupported-profiles
feat(core): ✨ Issue a warning if RO-Crate references a profile that can't be validated
2 parents 43df30f + 3eaa206 commit d10535a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

rocrate_validator/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,6 +2592,14 @@ def detect_rocrate_profiles(self) -> list[Profile]:
25922592
if inherited_profile in candidate_profiles:
25932593
candidate_profiles.remove(inherited_profile)
25942594
logger.debug("%d Candidate Profiles found: %s", len(candidate_profiles), candidate_profiles)
2595+
# unmatched candidate profiles
2596+
unmatched_profiles = candidate_profiles_uris.difference(set(p.uri for p in profiles))
2597+
logger.debug("Unmatched Candidate Profiles URIs: %s", unmatched_profiles)
2598+
if len(unmatched_profiles) > 0:
2599+
logger.warning(
2600+
"The conformance to the following profiles could not be verified: %s",
2601+
unmatched_profiles,
2602+
)
25952603
return candidate_profiles
25962604

25972605
except Exception as e:

0 commit comments

Comments
 (0)