ncbo / bioportal-project

Serves to consolidate (in Zenhub) all public issues in BioPortal
BSD 2-Clause "Simplified" License
7 stars 5 forks source link

Remove CPT ontology from BioPortal #170

Closed jvendetti closed 3 years ago

jvendetti commented 4 years ago

We've been asked to remove the Current Procedural Terminology ontology from BioPortal. Current plan is to create a new "summary only" submission so that an entry for the ontology metadata remains, but classes and other ontology data will no longer be accessible.

jvendetti commented 4 years ago

Attempted to create a new metadata-only submission on the staging server. Rails application shows an internal server error:

I, [2020-05-14T15:58:39.776419 #13242]  INFO -- : Started POST "/ontologies/CPT/submissions" for 171.66.24.78 at 2020-05-14 15:58:39 -0700
I, [2020-05-14T15:58:39.777657 #13242]  INFO -- : Processing by SubmissionsController#create as HTML
I, [2020-05-14T15:58:39.777840 #13242]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"xAm54j/X/6jSfKnHKMjLLlGrflg8l1H+oXIzaFCfm4bt/PWJP6+Qex+7WxMGJyaWVCm2rS5dkA8hjcxtuFju8w==", "submission"=>{"ontology"=>"https://stagedata.bioontology.org/ontologies/CPT", "description"=>"Current Procedural Terminology", "hasOntologyLanguage"=>"UMLS", "prefLabelProperty"=>"", "synonymProperty"=>"", "definitionProperty"=>"", "authorProperty"=>"", "obsoleteProperty"=>"", "obsoleteParent"=>"", "version"=>"", "status"=>"production", "released"=>"Nov 4, 2019", "isRemote"=>"3", "contact"=>{"0"=>{"name"=>"Dorith Brown", "email"=>"msc@ama-assn.org"}}, "homepage"=>"https://www.ama-assn.org/practice-management/cpt-current-procedural-terminology", "documentation"=>"", "publication"=>""}, "commit"=>"Add submission", "ontology_id"=>"CPT"}
I, [2020-05-14T15:58:40.224767 #13242]  INFO -- : Completed 500 Internal Server Error in 447ms (ActiveRecord: 0.0ms)
F, [2020-05-14T15:58:40.225832 #13242] FATAL -- :
F, [2020-05-14T15:58:40.225880 #13242] FATAL -- : Exception (<h1>Internal Server Error</h1>):
F, [2020-05-14T15:58:40.225914 #13242] FATAL -- :
F, [2020-05-14T15:58:40.225953 #13242] FATAL -- : app/controllers/submissions_controller.rb:22:in `create'
I, [2020-05-14T15:58:40.227488 #13242]  INFO -- : Processing by ErrorsController#internal_server_error as HTML
I, [2020-05-14T15:58:40.227583 #13242]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"xAm54j/X/6jSfKnHKMjLLlGrflg8l1H+oXIzaFCfm4bt/PWJP6+Qex+7WxMGJyaWVCm2rS5dkA8hjcxtuFju8w==", "submission"=>{"ontology"=>"https://stagedata.bioontology.org/ontologies/CPT", "description"=>"Current Procedural Terminology", "hasOntologyLanguage"=>"UMLS", "prefLabelProperty"=>"", "synonymProperty"=>"", "definitionProperty"=>"", "authorProperty"=>"", "obsoleteProperty"=>"", "obsoleteParent"=>"", "version"=>"", "status"=>"production", "released"=>"Nov 4, 2019", "isRemote"=>"3", "contact"=>{"0"=>{"name"=>"Dorith Brown", "email"=>"msc@ama-assn.org"}}, "homepage"=>"https://www.ama-assn.org/practice-management/cpt-current-procedural-terminology", "documentation"=>"", "publication"=>""}, "commit"=>"Add submission", "ontology_id"=>"CPT"}
I, [2020-05-14T15:58:40.229947 #13242]  INFO -- :   Rendering errors/internal_server_error.html.erb within layouts/ontology
I, [2020-05-14T15:58:40.230661 #13242]  INFO -- :   Rendered errors/internal_server_error.html.erb within layouts/ontology (0.6ms)
I, [2020-05-14T15:58:40.233497 #13242]  INFO -- :   Rendered layouts/_topnav.html.haml (1.3ms)
I, [2020-05-14T15:58:40.233826 #13242]  INFO -- :   Rendered layouts/_notices.html.haml (0.2ms)
I, [2020-05-14T15:58:40.233915 #13242]  INFO -- :   Rendered layouts/_header.html.erb (3.0ms)
I, [2020-05-14T15:58:40.235563 #13242]  INFO -- :   Rendered application/_ga_tracking.html.haml (0.1ms)
I, [2020-05-14T15:58:40.235684 #13242]  INFO -- :   Rendered layouts/_footer.html.haml (1.6ms)
I, [2020-05-14T15:58:40.235937 #13242]  INFO -- : Completed 500 Internal Server Error in 8ms (Views: 6.9ms | ActiveRecord: 0.0ms)

The call fails in the back-end. Will need to track down the corresponding error in the REST logs.

jvendetti commented 4 years ago

Found corresponding error in the REST logs (staging.log on ncbostage-rest3):

172.20.222.51 - vendetti [14/May/2020:15:58:40 -0700] "PATCH /ontologies/CPT HTTP/1.0" 500 30 0.2769

... though this doesn't offer much in the way of explanation. The contents of unicorn.stderr.log were more helpful and point to line of code that's failing:

2020-05-14 15:58:40 - NoMethodError - undefined method `split' for nil:NilClass:
        /srv/ncbo/ontologies_api/shared/bundle/ruby/2.5.0/bundler/gems/ontologies_linked_data-4d3ec79191c4/lib/ontologies_linked_data/purl/purl_client.rb:17:in `purl_server_login'
        /srv/ncbo/ontologies_api/shared/bundle/ruby/2.5.0/bundler/gems/ontologies_linked_data-4d3ec79191c4/lib/ontologies_linked_data/purl/purl_client.rb:27:in `create_purl'
        /srv/ncbo/ontologies_api/shared/bundle/ruby/2.5.0/bundler/gems/ontologies_linked_data-4d3ec79191c4/lib/ontologies_linked_data/models/ontology.rb:409:in `save'
        /srv/ncbo/ontologies_api/releases/20200408183624/controllers/ontologies_controller.rb:66:in `block (2 levels) in <class:OntologiesController>'
graybeal commented 4 years ago

Agreed to fold into UMLS import. (Hopefully next 2-3 weeks)

jvendetti commented 4 years ago

The NoMethodError above was the result of a recent change that forced HTTPS redirection on the staging PURL server. Alex rolled back this change, after which I was able to successfully create a summary-only submission for CPT (https://stage.bioontology.org/ontologies/CPT/).

Converting CPT to a summary-only ontology, unfortunately does not do the job of fully removing access to the ontology data. CPT terms still show up in Search results:

Screenshot 2020-06-11 15 20 27

... and also in Annotator results:

Screenshot 2020-06-11 15 27 21

Another subtlety is that the names of summary-only ontologies still appear as options in any select box for ontology selection:

Screenshot 2020-06-11 15 30 23

graybeal commented 4 years ago

check into what we did with Nursing ontology way back when it was removed

alexskr commented 4 years ago

@graybeal please provide updated license text we should display for CPT ontology

graybeal commented 4 years ago

from today's minutes:

CPT can no longer be served by BioPortal due to licensing constraints. Please visit the CPT organization pages at https://www.ama-assn.org/practice-management/cpt-current-procedural-terminology for additional information about accessing this data.