Skip to content

Metadata validation service now validates against five-safes-crate profile.#130

Open
EttoreM wants to merge 1 commit intodevelopfrom
129-five-validation-service-for-five-safes-crate-profile
Open

Metadata validation service now validates against five-safes-crate profile.#130
EttoreM wants to merge 1 commit intodevelopfrom
129-five-validation-service-for-five-safes-crate-profile

Conversation

@EttoreM
Copy link

@EttoreM EttoreM commented Feb 27, 2026

This PR addresses #129

Issue

When passing profile_name="five-safes-crate" to the endpoint /validate_metadata, the validation failed to run and the following message was returned "Profile not found: five-safes-crate".

The reason for this was that profiles_path was passed in the wrong argument position when calling perform_metadata_validation from process_validation_task_by_metadata. In particular, the call was made like this:

perform_metadata_validation(crate_json, profile_name, profiles_path)

but in that function signature, the third argument is skip_checks_list, not profiles_path. Consequently profiles_path was ignored, and validation fell back to the default profile location:
/usr/local/lib/python3.11/site-packages/rocrate_validator/profiles

Fix

profiles_path is now passed explicitly as a keyword:

perform_metadata_validation(crate_json, profile_name, profiles_path=profiles_path)

Result

Metadata validation now uses the configured non-default path from PROFILES_PATH (in dev compose: /app/profiles) instead of the package default, so five-safes-crate resolves correctly.
Regression assertions were added in test_validation_tasks.py to reflect this new behaviour.

@EttoreM EttoreM linked an issue Feb 27, 2026 that may be closed by this pull request
@EttoreM EttoreM self-assigned this Feb 27, 2026
@OliverWoolland
Copy link

kinda hard to see the logical changes with the linting being applied too... is this the key change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Five validation service for five-safes-crate profile

2 participants