Skip to content
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

endpoints for annotations related to the brain #48

Merged
merged 4 commits into from
Apr 27, 2021
Merged

Conversation

selBaez
Copy link
Member

@selBaez selBaez commented Apr 18, 2021

Implemented three endpoints related to 'the brain'. These retrieve a list according to the ontology or the episodic memory. The endpoints get: annotation types (classes and relations) and annotation values (instances).

I used the API routes: api/annotation/class_types, api/annotation/relation_types, /api/annotation/<class_type>/instances. These API routes are open to change.

All the new code supporting these endpoints is in gmrc.annotation.brain.util. The code is mostly taken from the brain package, but I did not want to create a dependency. I also managed to load and query triples without dependency to GraphDB.

Also, the folder structure can be discussed. Maybe the brain sub-folders could/should be scenario specific?

You may test the endpoints with this data:
test_data.zip

Improvements:

  • Load ontology and memory just once. Probably integrate with ScenarioStorage ?
  • Discuss brain folder structure
  • Discuss relation endpoint (maybe it takes entity types as optional arguments?)

@selBaez selBaez requested a review from numblr April 18, 2021 18:04
Copy link
Member

@numblr numblr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice :) I added two two small comments..

gmrc/annotation/brain/util.py Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
…cenario folder, \nfixed path parsing in brain, \nadded version to requirements
@numblr numblr merged commit 3812ac0 into main Apr 27, 2021
@selBaez selBaez deleted the rdf-annotations branch May 6, 2021 09:11
@selBaez selBaez linked an issue May 6, 2021 that may be closed by this pull request
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.

Configuration file for annotation attributes and values
3 participants