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

Support for Schema 4.5 #166

Merged
merged 17 commits into from
Dec 4, 2023
Merged

Support for Schema 4.5 #166

merged 17 commits into from
Dec 4, 2023

Conversation

codycooperross
Copy link
Contributor

@codycooperross codycooperross commented Oct 19, 2023

Purpose

Implements the new Schema 4.5 features and XSD, in particular the expansion of the publisher property to allow for additional attributes.

closes: datacite/lupo#1004 #165

Approach

Modifies readers and writers to support both publisher as a hash with new attributes (publisherIdentifier, publisherIdentifierScheme, etc.) and publisher as a string. Adds tests for reading and writing these attributes.

This PR also fixes an issue described in #165 that resulted in errors when validating the new datacite-example-full-v4.5.xml example, which contains a geoLocationPolygon property.

Open Questions and Pre-Merge TODOs

  • This PR does not add support for reading and writing new publisher properties beyond DataCite XML. Mapping from and to other schemas will be part of future work.
  • crossref_writer.rb is currently unmodified. Based on this test, it seems like writing Crossref metadata is expected to produce a nil value:
    it "from DataCite" do
    input = "https://doi.org/10.5061/DRYAD.8515"
    subject = Bolognese::Metadata.new(input: input, from: "datacite")
    expect(subject.crossref).to be nil
    end
    end
    end
    It appears that Crossref writing functionality is not supported yet. There is a several years old PR that proposed to add this functionality, but it was never merged: https://github.com/datacite/bolognese/pull/126/files

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@codycooperross
Copy link
Contributor Author

codycooperross commented Nov 13, 2023

FYI, I tested this branch of bolognese in the current main branch of lupo (prior to the 4.5 feature branch merge). All rspec tests passed, so bolognese should still be deployable in lupo if this branch is merged without any changes to lupo.

@codycooperross codycooperross requested a review from a team November 13, 2023 17:46
Copy link
Contributor

@richardhallett richardhallett left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@ashwinisukale ashwinisukale left a comment

Choose a reason for hiding this comment

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

Hi there :)

Changes looks good to me 🎉 , I have suggested some minor refactoring changes.

Thank you

lib/bolognese/datacite_utils.rb Show resolved Hide resolved
lib/bolognese/readers/crosscite_reader.rb Outdated Show resolved Hide resolved
lib/bolognese/readers/datacite_json_reader.rb Outdated Show resolved Hide resolved
lib/bolognese/readers/schema_org_reader.rb Outdated Show resolved Hide resolved
lib/bolognese/metadata.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@ashwinisukale ashwinisukale left a comment

Choose a reason for hiding this comment

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

Changes looks great to me. Thank you for the work!

Copy link
Contributor

@svogt0511 svogt0511 left a comment

Choose a reason for hiding this comment

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

Added a comment to the last change @codycooperross made to the dc_json writer. Good catch, Cody.

@codycooperross codycooperross merged commit d318634 into master Dec 4, 2023
5 checks passed
@codycooperross codycooperross deleted the schema-4.5 branch December 4, 2023 16: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.

Metadata 4.5 - Bolognese Updates - initial support for Schema 4.5 and publisher attributes
4 participants