tgbugs / ontquery

a framework querying ontology terms
MIT License
3 stars 3 forks source link

Update Draft created (works for everything but predicates) #13

Closed tmsincomb closed 5 years ago

tmsincomb commented 5 years ago

This is just to show what I was working on. The update is tricky and I decided on my approach for update predicates to be to just add what you want to delete via key "predicates_to_delete" and new predicates to be added via "predicates_to_add" (within the update_entity function in services.py). I found this to be the simplest approach, but I wanted your opinion before I did the same thing for synonyms.

tgbugs commented 5 years ago

Given the constraints I agree that this is a reasonable way to do it. What I might prefer though is that they simply provide the closed set of triples that they want to have included. This vastly simplifies things on our end. Basically, we hand them all the triples that are included and say 'we will compute the diffs for you'. The reason this is better is because you will have to handle cases where someone tries to delete a triple that does not exist and add a triple that already exists, and who wants that? Much easier to just say "give me how you want this to look" and then compute what has been added or deleted after the fact. Does this make sense?

tmsincomb commented 5 years ago

I wanted to get the update_entity working without the predicates involved so they have something to use while I work in the predicate problem. I am in the middle of getting the term_versions table to start tracking the annotations.

tgbugs commented 5 years ago

I'm going to merge this so that I can fix the issues before pushing a bunch of new releases.