-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Add interactionPolicy
and approvedBy
#23
Conversation
"isDefinedBy": "rdfs:isDefinedBy", | ||
"mainEntity": "schema:mainEntity", | ||
"members": "owl:members", | ||
"name": "schema:name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this is copied from the examples provided by astool but it raises a weirdness flag for me because normally this would be handled by rdfs:label and not schema:name. also it wouldn't really need to be defined as a shorthand term because using the prefixed "rdfs:label" would be simpler. but i'm guessing that this would possibly break the code generation of astool...
{ | ||
"@context": [ | ||
{ | ||
"as": "https://www.w3.org/ns/activitystreams", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the #
, this is an invalid prefix
"type": "owl:Class", | ||
"notes": "InteractionPolicy for an ActivityStreams Object.", | ||
"name": "InteractionPolicy", | ||
"url": "https://gotosocial.org/ns#InteractionPolicy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk why there's both id and url -- is this an astool idiosyncracy?
"id": "https://gotosocial.org/ns#", | ||
"type": "owl:Ontology", | ||
"name": "GoToSocial", | ||
"members": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property that determines the collection of members in either a owl:AllDifferent, owl:AllDisjointClasses or owl:AllDisjointProperties axiom
i have no idea why this is being used here or what it even means (semantically it's nonsense) but i am once again assuming astool fuckery
"owl:ObjectProperty" | ||
], | ||
"example": {}, | ||
"notes": "InteractionPolicy for an ActivityStreams Object.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this a different definition? i am assuming that the InteractionPolicy above is the type/class, and this one is interactionPolicy
the property that points to an InteractionPolicy object, right? if so, then the comments/notes should make this distinction clear.
"notes": "InteractionPolicy for an ActivityStreams Object.", | ||
"domain": { | ||
"type": "owl:Class", | ||
"unionOf": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
or more precisely, why not just make this as:Object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also more general comment on the nodes expressed below, assuming that you want the unionOf:
- why are there urls and not ids? (astool?)
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-interactionPolicy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a circular reference -- surely it should be just defined by gotosocial.org/ns# instead?
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-interactionPolicy", | ||
"range": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't this just be "https://gotosocial.org/ns#InteractionPolicy"
instead of a union of one class? or is this astool again
} | ||
] | ||
}, | ||
"name": "interactionPolicy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think the keys have to be in any specific order, do they? because this (and the next line?) would be useful at the top of the definition instead
{ | ||
"id": "https://gotosocial.org/ns#CanLike", | ||
"type": "owl:Class", | ||
"notes": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing text description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also does this even need to be defined as a class? like, what does it do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, can't this be unified between CanLike/CanAnnounce/CanReply because they're all going to be the same shape?
"@wtf_typeless": true | ||
}, | ||
{ | ||
"id": "https://gotosocial.org/ns#dfn-canLike", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it's hitting me just now that there's dfn-
before all the terms and that's not really needed? that's just respec markup for when a term is defined
"owl:ObjectProperty" | ||
], | ||
"notes": "Defines who can Like with an object property set to the URI/ID of the Object to which this interactionPolicy is attached.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't this just be "https://gotosocial.org/ns#InteractionPolicy"
instead of a union of one class? or is this astool again
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-canLike", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular reference
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-canLike", | ||
"range": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you combine CanLike/CanAnnounce/CanReply into one thing then make it the range here
"url": "https://gotosocial.org/ns#dfn-canLike" | ||
}, | ||
{ | ||
"id": "https://gotosocial.org/ns#CanAnnounce", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't this be unified between CanLike/CanAnnounce/CanReply because they're all going to be the same shape?
"url": "https://gotosocial.org/ns#dfn-canAnnounce" | ||
}, | ||
{ | ||
"id": "https://gotosocial.org/ns#CanReply", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be unified between CanLike/CanAnnounce/CanReply because they're all going to be the same shape?
"owl:ObjectProperty" | ||
], | ||
"notes": "Defines who can Announce with an object property set to the URI/ID of the Object to which this interactionPolicy is attached.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collapse domain into IRI reference if astool allows
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-canAnnounce", | ||
"range": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change range if you combine CanLike/CanAnnounce/CanReply
"url": "https://gotosocial.org/ns#CanReply", | ||
"@wtf_typeless": true | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as before on canLike and canAnnounce
"owl:ObjectProperty" | ||
], | ||
"notes": "Defines who can Create a new Object with an inReplyTo property set to the URI/ID of the Object to which this interactionPolicy is attached.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collapse domain etc
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-canReply", | ||
"range": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collapse range and also unify
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#dfn-canReply", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular reference
"id": "https://gotosocial.org/ns#always", | ||
"type": "rdf:Property", | ||
"notes": "Indicates zero or more URI/IDs that can perform an interaction without requiring approval by the Object AttributedTo Actor.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain can be collapsed after unifying CanLike/CanAnnounce/CanReply (if astool allows collapsing)
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#always", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular reference
"isDefinedBy": "https://gotosocial.org/ns#always", | ||
"range": { | ||
"type": "owl:Class", | ||
"unionOf": "xsd:anyURI" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks wrong, shouldn't it point to actors? idk how to fix this rn though
"isDefinedBy": "https://gotosocial.org/ns#approvalRequired", | ||
"range": { | ||
"type": "owl:Class", | ||
"unionOf": "xsd:anyURI" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks wrong, shouldn't it point to actors? idk how to fix this rn though
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#approvalRequired", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular reference
"id": "https://gotosocial.org/ns#approvalRequired", | ||
"type": "rdf:Property", | ||
"notes": "Indicates zero or more URI/IDs that require approval by the Object AttributedTo Actor in order to perform an interaction.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unify then maybe collapse
"rdf:Property", | ||
"owl:FunctionalProperty" | ||
], | ||
"notes": "URI/ID of an Approve Activity, which itself points towards the ID of the Activity or Object to which this property is attached. The presence of this property on an Activity or Object indicates that an interaction has been Approve'd by the Actor whose Object this Activity or Object interacts with.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"indicates that an interaction has been Approved" but only if the activity is valid by some other criteria, right? otherwise you could just set the property and it would look indistinguishable from any other properly approved activity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the idea is that the "approvedBy" should be validated by dereferencing the URI it points to and ensuring that it's a valid Accept for the Object or Activity that its URI is attached to :)
"owl:FunctionalProperty" | ||
], | ||
"notes": "URI/ID of an Approve Activity, which itself points towards the ID of the Activity or Object to which this property is attached. The presence of this property on an Activity or Object indicates that an interaction has been Approve'd by the Actor whose Object this Activity or Object interacts with.", | ||
"domain": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just be as:Object
} | ||
] | ||
}, | ||
"isDefinedBy": "https://gotosocial.org/ns#approvedBy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular reference
"isDefinedBy": "https://gotosocial.org/ns#approvedBy", | ||
"range": { | ||
"type": "owl:Class", | ||
"unionOf": "xsd:anyURI" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks wrong, shouldn't it point to actors? idk how to fix this rn though
I left comments wherever stuff looked wrong to me, which is in a lot of places, but I'm not sure how much of this is just astool idiosyncracies. Separately, I would also invite you to look at / review https://w3id.org/fep/0391 and the discussion at https://socialhub.activitypub.rocks/t/fep-0391-special-collection-proofs/4165 for something that tries to signal the |
Thanks for the detailed review @trwnh. Given how many issues there apparently are with using an astool-compatible document as an ontology, I think I'll drop the idea of using the former as the latter, keep the former as a code-generation document, and just write the ontology by hand once the PR that necessitates it is merged into GoToSocial. Thanks for the links also, but to be totally honest these days I generally avoid discussion on socialhome and in fep-related issues because I've found that after a certain point in time it feels as though things become too granular, and I can no longer follow the thread of discussion. I don't mean any insult by this, I just find that my eyes glaze over and I can't focus on what I'm reading anymore, I don't have the stamina for it, and it prevents me from doing work that I wanna do. That said, if something concrete comes out of the discussion you linked, i'm happy to look at implementing it in GtS as an alternate way to signal "approvedBy". |
Since this PR successfully implements generation for the code we need in GtS, I'm gonna squerge this now, but we can always change it later if necessary. |
This PR adds the
interactionPolicy
property to statusable representations, and adds theapprovedBy
property to Creates, Announces, and Likes.