Skip to content

Conversation

@EttoreM
Copy link

@EttoreM EttoreM commented Sep 25, 2025

Rules implemented

Description sh:severity
The entity CreateAction MUST have the property agent pointing to the entity requesting the run sh:Violation
The entity pointed to by the property agent of CreateAction MUST be of type Person. sh:Violation
The agent of CreateAction SHOULD have the property affiliation sh:Warning
The affiliation of a CreateAction's agent MUST point to an entity of type Organization sh:Violation

|

Assumption

The checks have been devised under the following assumptions:

  • There may be entities of @type schema:Person that are not agents of a CreateAction entity.
  • Only schema:Person entities that are agents of CreateAction SHOULD have an affiliation (other schema:Person entities are not checked for affiliation)
  • Only affiliations of agents (if these have any) MUST be of @type schema:Organization (affiliations of other entities are not checked for @type).
  • There may be schema:Organizations that are not affiliations of any CreateAction's agent.

@alexhambley
Copy link

Will get to this Weds morning @EttoreM - apologies for the delay, it's the HDR Fed A roadmap Monday + Tues.

@EttoreM EttoreM requested a review from douglowe September 29, 2025 11:53
Copy link

@alexhambley alexhambley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @EttoreM - sorry for the delay! I have made some comments in-line :)

@EttoreM EttoreM requested a review from alexhambley October 8, 2025 09:21
@EttoreM EttoreM changed the title Added checks for rules about responsible Agent. Added checks for rules about Requesting Agent. Oct 8, 2025
@EttoreM EttoreM changed the base branch from 9-profile-for-5-safes-ro-crate-version-05 to develop October 16, 2025 13:18
@douglowe douglowe force-pushed the 11-responsible-agent branch from 73a78a9 to d4b9c90 Compare October 27, 2025 16:33
@douglowe
Copy link

I've rebased this branch from develop. I think I shouldn't have broken any of your code @EttoreM, but please could you check to make sure.

I don't know why git has flagged the removal of 1_funder.ttl and 1_root_data_entity_metadata.ttl files, when these are not part of the develop branch. Hopefully this will not break anything.

@EttoreM EttoreM linked an issue Oct 27, 2025 that may be closed by this pull request
@elichad
Copy link

elichad commented Oct 27, 2025

@douglowe Alas those files are on develop: https://github.com/eScienceLab/rocrate-validator/tree/develop/rocrate_validator/profiles/five-safes-crate/must (as well as in #15 ) so you might have accidentally removed them when rebasing

(this also looks to be why the tests are failing)

@douglowe
Copy link

yep. I've realised that, and have been checking to see if the tests are covered anywhere else.

I think that, as this PR is for the requesting agent, I'll reverse out the removal of these two files. If they do duplicate requirements elsewhere we can tidy up the duplication later.

@EttoreM EttoreM requested a review from elichad October 28, 2025 09:37
@EttoreM
Copy link
Author

EttoreM commented Oct 29, 2025

I have addresses @elichad's comments and added python tests to this set of rules.

I think it is ready for review.

Copy link

@elichad elichad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EttoreM this looks good to me!

My only suggestion is that we use the term "contextual entity" in messages instead of "IRI", as that is the terminology that RO-Crate users are more familiar with.

Please hit the merge button when you're ready as I'm not sure if you want this or #27 to be merged first (don't know if it matters).

sh:minCount 1 ;
sh:nodeKind sh:IRI ;
sh:severity sh:Violation ;
sh:message "CreateAction MUST have at least one schema:agent that is an IRI." ;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could refer to this as a contextual entity to suit our audience better (though I appreciate this just replaces RDF jargon with RO-Crate jargon...)

Suggested change
sh:message "CreateAction MUST have at least one schema:agent that is an IRI." ;
sh:message "CreateAction MUST have at least one schema:agent that is a contextual entity." ;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

sh:nodeKind sh:IRI ;
sh:class schema:Person ;
sh:severity sh:Violation ;
sh:message "Each CreateAction agent MUST be typed as schema:Person and be an IRI." ;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the IRI/contextual entity part is covered above

Suggested change
sh:message "Each CreateAction agent MUST be typed as schema:Person and be an IRI." ;
sh:message "Each CreateAction agent MUST be typed as schema:Person." ;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

sh:class schema:Organization ;
sh:nodeKind sh:IRI ;
sh:severity sh:Violation ;
sh:message "The affiliation of a CreateAction's agent MUST be a schema:Organization and be an IRI." ;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sh:message "The affiliation of a CreateAction's agent MUST be a schema:Organization and be an IRI." ;
sh:message "The affiliation of a CreateAction's agent MUST be a contextual entity with type schema:Organization." ;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(note for my own benefit as I think you're already aware of this)

GH interprets this as a renamed file ...rate/must/1_root_data_entity_metadata.ttl → ...safes-crate/should/2_requesting_agent.ttl

and this might therefore have conflicts with #27 which also updates the 1_root_data_entity_metadata.ttl file (but #27 also renames the file, so maybe it'll be fine!?).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be fine.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(another note for myself) this file is updated with a different filename in #27

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cross-referencing #27 (comment) which confirms that this is fine to remove

@EttoreM EttoreM merged commit a1dd141 into develop Oct 29, 2025
4 checks passed
@EttoreM EttoreM deleted the 11-responsible-agent branch October 29, 2025 19:40
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.

Requesting Agent

6 participants