-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement Instances goo model #123
Conversation
Hi @syphax-bouazzouni. Thank you for the effort thus far in implementing pagination for the /instances endpoint. If you're considering two different solutions to the same problem, we prefer that you submit them as separate pull requests. It's more straightforward for us internally to view, discuss, run unit tests against, and accept/reject a pull request when it contains a single implementation. In general, we'd prefer to avoid commit histories on the master branch where two different implementations are committed, one of which ultimately has to be reverted. |
Discussed this today with @syphax-bouazzouni FYI: We have chosen the 2nd solution in AgroPortal which sound cleaner to @syphax-bouazzouni ... however if you guys prefer to stay on the first one which is less invasive but less harmonized with the rest of the code... let us know we can rollback here to be sure we have both the same solution. UIs to come will work independently of the solution chosen (cf. ontoportal-lirmm/bioportal_web_ui#16) |
In the interest of saving everyone some time, I think we should just try to move forward with evaluating this single pull request. Particularly now that you've indicated that the most recent commit contains your desired solution. Going forward, I'd prefer the approach I suggested above where any given pull request contains only your desired solution, vs. multiple solutions for us to choose from. |
467f87e
to
6c7d312
Compare
6c7d312
to
6149728
Compare
Hi all, |
6149728
to
c4562cc
Compare
What?
This pull request implement Instances (goo) model.
Why?
In Agroportal, we have some ontologies that have a significant number of instances (e.g E-PHY ontology with 127856 instances), those instances contains rich informations that worth been see in a UI , so we thought implementing that would be a good contribution for the ontoportal code (see issue agroportal/project-management#119) and become a good added value for ontoportal users.
However before the UI we needed first to implement pagination for the instances of a class (which wasn't done before and cause problems when we have a large number of instances), so this pull request is the result that we got.
How?
Before this PL in the InstanceLoader was hard coded a SPARQL query fro getting all the instances of an ontology or class than do a range delimitation for the pagination (only in the case of instances of an ontology) , but we thought after adding the pagination to the classes too, that it will be better if we Implement a goo model for representing "Instances" and refactored the InstanceLoader to use the goo api.
So we created a goo model for the instances and refactored all the InstanceLoader for no more using hard coded SPARQL queries but instead the goo api which make the code more clean and more harmonized with the rest.
Some notes and discussion about futur contributions
Screenshots
Instances by class
Anything Else?
About me: IT engineer at LIRMM & MISTEA for Agroportal (France)
contact me at : [email protected] or in the Ontoportal Alliance Slack