diff --git a/.github/workflows/update_config.yaml b/.github/workflows/update_config.yaml new file mode 100644 index 00000000..32e14c4e --- /dev/null +++ b/.github/workflows/update_config.yaml @@ -0,0 +1,23 @@ +name: Update Config Yaml + +on: + workflow_dispatch: + schedule: + - cron: '0 8 1 * *' #8AM first of the month + +jobs: + update-translation-maps: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Fetch Library Collections Yaml + working-directory: ./config + run: wget -O collection_map.yaml https://raw.githubusercontent.com/mlibrary/search.catalog-index/refs/heads/main/umich_catalog_indexing/lib/translation_maps/umich/collection_map.yaml + - name: Get PR title + run: echo "PR_TITLE=$(date +'%B %Y') update config" >> $GITHUB_ENV + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: "config: update collection yaml" + title: ${{ env.PR_TITLE }} + branch: update-config diff --git a/config/locColl.yaml b/config/collection_map.yaml similarity index 95% rename from config/locColl.yaml rename to config/collection_map.yaml index 466a38cb..4e5947d6 100644 --- a/config/locColl.yaml +++ b/config/collection_map.yaml @@ -1,3 +1,7 @@ +# This is structured for Advanced Search in Spectrum. The "ALL" collections and +# the "desc" field are needed for spectrum but not for indexing. It lives in +# search.catalog-indexing because this has more to do with Alma and indexing +# than the library search front end. mrio 2026-03-06 --- ALL: desc: 'All locations' @@ -43,11 +47,6 @@ BSTA: BSTA OVR: 'Oversize' BSTA REF: 'Reference' #updated 2025-02-21 -BUHR: - desc: 'Buhr Shelving Facility' - collections: - ALL: All collections - #all locations combined in grouping CLEM: desc: 'William L. Clements' collections: @@ -148,14 +147,6 @@ HATCH: HATCH SAR: 'South Asia Reference' HATCH SEAR: 'Southeast Asia Reference' #updated 2025-02-21 -HSRS: - desc: 'Health Sciences Remote Storage' - collections: - ALL: All collections - HSRS IND: 'Indexes' - HSRS OVR: 'Oversize' - HSRS PER: 'Journals' - HSRS STOR: '' MUSIC: desc: 'Music' collections: @@ -216,12 +207,6 @@ MUSM: MUSM CAGE: 'Room 2500 - Cage - By appointment only' MUSM OVR: 'Room 2500 - Oversize' MUSM SPE: 'Special Formats' -OFFS: - desc: 'Offsite Shelving' - collections: - ALL: All collections - OFFS ELLS: '' - OFFS STATE: '' SHAP: desc: 'Shapiro' collections: diff --git a/config/foci/00-catalog.yml b/config/foci/00-catalog.yml index 2e31095d..129efb02 100644 --- a/config/foci/00-catalog.yml +++ b/config/foci/00-catalog.yml @@ -308,7 +308,7 @@ facets: hierarchy: load_inst: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/instLocs.yaml - load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/locColl.yaml + load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/collection_map.yaml field: Library uid: institution aliases: diff --git a/config/foci/03-onlinejournals.yml b/config/foci/03-onlinejournals.yml index c63d803b..b6a11297 100644 --- a/config/foci/03-onlinejournals.yml +++ b/config/foci/03-onlinejournals.yml @@ -277,7 +277,7 @@ facets: hierarchy: load_inst: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/instLocs.yaml - load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/locColl.yaml + load_coll: <%= ENV['SPECTRUM_INST_LOCATION_FILES_DIR'] || "config" %>/collection_map.yaml field: Library uid: institution aliases: diff --git a/config/instLocs.yaml b/config/instLocs.yaml index 7bf77f96..c13b9177 100644 --- a/config/instLocs.yaml +++ b/config/instLocs.yaml @@ -5,9 +5,6 @@ clements: bentley: sublibs: BENT: Bentley Historical -#umtri: -# sublibs: -# UMTRI: Transportation Research Institute Library flint: sublibs: FLINT: Flint Thompson Library @@ -17,11 +14,11 @@ aa: AAEL: Art Architecture & Engineering FVL: Askwith Media Library BSTA: Biological Station - BUHR: Buhr Shelving Facility - CSCAR: CSCAR - Rackham Building +# BUHR: Buhr Shelving Facility +# CSCAR: CSCAR - Rackham Building FINE: Fine Arts HATCH: Hatcher Graduate - HSRS: Health Sciences Remote Shelving +# HSRS: Health Sciences Remote Shelving MUSM: Research Museums Center MUSIC: Music SHAP: Shapiro @@ -34,12 +31,12 @@ all: FVL: Askwith Media Library BENT: Bentley Historical BSTA: Biological Station - BUHR: Buhr Shelving Facility - CSCAR: CSCAR - Rackham Building +# BUHR: Buhr Shelving Facility +# CSCAR: CSCAR - Rackham Building FINE: Fine Arts FLINT: Flint Thompson Library HATCH: Hatcher Graduate - HSRS: Health Sciences Remote Shelving +# HSRS: Health Sciences Remote Shelving MUSM: Research Museums Center MUSIC: Music SHAP: Shapiro diff --git a/overview.md b/overview.md index 79d0e589..2707091b 100644 --- a/overview.md +++ b/overview.md @@ -13,45 +13,45 @@ Areas of confusion or inconsistency: ## Where the code lives -* https://github.com/mlibrary/spectrum +* This repository, the rails app hosting the spectrum-json gem engine These two are the main parts from CLIO that we're still using. - * https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/solr.rb - * https://github.com/mlibrary/spectrum/tree/master/app/models/spectrum/search_engines/summon.rb + * + * Otherwise, these are probably also somewhat relevant: - * https://github.com/mlibrary/spectrum/tree/master/lib/keycard/ - * https://github.com/mlibrary/spectrum/tree/master/config/ + * + * -* https://github.com/mlibrary/spectrum-config +* The repository for the spectrum-json configuration processing and logic. Entirely new code. -* https://github.com/mlibrary/spectrum-json +* The gem engine that handles requests for spectrum. Entirely new code. -* https://github.com/mlibrary/pride +* The javascript library for interacting with spectrum-json for search-related functions. -* https://github.com/mlibrary/prejudice +* The javascript library for interacting with spectrum-json for personalization-related functions. -* https://github.com/mlibrary/search +* The React-based front-end for Search ## Where the configuration lives - * git repository on a local-directory on a dev server - * moku dev / search-testing +* git repository on a local-directory on a dev server +* moku dev / search-testing ## Configuration files @@ -67,8 +67,7 @@ Areas of confusion or inconsistency: * `config/fields.yml` - Where each field is defined. The intention was to allow the field definitions to be shared across datastores so that fielded search concepts could be made to work across multiple datastores. This didn't work so well in practice. - + Where each field is defined. The intention was to allow the field definitions to be shared across datastores so that fielded search concepts could be made to work across multiple datastores. This didn't work so well in practice. A lot of these configuration files ended up being mappings from catalog codes to human readable text or urls. Or providing information on how some hierarchical data is structured. @@ -76,7 +75,6 @@ A lot of these configuration files ended up being mappings from catalog codes to Where each sort option is defined. The intention was to allow the sorting to be shared across datastores so that the same sort concept could be made to work across multiple datastores. That didn't work so well in practice. - * `config/actions.yml` Defines actions a user can take on a record, like exporting to email, sms, or a file download. @@ -99,7 +97,7 @@ A lot of these configuration files ended up being mappings from catalog codes to Describes services available to patrons based on their role at the university. -* `config/keycard.yml` +* `config/keycard.yml` This is a configuration for an expansion of an early version of keycard to support IP addrresses defined in a yaml file, and ldap. Some of that functionality may have been incorporated into keycard itself. We used a fork of keycard because at that time, keycard had a dependency on ActiveRecord. @@ -111,7 +109,7 @@ A lot of these configuration files ended up being mappings from catalog codes to TODO: Remove this file and any code that depends on it if possible. -* `config/locColl.yaml`, `config/instLocs.yaml`, `config/floor_locations.json` +* `config/collection_map.yaml`, `config/instLocs.yaml` These are generated by AIM and written outside of the search directory, and loaded on application startup. That is inconsistent with the moku model, so copies are supplied here. @@ -141,7 +139,7 @@ Broad overview of what happens when a search is conducted by an end user. 5. Results from the multi-search return to Pride, and the record metadata is augmented from Prejudice. 6. Search is notified of the new records asynchronously, and the Redux state is updated, leading to React drawing the search results. -## Lifecycle of a request in Spectrum. +## Lifecycle of a request in Spectrum Detailed walkthrough of what happens when a search request is received by Spectrum