Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMX-234 Update aspace identifiers logic #102

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

ghukill
Copy link
Contributor

@ghukill ghukill commented Aug 16, 2023

What does this PR do?

For ASpace records, any <unitid type="aspace_uri"> elements are skipped for consideration as TIMDEX record identifiers.

Helpful background context

It was discovered that some ASpace records after transformation contained multiple identifiers, of the same type, which was throwing errors in Bento. It looks as though ASpace records may have changed slightly and are exposing a new string for the element, which is the same as the OAI record identifier.

Before:
Screenshot 2023-08-16 at 11 06 56 AM

After:
Screenshot 2023-08-16 at 11 05 54 AM

How can a reviewer manually see the effects of these changes?

Run the following transform:

pipenv run transform -s aspace -i tests/fixtures/ead/ead_record_attribute_and_subfield_variations.xml -o output/aspace-ead-single-identifier.json
  • observe that identifiers property only has a single value, despite two <unitid> elements present under <archdesc level="collection">

What are the relevant tickets?

https://mitlibraries.atlassian.net/browse/TIMX-234

Developer

  • All new ENV is documented in README
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Includes new or updated dependencies?

YES

@ghukill ghukill requested a review from ehanson8 August 16, 2023 16:09
Copy link
Contributor

@ehanson8 ehanson8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, can you just update the commit message title? It looks like it was accidentally omitted

Why these changes are being introduced:

It was discovered that some ASpace records after transformation contained multiple identifiers, of the same type,
which was throwing errors in Bento.  It looks as though ASpace records may have changed slightly and are
exposing a new string for the <unitid> element, which is the same as the OAI record identifier.

How this addresses that need:

When iterating through <unitid> elements, by skipping those with attribute type=aspace_uri, we can
skip adding that particular <unitid> as a TIMDEX record identifier.

Side effects of this change:

Believed to be none.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/TIMX-234
@ghukill ghukill force-pushed the TIMX-234-update-aspace-identifiers branch from 8a93575 to 772feb8 Compare August 16, 2023 17:34
@ghukill
Copy link
Contributor Author

ghukill commented Aug 16, 2023

Works as expected, can you just update the commit message title? It looks like it was accidentally omitted

Thanks, nice catch. Updated.

@ghukill ghukill merged commit 4557960 into main Aug 16, 2023
5 checks passed
@ghukill ghukill changed the title Why these changes are being introduced: Update aspace identifiers logic Aug 17, 2023
@ghukill ghukill changed the title Update aspace identifiers logic TIMX-234 Update aspace identifiers logic Aug 17, 2023
@ghukill ghukill deleted the TIMX-234-update-aspace-identifiers branch August 18, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants