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

Upgrade ontologies_api_client library #324

Merged
merged 6 commits into from
Sep 5, 2024

Conversation

jvendetti
Copy link
Member

This pull request upgrades the ontologies_api_client library from 2.3.0 to 2.4.0 to address the issue raised in ncbo/bioportal-project#320. Along with this upgrade, the following changes are included:

  • Modify the OntologiesController to use the include: all param where necessary. This resolves an issue where fewer attributes were returned from the triplestore due to a change in the ontologies_api_client.
  • Disable a full cache refresh when updating a single ontology or user object to improve performance
  • Replace several instances of the find method with the more performant get method in the ProjectsController and UsersController
  • Modify the UsersController#create method to redirect to the user show page upon successful account creation, avoiding the slow ontology browse page for a better user experience
  • Refactor the ProjectsController#update method to prevent unnecessary fetching of all user and ontology objects after successfully updating a single project
  • Simplify the code for fetching an ontology in SubmissionsController#new
  • Modify the ApplicationHelper#get_username method to avoid issuing REST calls for calculating a user's ID, reducing unnecessary requests

Recent change to the find_by_acronym method in ontologies_api_client result in a lesser set of attributes returned from the triplestore. Also disable cache_refresh_all on updates.
Also refactor the update method to prevent an unnecessary fetch of all users and ontologies on successful updates.
Also disable cache_refresh_all on updates, and redirect to the user show page after successful creates. Redirecting to the (slow to load) ontology browse page isn't a good user experience.
@jvendetti jvendetti self-assigned this Sep 5, 2024
@jvendetti jvendetti merged commit d66089b into master Sep 5, 2024
2 checks passed
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.

1 participant