-
Notifications
You must be signed in to change notification settings - Fork 0
How to manage terms (authorities) For OASIS admin and technical people
You need to provide a CSV file, containing all new terms, e.g.
20180807_journals_to_add.csv:
Applied Linguistics Review
Computer Assisted Language Learning
English for Specific Purposes
Intercultural Pragmatics
International Journal of Bilingualism
Journal of Communication Disorders
Journal of French Language Studies
Journal of Second Language Pronunciation
Language Culture and Curriculum
Language Teaching
Language and Intercultural Communication
Literacy
Metaphor and Symbol
Multilingua - Journal of Cross-Cultural and Interlanguage Communication
Porta Linguarum
Pragmatics and Society
ReCALL
Revista Española de Lingüística Aplicada /Spanish Journal of Applied Linguistics
Vial-Vigo International Journal of Applied Linguistics
World Englishes
You need to provide a similar CSV file, containing all terms to be deleted.
You need to provide a CSV file, containing all old and new terms, seperated by ',,,', e.g.
Acquisition,,,AcquisitionUpdated
There are some rake tasks in app/lib/tasks/authorities.rake. As long as received the required CSV file, run individual rake tasks to do the CRUD.
As the generated/updated authority files should be merged back to master, a new branch should be created before running any rake tasks.
First run:
git checkout -b authority_update_20180803 (change to any sensible branch name you like)When finished updating, create a PR and get it merged to master.
Run:
RAILS_ENV=production bundle exec rake authorities:create_yaml[CSV_FILE_NAME] > config/authorities/XXXX.ymlRun:
bundle exec rake authorities:add_terms[AUTHORITY_YAML_FILE,NEW_TERMS_CSV,UPDATED_YAML_FILE]e.g.
bundle exec rake authorities:add_terms[config/authorities/journals.yml,lib/assets/authorities/add/20180807_journals.csv,config/authorities/journals_new.yml]Check UPDATED_YAML_FILE and overwrite ORIGINAL_YAML_FILE.
Run:
bundle exec rake authorities:del_terms[ORIGINAL_YAML_FILE,TERMS_TO_DELETE_LIST.csv,UPDATED_YAML_FILE]e.g.
bundle exec rake authorities:del_terms[config/authorities/journals.yml,lib/assets/authorities/delete/20180807_journals.csv,config/authorities/journals_new.yml]Check UPDATED_YAML_FILE and overwrite ORIGINAL_YAML_FILE.
NB: This task has not been tested, due to a local Solr problem.
Run:
bundle exec rake authorities:update_terms[ORIGINAL_YAML_FILE,TERMS_TO_UPDATE_LIST.csv,UPDATED_YAML_FILE]e.g.
bundle exec rake authorities:update_terms[config/authorities/research_areas.yml,lib/assets/authorities/update/20180808_topics.csv,config/authorities/topics_new.yml]Check UPDATED_YAML_FILE and overwrite ORIGINAL_YAML_FILE.