curationexperts / mahonia

Oregon Health & Science Repository
Apache License 2.0
6 stars 0 forks source link

Add MeSH autocomplete to subject field. #191

Closed little9 closed 6 years ago

little9 commented 6 years ago

This PR changes the subject field to use MeSH terms for autocompletion. The MeSH terms need to be installed on the server using these instructions:

https://github.com/samvera/questioning_authority#medical-subject-headings-mesh

You will need to run rake db:migate after pulling in this commit.

MeSH will require additional work so that Fedora stores the ID and not the label. That is now issue #190.

Closes #124

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 061ac9f4d92d8f9f624142e2d986a945805670df on feature/mesh-autocomplete into 7108de21bca527d6f98999ac6155183ac61abe14 on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 570d56b38612f4e60a048d212deb2465bbb5a559 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 570d56b38612f4e60a048d212deb2465bbb5a559 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

no-reply commented 6 years ago

The failure looks like you are cleaning out the Hyrax Permission Template with DatabaseCleaner and not readding it. https://travis-ci.org/curationexperts/mahonia/builds/318158715#L920

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 3a935fa46ffcc101c8ff3ca05c6a4e318392a520 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 3a935fa46ffcc101c8ff3ca05c6a4e318392a520 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 9f79e31e1fc0ed9ad484e6ac1ad54acec08c9c37 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 9f79e31e1fc0ed9ad484e6ac1ad54acec08c9c37 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

little9 commented 6 years ago

@no-reply could you take another look at this?

The changes that I've made to rails_helper are based on the setup in epigaea and Hyku for the feature tests. It's also based on the DatabaseCleaner documentation.

https://github.com/DatabaseCleaner/database_cleaner#rspec-with-capybara-example https://github.com/samvera-labs/hyku/blob/master/spec/rails_helper.rb

Running AdminSet.find_or_create_default_admin_set_id in before(:suite) was causing me problems in the two specs that require it, so I added that explicitly in those specs. I strongly think it makes sense to have that called directly in the specs that require it.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.477% when pulling 19bea87e5ac050b3f853c5e535af9d83e0264d48 on feature/mesh-autocomplete into 3d61fe976a144c9dde25349b6919d9440bae58ec on master.

no-reply commented 6 years ago

I strongly think it makes sense to have that called directly in the specs that require it.

Yeah, agreed. The previous method seems to rely on transactional database strategy, which is removed in this commit. Doing it in the before suite avoided the db parts of admin set getting cleaned up between specs, but doesn't in the new cleanup approach. As more tests that require admin sets find their way in, I think we can refactor to reduce duplication.

no-reply commented 6 years ago

Thanks! This looks great!

I think we should try to make a hack at getting this DB/admin set setup/teardown in the playbook for future apps sometime before the new year.