BlueBrain / BlueBrain/nexus-forge

'Person' template does not have a 'type' property

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
52
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Using the search method to retrieve the list of 'Persons' resources from `bbp/agents`, I encounter an issue about the `PathWrapper` object having no attribute 'type':
```
> p = forge_prod.paths("Person")
> resources = forge_prod.search(p.type == "Person")
'PathsWrapper' object has no attribute 'type'
```
In fact, it comes from the 'Person' template json not including the type property:
```
> forge_prod.template("Person", output="json")
{
"id": "",
"additionalName": "",
"affiliation": {
"id": "",
"type": "Organization",
"address": "",
"email": "",
"identifier": "",
"name": "",
"parentOrganization": {
"id": "",
"type": "OrganizationShape"
}
},
"email": "",
"familyName": "",
"givenName": "",
"identifier": {
"id": "",
"propertyID": "",
"value": {
"id": ""
}
}
}
```
The Person schema is:
```
> schema_id = forge_prod._model.schema_id('Person')
> print(schema_id)
https://neuroshapes.org/dash/person
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.