HyperAgents / hmas

An ontology to describe Hypermedia Multi-Agent Systems, interactions, and organizations.
https://purl.org/hmas/
1 stars 0 forks source link

Automatic profile test #171

Open NicoRobertIn opened 1 year ago

NicoRobertIn commented 1 year ago

These last 2 days I extended a script @DrLeturc made to check the health of the ontology. It uses the Corese python library with py4j.

Here is a small portion of the output, given the project state 2 days ago:

{
    "../../domains\\logistics\\create-organization\\onto.ttl": {
        "file": "../../domains\\logistics\\create-organization\\onto.ttl",
        "syntax_errors": "Undefined prefix: rdsf:range",
        "test_run": false
    },
    "../../domains\\logistics\\structure-organization\\onto.ttl": {
        "merged": {
            "regulation": {
                "OWL_EL": {
                    "is_reached": false,
                    "message": "OWL EL not correct: 4 failures\r\n\r\n1. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n  dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n  rdfs:label \"Chemero and Turvey, 2007\"@en]\r\n\r\n2. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n  dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n  rdfs:label \"Norman, 2013\"@en]\r\n\r\n3. Anonymous individuals are not supported\r\n\r\n<https://purl.org/hmas/Affordance> a skos:Concept ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n    dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n    rdfs:label \"Chemero and Turvey, 2007\"@en] ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n    dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n    rdfs:label \"Norman, 2013\"@en] ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  skos:definition \"A behavior possibility that is a relationship between an ability of an agent and a situation that includes agents and features of the environment.\"@en ;\r\n  skos:editorialNote \"The concept has been considered as a candidate term for representing interaction cues and metadata in the Hypermedia MAS Core Ontology. The term :Signifier is selected instead for the following reasons: 1) Affordances emerge upon the presence of individual agents in the appropriate situation, while signifiers are defined with respect to agent types to preserve the evolvability and reusability of interaction cues without requiring prior knowledge about individual agents; 2) Affordances are defined in [Chemero and Turvey, 2007] for studying interactions of animals, while signifiers are defined here for supporting interactions of autonomous agents, which exhibit more heterogeneous abilities than animals \u2014 including agents whose cognitive abilities exclusively rely on computational processes such as reasoning over representations. Here, the concept is provided to support the discussion, management, and modelling of signifiers, which reveal information about affordances [Norman, 2013]. For example, the association between the two terms enables examining the dynamic exposure of signifiers based on the run-time availability of agent abilities and situations, or the modelling of signifiers that reveal information about affordances for both artificial and human agents.\"@en ;\r\n  skos:historyNote \"The definition of the concept follows affordance theorists [Chemero and Turvey, 2007].\"@en ;\r\n  skos:prefLabel \"affordance\"@en ;\r\n  skos:related <https://purl.org/hmas/Signifier>\r\n\r\n4. Statement not supported\r\n\r\n<https://purl.org/hmas/hasProfile> a owl:AsymmetricProperty ;\r\n  a owl:ObjectProperty ;\r\n  rdfs:comment \"A relation that links a resource to its profile.\"@en ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"a pour profil\"@fr ;\r\n  rdfs:label \"has for profile\"@en ;\r\n  rdfs:range <https://purl.org/hmas/ResourceProfile> ;\r\n  owl:inverseOf <https://purl.org/hmas/isProfileOf>"
                },
                "OWL_QL": {
                    "is_reached": false,
                    "message": "OWL QL not correct: 4 failures\r\n\r\n1. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n  dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n  rdfs:label \"Chemero and Turvey, 2007\"@en]\r\n\r\n2. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n  dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n  rdfs:label \"Norman, 2013\"@en]\r\n\r\n3. Anonymous individuals are not supported\r\n\r\n<https://purl.org/hmas/Affordance> a skos:Concept ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n    dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n    rdfs:label \"Chemero and Turvey, 2007\"@en] ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n    dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n    rdfs:label \"Norman, 2013\"@en] ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  skos:definition \"A behavior possibility that is a relationship between an ability of an agent and a situation that includes agents and features of the environment.\"@en ;\r\n  skos:editorialNote \"The concept has been considered as a candidate term for representing interaction cues and metadata in the Hypermedia MAS Core Ontology. The term :Signifier is selected instead for the following reasons: 1) Affordances emerge upon the presence of individual agents in the appropriate situation, while signifiers are defined with respect to agent types to preserve the evolvability and reusability of interaction cues without requiring prior knowledge about individual agents; 2) Affordances are defined in [Chemero and Turvey, 2007] for studying interactions of animals, while signifiers are defined here for supporting interactions of autonomous agents, which exhibit more heterogeneous abilities than animals \u2014 including agents whose cognitive abilities exclusively rely on computational processes such as reasoning over representations. Here, the concept is provided to support the discussion, management, and modelling of signifiers, which reveal information about affordances [Norman, 2013]. For example, the association between the two terms enables examining the dynamic exposure of signifiers based on the run-time availability of agent abilities and situations, or the modelling of signifiers that reveal information about affordances for both artificial and human agents.\"@en ;\r\n  skos:historyNote \"The definition of the concept follows affordance theorists [Chemero and Turvey, 2007].\"@en ;\r\n  skos:prefLabel \"affordance\"@en ;\r\n  skos:related <https://purl.org/hmas/Signifier>\r\n\r\n4. Statement not supported\r\n\r\n<https://purl.org/hmas/transitivelyContains> a owl:ObjectProperty ;\r\n  a owl:TransitiveProperty ;\r\n  dc:source <https://github.com/HyperAgents/ns.hyperagents.org/issues/8#issuecomment-1025991719> ;\r\n  rdfs:comment \"Links all the resources that are logically contained in a workspaces, directly or indirectly by transitivity.\"@en ;\r\n  rdfs:domain <https://purl.org/hmas/Workspace> ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"contient transitivement\"@fr ;\r\n  rdfs:label \"transitively contains\"@en ;\r\n  rdfs:seeAlso <https://github.com/HyperAgents/ns.hyperagents.org/issues/18> ;\r\n  rdfs:seeAlso <https://github.com/HyperAgents/ns.hyperagents.org/issues/39> ;\r\n  owl:inverseOf <https://purl.org/hmas/isTransitivelyContainedIn>"
                },
                "OWL_RL": {
                    "is_reached": true,
                    "message": "OWL RL"
                },
                "OWL_TC": {
                    "is_reached": true,
                    "message": "OWL"
                },
                "syntax_errors": "",
                "test_run": true
            }
        },
        "standalone": {
            "OWL_EL": {
                "is_reached": true,
                "message": "OWL EL"
            },
            "OWL_QL": {
                "is_reached": true,
                "message": "OWL QL"
            },
            "OWL_RL": {
                "is_reached": true,
                "message": "OWL RL"
            },
            "OWL_TC": {
                "is_reached": true,
                "message": "OWL"
            },
            "syntax_errors": "",
            "test_run": true
        }
    },
    "../../domains\\manufacturing-environments\\discover-core\\onto.ttl": {
        "merged": {
            "core": {
                "OWL_EL": {
                    "is_reached": false,
                    "message": "OWL EL not correct: 4 failures\r\n\r\n1. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n  dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n  rdfs:label \"Chemero and Turvey, 2007\"@en]\r\n\r\n2. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n  dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n  rdfs:label \"Norman, 2013\"@en]\r\n\r\n3. Anonymous individuals are not supported\r\n\r\n<https://purl.org/hmas/Affordance> a skos:Concept ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n    dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n    rdfs:label \"Chemero and Turvey, 2007\"@en] ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n    dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n    rdfs:label \"Norman, 2013\"@en] ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  skos:definition \"A behavior possibility that is a relationship between an ability of an agent and a situation that includes agents and features of the environment.\"@en ;\r\n  skos:editorialNote \"The concept has been considered as a candidate term for representing interaction cues and metadata in the Hypermedia MAS Core Ontology. The term :Signifier is selected instead for the following reasons: 1) Affordances emerge upon the presence of individual agents in the appropriate situation, while signifiers are defined with respect to agent types to preserve the evolvability and reusability of interaction cues without requiring prior knowledge about individual agents; 2) Affordances are defined in [Chemero and Turvey, 2007] for studying interactions of animals, while signifiers are defined here for supporting interactions of autonomous agents, which exhibit more heterogeneous abilities than animals \u2014 including agents whose cognitive abilities exclusively rely on computational processes such as reasoning over representations. Here, the concept is provided to support the discussion, management, and modelling of signifiers, which reveal information about affordances [Norman, 2013]. For example, the association between the two terms enables examining the dynamic exposure of signifiers based on the run-time availability of agent abilities and situations, or the modelling of signifiers that reveal information about affordances for both artificial and human agents.\"@en ;\r\n  skos:historyNote \"The definition of the concept follows affordance theorists [Chemero and Turvey, 2007].\"@en ;\r\n  skos:prefLabel \"affordance\"@en ;\r\n  skos:related <https://purl.org/hmas/Signifier>\r\n\r\n4. Statement not supported\r\n\r\n<https://purl.org/hmas/hasProfile> a owl:AsymmetricProperty ;\r\n  a owl:ObjectProperty ;\r\n  rdfs:comment \"A relation that links a resource to its profile.\"@en ;\r\n  rdfs:inverseOf <https://purl.org/hmas/isProfileOf> ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"a pour profil\"@fr ;\r\n  rdfs:label \"has for profile\"@en ;\r\n  rdfs:label \"has profile\"@en ;\r\n  rdfs:range <https://purl.org/hmas/ResourceProfile> ;\r\n  rdfs:type rdfs:AsymmetricProperty ;\r\n  rdfs:type rdfs:ObjectProperty ;\r\n  owl:inverseOf <https://purl.org/hmas/isProfileOf>"
                },
                "OWL_QL": {
                    "is_reached": false,
                    "message": "OWL QL not correct: 4 failures\r\n\r\n1. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n  dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n  rdfs:label \"Chemero and Turvey, 2007\"@en]\r\n\r\n2. Anonymous individuals are not supported\r\n\r\n[a owl:NamedIndividual ;\r\n  dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n  dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n  rdfs:label \"Norman, 2013\"@en]\r\n\r\n3. Anonymous individuals are not supported\r\n\r\n<https://purl.org/hmas/Affordance> a skos:Concept ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Chemero, A., & Turvey, M. T. (2007). Complexity, hypersets, and the ecological perspective on perception-action. Biological Theory, 2(1), 23-36.\"@en ;\r\n    dc:identifier <https://doi.org/10.1162/biot.2007.2.1.23> ;\r\n    rdfs:label \"Chemero and Turvey, 2007\"@en] ;\r\n  dc:references [a owl:NamedIndividual ;\r\n    dc:bibliographicCitation \"Norman, D. (2013). The design of everyday things: Revised and expanded edition. Basic books.\"@en ;\r\n    dc:identifier <https://mitpress.mit.edu/9780262640374/> ;\r\n    rdfs:label \"Norman, 2013\"@en] ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  skos:definition \"A behavior possibility that is a relationship between an ability of an agent and a situation that includes agents and features of the environment.\"@en ;\r\n  skos:editorialNote \"The concept has been considered as a candidate term for representing interaction cues and metadata in the Hypermedia MAS Core Ontology. The term :Signifier is selected instead for the following reasons: 1) Affordances emerge upon the presence of individual agents in the appropriate situation, while signifiers are defined with respect to agent types to preserve the evolvability and reusability of interaction cues without requiring prior knowledge about individual agents; 2) Affordances are defined in [Chemero and Turvey, 2007] for studying interactions of animals, while signifiers are defined here for supporting interactions of autonomous agents, which exhibit more heterogeneous abilities than animals \u2014 including agents whose cognitive abilities exclusively rely on computational processes such as reasoning over representations. Here, the concept is provided to support the discussion, management, and modelling of signifiers, which reveal information about affordances [Norman, 2013]. For example, the association between the two terms enables examining the dynamic exposure of signifiers based on the run-time availability of agent abilities and situations, or the modelling of signifiers that reveal information about affordances for both artificial and human agents.\"@en ;\r\n  skos:historyNote \"The definition of the concept follows affordance theorists [Chemero and Turvey, 2007].\"@en ;\r\n  skos:prefLabel \"affordance\"@en ;\r\n  skos:related <https://purl.org/hmas/Signifier>\r\n\r\n4. Statement not supported\r\n\r\n<https://purl.org/hmas/transitivelyContains> a owl:ObjectProperty ;\r\n  a owl:TransitiveProperty ;\r\n  dc:source <https://github.com/HyperAgents/ns.hyperagents.org/issues/8#issuecomment-1025991719> ;\r\n  rdfs:comment \"Links all the resources that are logically contained in a workspaces, directly or indirectly by transitivity.\"@en ;\r\n  rdfs:comment \"Links all the resources that are logically contained in a workspaces.\"@en ;\r\n  rdfs:domain <https://purl.org/hmas/Workspace> ;\r\n  rdfs:inverseOf <https://purl.org/hmas/isTransitivelyContainedIn> ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"contient transitivement\"@fr ;\r\n  rdfs:label \"transitively contains\"@en ;\r\n  rdfs:label \"transitivelyContains\"@en ;\r\n  rdfs:seeAlso <https://github.com/HyperAgents/ns.hyperagents.org/issues/18> ;\r\n  rdfs:seeAlso <https://github.com/HyperAgents/ns.hyperagents.org/issues/39> ;\r\n  rdfs:type rdfs:ObjectProperty ;\r\n  rdfs:type rdfs:TransitiveProperty ;\r\n  owl:inverseOf <https://purl.org/hmas/isTransitivelyContainedIn>"
                },
                "OWL_RL": {
                    "is_reached": true,
                    "message": "OWL RL"
                },
                "OWL_TC": {
                    "is_reached": true,
                    "message": "OWL"
                },
                "syntax_errors": "",
                "test_run": true
            }
        },
        "standalone": {
            "OWL_EL": {
                "is_reached": false,
                "message": "OWL EL not correct: 1 failures\r\n\r\n1. Statement not supported\r\n\r\n<https://purl.org/hmas/hasProfile> a owl:AsymmetricProperty ;\r\n  a owl:ObjectProperty ;\r\n  rdfs:comment \"A relation that links a resource to its profile.\"@en ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"has profile\"@en ;\r\n  rdfs:range <https://purl.org/hmas/ResourceProfile> ;\r\n  owl:inverseOf <https://purl.org/hmas/isProfileOf>"
            },
            "OWL_QL": {
                "is_reached": false,
                "message": "OWL QL not correct: 1 failures\r\n\r\n1. Statement not supported\r\n\r\n<https://purl.org/hmas/transitivelyContains> a owl:ObjectProperty ;\r\n  a owl:TransitiveProperty ;\r\n  rdfs:comment \"Links all the resources that are logically contained in a workspaces.\"@en ;\r\n  rdfs:domain <https://purl.org/hmas/Workspace> ;\r\n  rdfs:isDefinedBy <https://purl.org/hmas/core> ;\r\n  rdfs:label \"transitivelyContains\"@en ;\r\n  owl:inverseOf <https://purl.org/hmas/isTransitivelyContainedIn>"
            },
            "OWL_RL": {
                "is_reached": true,
                "message": "OWL RL"
            },
            "OWL_TC": {
                "is_reached": true,
                "message": "OWL"
            },
            "syntax_errors": "",
            "test_run": true
        }
    }
}
NicoRobertIn commented 1 year ago

After an approbation of @FabienGandon , a first version of the script is published on the branch test-workflow

DrLeturc commented 1 year ago

Excellent. Thanks Nico !

Can I create a test-scenario branch to commit my work?

It could be useful to add some "Common sense" tests, what other examples than below can you imagine e.g. :

For meta.ttl, if we continue to work on this ontology, it could be benefit to add warning messages like :

It is just naive ideas.

NicoRobertIn commented 1 year ago

I just commited to add the asked features

I pushed an example of what a report looks like (for now, WIP), and also added some mistakes in the ontology ON PURPOSE (you are all doing your job so well that I have to add errors myself)

NicoRobertIn commented 1 year ago

I just also added a best practices check on ontology terms based on levenshtein distance By default the threshold is put to 3 but this is just a parameter

NicoRobertIn commented 12 months ago

The last heartbeat meeting showed the following points:

NicoRobertIn commented 12 months ago

This bug was not a bug. The property hosts and isHostedOn still have respectedly a range and a domain set to hmas:Hostable This term is not considered useful anymore and is therefore not implemented. Since this is still in the modelet in domains/manufacturing-environments/discover-platforms it means that is will be in the fully merged graph (modules + modelets) and therefore raised an error in the global report

To make it more clear, I changed a little bit the request and message error to detect more easily this case in the report: The property isHostedOn has a domain out of the ontology: <https://purl.org/hmas/Hostable>

NicoRobertIn commented 11 months ago

More recent news:

FabienGandon commented 10 months ago

@NicoRobertIn : I believe that following the last heartbeat meeting we agreed to merge the script branch with the master and we could close that issue and copy some of its content to the documentation where needed.

NicoRobertIn commented 10 months ago

Just for the other ones who were not there at the heartbeat meeting, I made a markdown export of the test report that can be seen there: https://github.com/HyperAgents/hmas/blob/test-workflow/.acimov/output/actions.md

I am currently making it compatible with pre-commit and eventually would like to finish this before the plenary meeting Once it is done I will propose a pull request