Skip to content

Conversation

ghukill
Copy link
Contributor

@ghukill ghukill commented Jun 3, 2025

Purpose and background context

Updates the EAD transformer to handle OAI identifiers with one or two forward slashes in the identifier, e.g.:

  • oai:mit//repository:42
  • oai:mit/repository:42

Where the extracted TIMDEX identifier should be repository:42 for both.

As noted in TIMX-501, this change in the OAI output was from an ASpace 4.x upgrade, is approved by ASpace stakeholders, and will remain the output going forward. But FWIW, this regex change will handle either situation.

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

Not much to see! This line from an EAD test confirms that, even with the new OAI identifier in the stubbed record, we get the same TIMDEX identifier.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

Importantly, NO: the final timdex_record_id will be unchanged despite the source EAD changing its format slightly

What are the relevant tickets?

Developer

  • All new ENV is documented in README
  • All new ENV has been added to staging and production environments
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed and verified
  • New dependencies are appropriate or there were no changes

Why these changes are being introduced:

ArchivesSpace recently had an upgrade that removed a forward slash
from the OAI identifier.

How this addresses that need:
* Use regex to parse TIMDEX identifier from the OAI identifier, supporting
both single and double slashes (though should be single going forward)
* The final identifier is the same either way

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-501
@ghukill ghukill requested a review from a team June 4, 2025 13:33
@ghukill ghukill marked this pull request as ready for review June 4, 2025 13:33
@ehanson8 ehanson8 self-assigned this Jun 4, 2025
@ghukill ghukill merged commit b74a338 into main Jun 4, 2025
5 checks passed
Copy link

sentry-io bot commented Jun 4, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ValueError: Could not parse TIMDEX identifier from OAI identifier: 'oai:mit:/repositories/2/resources/1345' transmogrifier.sources.xml.ead in get_source_re... View Issue

Did you find this useful? React with a 👍 or 👎

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.

2 participants