psu-libraries / psulib_traject

Penn State University Libraries' Blacklight Catalog Traject Indexer
Apache License 2.0
2 stars 0 forks source link

check if locations can be pulled from webservices #267

Closed banukutlu closed 1 year ago

banukutlu commented 3 years ago

locations used for location_facet https://github.com/psu-libraries/psulib_traject/blob/master/config/settings.yml#L19-L141 (copied from https://github.com/psu-libraries/psulib_blacklight/blob/2eec0480a497082d71cb6063049a08205fc3625b/app/javascript/psulib_blacklight/javascripts/libraries_locations.json#L1-L702)

banukutlu commented 2 years ago

@mkutch could you check what we would get from Symphony?

mkutch commented 2 years ago

@banukutlu would this work for you? You only need a clientID /policy/location/simpleQuery?key=*&includeFields=displayName,description

or did you need something else?

ruthtillman commented 2 years ago

@mkutch some of the cases that I end up editing:

Varied:

HC-8THAF      No    No  Hist. Coll./Labor Archives, 1st Fl Paterno - 8th Air Force
HC-ARCHIVE    No    No  Historical Coll/Labor Archives, 1st Floor Paterno
HC-ASA    No    No  Historical Coll/Labor Archives, 1st FL Paterno - ASA
HC-GENREF     No    No  Historical Coll/Labor Archives, 1st Floor Paterno - Ref.
HC-MAPS   No    No  Hist. Coll./Labor Archives, 1st Fl Paterno - Cartographic
HC-RAILRD     No    No  Historical Coll/Labor Archives, 1st Floor Paterno - Railroad
HC-SERIALS    No    No  Historical Coll/Labor Archives, 1st Floor Paterno - Serials
HC-STORAGE    No    No  Historical Coll/Labor Archives, 1st Floor Paterno - Storage
HC-UMW    No    No  Historical Coll/Labor Archives, 1st Floor Paterno - UMW
HC-USWA   No    No  Historical Coll/Labor Archives, 1st Floor Paterno - USWA

Fairly standardly abbreviated but better when spelled out:

JUVBIGBOOK    Yes   No  Ed. & Behv. Sci., 501 Paterno - Big Books
INDEXES-SS    No    No  Soc.Sci., 2nd Paterno - Abstracts & Indexes - In-Library Use

Also Erie would like to be replaced with "Behrend" (we can do this in the system)

mkutch commented 2 years ago

We can create custom descriptions which will then show up in the translatedDescription field of the call

https://cat-stage.libraries.psu.edu:28443/symwsbc/policy/location/simpleQuery?key=*&includeFields=*

To create custom descriptions in Symphony go to /sirsi/Unicorn/Language/Custom/English/labels add to the labels file LOCN_desc_POLICYNAME, lines such as

LOCN_desc_BROWSE-SS||Social Sciences, 2nd Paterno - Popular Magazines - In-Library Use| LOCN_desc_JUVBIGBOOKS||Education & Behavior Science, 501 Paterno - Big Books|

Update the stamp file.

Modify the policy in Workflows to use the label instead of the description. To do that, you'd just delete the existing description and replace it with the following: $<LOCN_desc_BROWSE-SS>

see more at Sirsi Cases... Case 01304095

@ruthtillman If you create a file with the format I have for the labels file, I can then append it to the labels file. LOCN_desc_POLICYNAME||description|

I will need to write a script to make api calls to do a batch edit policy (do on stage first!)

S97gvFFMXK128^FEACQUISTNS^FcNONE^FWMXK128^WQLOCN^Fv3000000^^O S00gsFFMXK128^FEACQUISTNS^FcNONE^FWMXK128^WPBROWSE-SS^WQLOCN^ud$^Fv3000000^^O S01gdFFMXK128^FEACQUISTNS^FcNONE^FWMXK128^WQLOCN^Fv3000000^^O S02gwFFMXK128^FEACQUISTNS^FcNONE^FWMXK128^WQLOCN^Fv3000000^^O

ruthtillman commented 2 years ago

@mkutch I'm gonna QA the heck out of this before finishing but, does this look right?

PERIOD-DP||Penn State Law (UP) - 3rd Floor - Periodicals|
PERIOD-ED||Paterno, 5th Floor - Current Periodicals Area|
PERIOD-GV||Great Valley - Periodicals - In-Library Use|
PERIOD-HB||Harrisburg - Periodicals- Collection Unavailable Fall 2021|
PERIOD-LS||Paterno, 4th Floor - Current Periodicals Area|
PERIOD-NML||News & Microforms, Leisure Reading Room - Magazine Area|
PERIOD-PT||Paterno - 1st Floor - Magazine Display Area|
PERIOD-RH||Paterno, 3rd Floor - Current Periodicals Area|
PERIOD-SS||Social Science Library, 2nd Paterno - Current Periodicals - In-Library Use|
PEROVER-DN||Dickinson Law (Carlisle) - 2nd Floor - Oversize Periodicals|
PEROVER-DP||Penn State Law (UP) - 3rd Floor - Oversized Periodicals|
PHONO-HB||Harrisburg - Phonograph Record Collection - 1st Floor|
PLANTPATEN||Life Sciences, 4th Paterno - Plant Patents - In-Library Use|
POPNON-NK||New Kensington - Popular Non-Fiction|
POPSCI-PM||Physical & Mathematical Sciences, 201 Davey Lab - Popular Science|
POPULAR-EG||Engineering, 325 Hammond Bldg. - Popular Reading in Technology|
PRESLAB-UP||Preservation Department, Conservation Lab - Reference Collection|
PRESREF-UP||Preservation Department, 402 Pattee Library - Reference Coll|
PRIESTLEY||Rare Books & Manuscripts, 1st Floor Paterno, Priestley Collection|
mkutch commented 2 years ago

Looks good! If not too much trouble can you prepend the policy name with LOCNdesc ? If not I can do it. LOCN_desc_PERIOD-DP||Penn State Law (UP) - 3rd Floor - Periodicals|

Also I was thinking we are only putting the locations whose description don't fit in the custom label file, correct? Those who fit in the description field are fine staying that way, correct? If so then the webservice call would look for the description and if it begins with a $then you look in the translatedDescriptionfield.

ruthtillman commented 2 years ago

Totally!

Also -- I was thinking it would maybe be easier to have them all in one location instead of managing in two places? So that way it's a streamlined thing and the person creating copy-pastes if it all just fits into the Symphony description and they copy-paste-expand if it doesn't?

ajkiessl commented 1 year ago

@whereismyjetpack Since this will involve updating something in source control, I think I could make a GitHub action to create a new PR every month or so that runs a script to update the locations.properties file. Would this be better done with Argo/k8s? Or maybe there's some other, better, strategy?

It also maybe doesn't need to be in source control. But it might be better if it is.

whereismyjetpack commented 1 year ago

I struggle to see where we get ahead by adding more wiring, to be honest. If the file is in source control it's still bound to a release cycle and a manual run of traject.

We also Manually exclude locations, if a new location is added that needs excluding that's still going to need Ruth's manual review.

I say we start with committing the script to this repo, with instructions on how to run it. and circle back at a later date if it needs further automation?

ajkiessl commented 1 year ago

Yeah, good point. For now it might be better to just handle it manually on an as-needed basis.