Skip to content

issue-2604 reformat status type enumeration#2609

Merged
danbri merged 4 commits intoschemaorg:masterfrom
lucy-kind:lucy-kind-status-enumeration
Jul 7, 2020
Merged

issue-2604 reformat status type enumeration#2609
danbri merged 4 commits intoschemaorg:masterfrom
lucy-kind:lucy-kind-status-enumeration

Conversation

@lucy-kind
Copy link
Contributor

@lucy-kind lucy-kind commented Jun 23, 2020

lucy-kind added 3 commits May 12, 2020 10:48
update to merge with schema.org
merge master changes into fork
Nest status type enumeration lists under StatusEnumeration
@RichardWallis
Copy link
Contributor

Unfortunately this in its current form will not have the desired effect.

The loading of term definitions is cumulative. Therefore the re-specifying of enumerations such as ActionStatusType within the issue-2604.ttl file has the effect of adding new triples (for differences between the original definition [in data/schema.ttl] and the new one] not overriding them.

The impact in this case is twofold:

  1. The redefined terms such as ActionStatusType cause the term to now be subClassOf both Enumeration and StatusEnumeration.
  2. Differences in definition throw up extra triples - for example GameServerStatus has two differing comment triples. This is causing the scripts/run_tests.py to fail, and the integration tests to fail on the PR, with the following error:
    type 'GameServerStatus': Expected 1 rdfs:comment, found: 2.

Recommended actions:

  • Remove definitions of existing enumerations from the issue-2604.ttl file, leaving only the definition for StatusEnumeration.
  • Update the rdfs:subClassOf value to be :StatusEnumeration in their original locations (data/schema.ttl) for the enumerations in question.
  • Run the scripts/run_tests.py script prior to updating the branch associated with the PR

@danbri
Copy link
Contributor

danbri commented Jun 24, 2020

So (2.) extra triples is just a glitch because of an accidental rdfs:comment, i.e.

:GameServerStatus a rdfs:Class ;
    rdfs:label "GameServerStatus" ;
    :category "issue-2604" ;
    :isPartOf <http://pending.schema.org> ;
    :source <https://github.com/schemaorg/schemaorg/issues/2604> ;
    rdfs:comment "" ;

I am less clear on (1.), @RichardWallis -- are you saying that enumerations shouldn't form subclassof hierarchies? Aren't we doing that in the case of the benefits codes in #2543 ?

i.e. we have in ext/data/pending/issue-2543.ttl

:UKNonprofitType a rdfs:Class ;
    rdfs:label "UKNonprofitType" ;
    :category "issue-2543" ;
    :isPartOf <http://pending.schema.org> ;
    :source <https://github.com/schemaorg/schemaorg/issues/2543> ;
    rdfs:comment "UKNonprofitType: Non-profit organization type originating from the United Kingdom." ;
    rdfs:subClassOf :NonprofitType .

and

:NonprofitType a rdfs:Class ;
    rdfs:label "NonprofitType" ;
    :category "issue-2543" ;
    :isPartOf <http://pending.schema.org> ;
    :source <https://github.com/schemaorg/schemaorg/issues/2543> ;
    rdfs:comment "NonprofitType enumerates several kinds of official non-profit types of which a non-profit organization can be." ;
    rdfs:subClassOf :Enumeration .

Or more compactly:

  • :UKNonprofitType a rdfs:Class ; rdfs:subClassOf :NonprofitType .
  • :NonprofitType a rdfs:Class ; rdfs:subClassOf :Enumeration .

... and then from rdfs:subClassOf we can conclude that :UKNonprofitType is also an rdfs:subClassOf :Enumeration too.

What am I missing here?

@danbri
Copy link
Contributor

danbri commented Jun 24, 2020

(@RichardWallis I should say that I do get the point that re-defining stuff from core i.e. data/schema.ttl in an overlay data/ext/pending/*.ttl file is going to produce confusing results, but your specific point about the classes confused me)

@danbri danbri self-assigned this Jun 24, 2020
@RichardWallis
Copy link
Contributor

My understanding of the proposal [picking just one of the enumerations as an example] is that instead of being a direct descendant (rdfs:subClassOf) :Enumeration ActionStatusType will become a decendant of a new enumeration :StatusEnumeration.

With the current status of the PR, ActionStatusType is defined as rdfs:subClassOf :StatusEnumeration in the file issue-2604.ttl and rdfs:subClassOf :Enumeration in the file schema.ttl.

The effect being:
image

As can be seen, ActionStatusType is still a direct subtype of Enumeration. Not what is wanted with the objective being "to prevent a combinatorial explosion of enumerated items in any enumeration list." presumably, that includes the list for Enumeration itself.

To fix this, either the rdfs:subClassOf :Enumeration line needs deleting from the definition in schema.ttl; or preferably it needs changing to rdfs:subClassOf :StatusEnumeration and the whole definition for ActionStatusType removing from the issue-2604.ttl file.

This pattern is the same for all the other enumerations that are to be moved to be subtypes of StatusEnumeration.

@danbri danbri merged commit 5389fde into schemaorg:master Jul 7, 2020
@danbri
Copy link
Contributor

danbri commented Jul 7, 2020

Merging, but noting @rjw concerns above; will edit post-merge.

danbri added a commit that referenced this pull request Jul 7, 2020
Pending should not re-define core terms since definitions are additive
across data/*.ttl files. Instead we tweaked the core minimally to
mention the new supertype.

/cc @lucy-kind @rjw
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.

3 participants