Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

How to manage terms (authorities) For OASIS admin and technical people

Frank Feng edited this page Aug 8, 2018 · 13 revisions

For OASIS Admin

To add new terms

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

To delete terms

You need to provide a similar CSV file, containing all terms to be deleted.

To update terms

You need to provide a CSV file, containing all old and new terms, seperated by ',,,', e.g.

Acquisition,,,AcquisitionUpdated

For Technical people

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.

To create a brand new (non existing) authority file

Run:

RAILS_ENV=production bundle exec rake authorities:create_yaml[CSV_FILE_NAME] > config/authorities/XXXX.yml

To add new terms to existing YAML file

Run:

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.

To delete terms

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.

To update terms

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.