Skip to content

Numerous mapping fixes#22

Merged
nchiasson-dgi merged 4 commits into
discoverygarden:mainfrom
bondjimbond:patch-1
Jun 26, 2026
Merged

Numerous mapping fixes#22
nchiasson-dgi merged 4 commits into
discoverygarden:mainfrom
bondjimbond:patch-1

Conversation

@bondjimbond

@bondjimbond bondjimbond commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

In the recommended implementation, items will either have an abstract OR a description. Theses, for example, have only an abstract, no description.

Without this modification, thesis abstracts are not available to OAI-PMH.

Subsequent updates add the publication title and number to dcterms:source, which was entirely missing from the mapping but is a field provided for in the dplava schema: https://dplava.lib.virginia.edu/dplava.xsd; as well as mapping additional Relator terms to the dc:contributor and dc:creator elements.

Summary by CodeRabbit

  • Bug Fixes
    • Standardized abstract metadata to use the common description term for more consistent display.
    • Expanded contributor attribution by mapping additional agent relator types to the appropriate contributor field.
    • Improved publication metadata by adding support for publication title and publication number in the sourced metadata.

In the recommended implementation, items will either have an abstract OR a description. Theses, for example, have only an abstract, no description.

Without this modification, thesis abstracts are not available to OAI-PMH.
@coderabbitai

coderabbitai Bot commented Jan 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bd22173f-3ed6-405f-a1e3-983bba5d1a88

📥 Commits

Reviewing files that changed from the base of the PR and between 5f70597 and 83ccf9a.

📒 Files selected for processing (1)
  • src/Plugin/OaiMetadataMap/DgiStandard.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Plugin/OaiMetadataMap/DgiStandard.php

📝 Walkthrough

Walkthrough

FIELD_MAPPING gains field_abstractdcterms:description, field_publication_titledcterms:source, and field_publication_numberdcterms:source. LINKED_AGENT_MAPPING is extended with relators:cur, relators:hst, and relators:thsdcterms:contributor.

Changes

OAI Metadata Mapping Updates

Layer / File(s) Summary
Metadata mapping configuration updates
src/Plugin/OaiMetadataMap/DgiStandard.php
FIELD_MAPPING gains field_abstractdcterms:description, field_publication_titledcterms:source, and field_publication_numberdcterms:source. LINKED_AGENT_MAPPING is extended with relators:cur, relators:hst, and relators:thsdcterms:contributor.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with nimble feet,
Added mappings tidy, small, and neat,
Abstracts, titles, publications sing,
Contributors gain a splendid wing,
Hooray — the harvest maps complete! 🎋

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and overly broad, using non-descriptive language ('Numerous mapping fixes') that doesn't convey the specific mappings being added (field_abstract, publication metadata, and relator types). Use a more specific title like 'Add field_abstract and publication metadata mappings' or 'Add field_abstract, publication, and relator mappings to OAI standard' to clearly indicate the main changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bondjimbond

Copy link
Copy Markdown
Contributor Author

@jordandukart

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/Plugin/OaiMetadataMap/DgiStandard.php`:
- Line 126: The commit message must be updated to accurately reflect that three
relator mappings were added (not just 'cur' and 'ths'); update the commit
summary/body to mention that 'relators:cur', 'relators:ths' and 'relators:hst'
(host) were added, referencing the change in DgiStandard.php where the mapping
'relators:hst' => 'dcterms:contributor' was introduced so the commit message
matches the code changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f1fd959-e3ce-4d81-89ad-8a9b9764594a

📥 Commits

Reviewing files that changed from the base of the PR and between dc2c8d2 and 00a3bc6.

📒 Files selected for processing (1)
  • src/Plugin/OaiMetadataMap/DgiStandard.php

'relators:dpc' => 'dcterms:contributor',
'relators:drt' => 'dcterms:contributor',
'relators:edt' => 'dcterms:contributor',
'relators:hst' => 'dcterms:contributor',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

MARC Code List for Relators hst host

💡 Result:

In the MARC Code List for Relators, the code hst corresponds to the term host [1][2]. A host is defined as a performer who contributes to a resource by leading a program (often broadcast) that includes other guests, performers, etc., such as a talk show host [2]. The Library of Congress maintains this list, and the codes and terms are used to designate the relationship between an agent and a resource in bibliographic records [3][4]. These codes can also be accessed via the Library of Congress Linked Data Service at id.loc.gov/vocabulary/relators [3][4].

Citations:


🏁 Script executed:

#!/bin/bash
# Description: Search for references to the 'hst' relator code in the codebase.

# Search for 'hst' relator usage in field configurations, migrations, or data
rg -i "relators?:hst\b|relator.*\bhst\b|'hst'|\"hst\"" -g '!*.php' -C2

Repository: discoverygarden/dgi_standard_oai

Length of output: 58


Update commit message to include 'hst' relator mapping.

The commit message mentions adding only 'cur' and 'ths' relator mappings, but the code also adds 'hst' (host, a performer who leads a program). Update the commit message to accurately reflect all three additions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Plugin/OaiMetadataMap/DgiStandard.php` at line 126, The commit message
must be updated to accurately reflect that three relator mappings were added
(not just 'cur' and 'ths'); update the commit summary/body to mention that
'relators:cur', 'relators:ths' and 'relators:hst' (host) were added, referencing
the change in DgiStandard.php where the mapping 'relators:hst' =>
'dcterms:contributor' was introduced so the commit message matches the code
changes.

Add presenter, artist, and designer to list of mappings
Maps field_publication_title and field_publication_number to dcterms:source
@bondjimbond bondjimbond changed the title Add field_abstract mapping to dcterms:description Numerous mapping fixes Jun 15, 2026

@travisLilleberg travisLilleberg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The metadata additions are all valid according to dcterms and MARC relator specifications.

Approved. The only consideration I can think of is if there are any other sites using this that don't want their abstract or publication fields in the OAI feed, but that seems very unlikely.

@nchiasson-dgi nchiasson-dgi added the patch Backwards compatible bug fixes. label Jun 26, 2026
@nchiasson-dgi
nchiasson-dgi merged commit fddec6c into discoverygarden:main Jun 26, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

Tag generated by PR: v1.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Backwards compatible bug fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants