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

Discrepancy in OAI-PMH #2200

Merged
merged 7 commits into from Mar 21, 2023

Conversation

amdomanska
Copy link
Contributor

@amdomanska amdomanska commented Jan 25, 2023

Discrepancy in OAI-PMH

Please don't delete any sections when completing this PR template; instead enter N/A for checkboxes or sections which are not applicable, unless otherwise stated below

See 3446

The oai_dc:dc element in each record has missing namespace declaration when required:
https://www.openarchives.org/OAI/openarchivesprotocol.html#OAIPMHschema

Categorisation

This PR...

  • has scripts to run
  • has migrations to run
  • adds new infrastructure
  • changes the CI pipeline
  • affects the public site
  • affects the editorial area
  • affects the publisher area
  • affects the monitoring

Basic PR Checklist

  • FeatureMap annotations have been added
  • Unit tests have been added/modified
  • Functional tests have been added/modified
  • Code has been run manually in development, and functional tests followed locally
  • No deprecated methods are used
  • No magic strings/numbers - all strings are in constants or messages files
  • ES queries are wrapped in a Query object rather than inlined in the code
  • Where possible our common library functions have been used (e.g. dates manipulated via dates)
  • If needed, migration has been created and tested locally
  • Have you done a recent merge up from develop
  • Cleaned up commented out code, etc
  • Release sheet has been created, and completed as far as is possible https://docs.google.com/spreadsheets/d/1Bqx23J1MwXzjrmAygbqlU3YHxN1Wf7zkkRv14eTVLZQ/edit
  • Documentation updates - if needed - have been identified and prepared for inclusion into main documentation (e.g. added and highlighted/commented as appropriate to this PR)
  • There has been a recent merge up from develop (or other base branch)
  • The docs for this branch have been generated and pushed to the doc site (see docs/README.md for details)

Testing

To confirm this works locally, go to:
http://localhost:5004/oai.article?verb=ListRecords&set=TENDOkRlcm1hdG9sb2d5&from=2022-08-31T23%3A00%3A00Z&metadataPrefix=oai_dc

and confirm that the element oai:dc (in metadata for each record) has all the required attributes. Just so you know, some browsers hide that information in the default view - opening the inspector in developers console may be required.

Deployment

What deployment considerations are there? (delete any sections you don't need)

Configuration changes

What configuration changes are included in this PR, and do we need to set specific values for production

Scripts

What scripts need to be run from the PR (e.g. if this is a report generating feature), and when (once, regularly, etc).

Migrations

What migrations need to be run to deploy this

Monitoring

What additional monitoring is required of the application as a result of this feature

New Infrastructure

What new infrastructure does this PR require (e.g. new services that need to run on the back-end).

Continuous Integration

What CI changes are required for this

Copy link
Contributor

@richard-jones richard-jones left a comment

Choose a reason for hiding this comment

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

Unfortunately this job is only half-done. This may fix the oai_dc article endpoint, but it does not address the oai_dc journal endpoint or the doaj formatted metadata article endpoint.

metadata = etree.Element(self.PMH + "metadata", nsmap=self.NSMAP)
oai_doaj_article = etree.SubElement(metadata, self.OAI_DOAJ + "doajArticle")
metadata = etree.Element(self.PMH + "metadata")
oai_doaj_article = etree.SubElement(metadata, self.OAI_DOAJ + "doajArticle", nsmap=self.NSMAP)
oai_doaj_article.set(self.XSI + "schemaLocation",
"http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd http://doaj.org/features/oai_doaj/1.0/ https://doaj.org/static/doaj/doajArticles.xsd")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@richard-jones I am unsure about the schemaLocation that should be added here. Could you help?

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks correct to me, I think

@Steven-Eardley Steven-Eardley merged commit de5829c into develop Mar 21, 2023
@Steven-Eardley Steven-Eardley deleted the feature/3446_oaipmh_missing_metadata_attr branch March 22, 2023 16:48
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

3 participants