Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 09 12:17

    annakristinkaufmann on master

    Created thickness schema (#347)… (compare)

  • Oct 09 12:17
    annakristinkaufmann closed #347
  • Oct 09 12:17
    annakristinkaufmann assigned #347
  • Oct 09 12:01
    annakristinkaufmann opened #347
  • Oct 09 12:01
    annakristinkaufmann review_requested #347
  • Oct 09 11:58
    annakristinkaufmann opened #346
  • Oct 04 19:46
    alegrm closed #330
  • Oct 04 19:44

    alegrm on DKE-35_add_unittesting_scripts

    (compare)

  • Oct 04 19:44

    alegrm on master

    Unit tests for validating schem… (compare)

  • Oct 04 19:44
    alegrm closed #337
  • Oct 03 09:25
    alegrm synchronize #337
  • Oct 03 09:25

    alegrm on DKE-35_add_unittesting_scripts

    let travis conf that works (compare)

  • Oct 03 07:23
    alegrm synchronize #337
  • Oct 03 07:23

    alegrm on DKE-35_add_unittesting_scripts

    try add stage (compare)

  • Oct 03 07:14
    alegrm synchronize #337
  • Oct 03 07:14

    alegrm on DKE-35_add_unittesting_scripts

    try add stage (compare)

  • Oct 03 07:12
    alegrm synchronize #337
  • Oct 03 07:12

    alegrm on DKE-35_add_unittesting_scripts

    try add stage (compare)

  • Oct 03 07:08
    alegrm synchronize #337
  • Oct 03 07:08

    alegrm on DKE-35_add_unittesting_scripts

    try add stage (compare)

Mohameth François SY
@MFSY

Best SHACL tutorials, playground and book:

http://www.validatingrdf.com/

Mohameth François SY
@MFSY
Hi @/all .A new python SHACL validator released from RDFLib
Mohameth François SY
@MFSY

The new structure of neuroshapes is up on the master branch. A v0 branch is available to work with the previous structure for the next two weeks (Feb 20).

All current PRs will be merged in the v0 branch and then the schemas will be automatically tranformed to the new format and structure by Feb 20.

We’re still working on having all the schemas and the tests upon PR ready by Feb 20
Andrew Davison
@apdavison

I'm having problems with qualifiedValueShape in neurosciencegraph/simulation/modelvalidation. As far as I can see, this should satisfy the shapes:

{
    "@context": [
        "https://nexus-int.humanbrainproject.org/v0/contexts/neurosciencegraph/core/data/v0.3.1",
        "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0",
        {
            "name": "schema:name",
            "description": "schema:description",
            "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
            "prov": "http://www.w3.org/ns/prov#",
            "schema": "http://schema.org/",
            "generated": "prov:generated",
            "used": "prov:used",
            "startedAtTime": "prov:startedAtTime",
            "wasAssociatedWith": "prov:wasAssociatedWith",
            "referenceData": "nsg:referenceData"
        }
    ],
    "@type": [
        "prov:Activity",
        "nsg:ModelValidation"
    ],
    "startedAtTime": "2018-09-21T14:24:21.144231+00:00",
    "used": [
        {
            "@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/simulation/memodel/v0.1.2/f692971c-1e57-41bc-a5fc-c81e16ddb64f",
            "@type": [
                "prov:Entity",
                "nsg:MEModel",
                "nsg:ModelInstance"
            ]
        },
        {
            "@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/core/collection/v0.1.0/d9dc5f65-a9a5-48a5-afc5-0117019080a7",
            "@type": [
                "nsg:Collection",
                "prov:Entity"
            ]
        }
    ],
    "generated": {
        "@type": [
            "prov:Entity",
            "nsg:ValidationResult"
        ],
        "@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/simulation/validationresult/v0.1.1/fef2918a-eb6a-4dfd-8b1e-1d8f2fb87de3"
    }
}

but I get:

{
    "violations": [
        "Error: Violation Error(<http://www.w3.org/ns/shacl#qualifiedShapeError>). Node(_:693e0c1c70a1cef366718f295425f749) qualified shape error. Expected _:693e0c1c70a1cef366718f295425f749 to satisfy qualifiedValueShape. Value = 0, min: 1, max: 1 Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:48c9925111f99d48ed96ff972985b045, path: PredicatePath(<http://www.w3.org/ns/prov#used>)",
        "Error: Violation Error(<http://www.w3.org/ns/shacl#ShapesFailed>). Node(_:693e0c1c70a1cef366718f295425f749) Failed property shapes Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:74a3c68a4e7632ce6c2c5545457d19d5, path: PredicatePath(<>)",
        "Error: Violation Error(<http://www.w3.org/ns/shacl#qualifiedShapeError>). Node(_:693e0c1c70a1cef366718f295425f749) qualified shape error. Expected _:693e0c1c70a1cef366718f295425f749 to satisfy qualifiedValueShape. Value = 0, min: 1, max: 1 Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:3e1e131689b30d72d1fbed3429e5f091, path: PredicatePath(<http://www.w3.org/ns/prov#used>)"
    ],
    "code": "ShapeConstraintViolations",
    "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/error/v0.1.0"
}

Any idea what's wrong?

(this is with v0)
Mohameth François SY
@MFSY

Hi @apdavison,

I’m afraid QualifiedValueShape are not working in v0 because of the validator it is based on which does not handle it correctly.

We tried to use QualifiedValueShape in other schemas like in neurosciencegraph/atlas/atlasconstruction but it never worked.

Andrew Davison
@apdavison
ok, so I should just update the schema to remove those constraints for now (until HBP moves to v1)
Mohameth François SY
@MFSY
Yes. I would suggest that. That would mean just requiring prov:used to have two value nodes each of them being of type prov:Entity
FeldNico
@FeldNico

Hello. I try to implement this hierarchical schema SoftwareFeatureCategory:

{
    "@context": [
        "https://nexus-int.humanbrainproject.org/v0/contexts/neurosciencegraph/core/schema/v0.1.0",
        {
            "this": "https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/software/softwarefeaturecategory/v0.1.1/shapes/"
        },
        "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
    ],
    "@id": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
    "@type": "nxv:Schema",
    "imports": [
        "https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0"
    ],
    "shapes": [
        {
            "@id": "this:SoftwareFeatureCategoryShape",
            "@type": "sh:NodeShape",
            "and": [
                {
                    "comment": "The following properties are provided by EntityShape: schema:name, schema:description, nsg:providerId, schema:citation, schema:license, schema:dateCreated, prov:wasRevisionOf, prov:wasDerivedFrom, prov:wasAttributedTo, schema:image, schema:distribution, schema:identifier",
                    "node": "https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape"
                },
                {
                    "property": [
                        {
                            "comment": "reference to nsg:SoftwareFeature, nsg:SoftwareFeatureCategory or external feature (e.g. https://www.wikidata.org/wiki/Q192869)",
                            "description": "reference to a specific feature of this featurecategory.",
                            "name": "Feature Instances",
                            "nodeKind": "sh:IRI",
                            "path": "schema:feature"
                        }
                    ]
                }
            ],
            "label": "This shape represents a softwarefeaturecategory a softwarefeature can belong to",
            "nodekind": "sh:BlankNodeOrIRI",
            "targetClass": "nsg:SoftwareFeatureCategory"
        }
    ],
    "nxv:rev": 2,
    "nxv:published": true,
    "nxv:deprecated": false,
    "links": {
        "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
        "self": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1"
    }
}

where schema:feature could be an external link, another schema or again a SoftwareFeatureCategory.

Now, if i try to add a SFCategory to another SFCategorys schema:feature i get the following error:

{
    "violations": [
        "Error: Violation Error(<http://www.w3.org/ns/shacl#ShapesFailed>). Node(<https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>) Failed property shapes Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: <https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape>, path: PredicatePath(<>)",
        "Error: Violation Error(<http://www.w3.org/ns/shacl#minCountError>). Node(<https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>) MinCount violation. Expected 1, obtained: 0 Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: _:2ff36fbb92c2e9f5db34379bd3a87561, path: PredicatePath(<http://schema.org/name>)"
    ],
    "code": "ShapeConstraintViolations",
    "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/error/v0.1.0"
}

Is a hierarchical structure not supported in v0?
Thanks for your help!

Adding another schema does work
Mohameth François SY
@MFSY

Hi @FeldNico ,

The violation is due to http:schema.org/name not being present as required by teh entity schema which is extended by this:SoftwareFeatureCategoryShape:
https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape

The part of the violation message that shows that:

MinCount violation. Expected 1, obtained: 0 Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: _:2ff36fbb92c2e9f5db34379bd3a87561, path: PredicatePath(<http://schema.org/name>)”
FeldNico
@FeldNico
These are the entities i try to put in a hierachy:
{
    "@context": [
        {
            "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
            "prov": "http://www.w3.org/ns/prov#",
            "schema": "http://schema.org/"
        },
        "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
    ],
    "@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1",
    "@type": [
        "prov:Entity",
        "nsg:SoftwareFeatureCategory"
    ],
    "schema:name": "Output",
    "nxv:rev": 1,
    "nxv:deprecated": false,
    "links": {
        "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
        "incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1/incoming",
        "outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1/outgoing",
        "schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
        "self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1"
    }
}
{
    "@context": [
        {
            "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
            "prov": "http://www.w3.org/ns/prov#",
            "schema": "http://schema.org/"
        },
        "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
    ],
    "@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975",
    "@type": [
        "prov:Entity",
        "nsg:SoftwareFeatureCategory"
    ],
    "schema:feature": [
        {
            "@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeature/v0.1.1/f70f86be-ea3f-4de8-aa65-9d2edefbd34d",
            "@type": [
                "prov:Entity",
                "nsg:SoftwareFeature"
            ]
        }
    ],
    "schema:name": "Data Formats",
    "nxv:rev": 2,
    "nxv:deprecated": false,
    "links": {
        "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
        "incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975/incoming",
        "outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975/outgoing",
        "schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
        "self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975"
    }
}
Is that "schema:name" not sufficient?
And as you can see adding another entity from another schema does work
Mohameth François SY
@MFSY
The identifier seems different this time. The error was about the entity with uuid 913c4fa1-1cd3-42f1-92b9-f46334573747. Can you please provide payloads correspondingonding to the error so that I can help degub this.
FeldNico
@FeldNico
I'm sorry. This is the one
{
    "@context": [
        {
            "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
            "prov": "http://www.w3.org/ns/prov#",
            "schema": "http://schema.org/"
        },
        "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
    ],
    "@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747",
    "@type": [
        "prov:Entity",
        "nsg:SoftwareFeatureCategory"
    ],
    "schema:name": "Input",
    "nxv:rev": 1,
    "nxv:deprecated": false,
    "links": {
        "@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
        "incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747/incoming",
        "outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747/outgoing",
        "schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
        "self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747"
    }
}
Mohameth François SY
@MFSY

So I think the issue is still due to http:schema.org/name not being present for the value of schema:feature which I guess is of type nsg: SoftwareFeatureCategory. The schema target entities of type nsg: SoftwareFeatureCategory within the provided payload and expects them to have http:schema.org/name value.

Try to add a value for the property http:schema.org/name for the entity in schema:feature.

FeldNico
@FeldNico
Maybe i'm a blockhead. All my entities have the context "schema": "http://schema.org/" and have a "schema:name"-attribute. What i try to do is smth. like this: "FeatureCategory->FeatureCategory->Feature" When referencing a FeatureCategory to another FeatureCategory i get the error.
When i create a new schema "FeatureSubCategory", which is a exact copy of FeatureCategory just with another name, and i try the following: "FeatureCategory->FeatureSubCategory->Feature" it does work.
So maybe there is a problem with entities referencing another entity of the same kind?
I am sorry for the trouble.