From f64bab70f1842cc1b075c2314c5fcbc13d52d4c6 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 22 Aug 2020 11:21:43 +0200 Subject: [PATCH] support crossref peer_review type --- Gemfile.lock | 2 +- lib/bolognese/readers/crossref_reader.rb | 2 + lib/bolognese/utils.rb | 4 +- lib/bolognese/version.rb | 2 +- .../get_crossref_metadata/peer_review.yml | 96 +++++++++++++++++++ spec/readers/crossref_reader_spec.rb | 22 +++++ 6 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml diff --git a/Gemfile.lock b/Gemfile.lock index cda8bfab..6314db99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - bolognese (1.8.7) + bolognese (1.8.8) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) diff --git a/lib/bolognese/readers/crossref_reader.rb b/lib/bolognese/readers/crossref_reader.rb index 5f3c51f9..b2fcfed2 100644 --- a/lib/bolognese/readers/crossref_reader.rb +++ b/lib/bolognese/readers/crossref_reader.rb @@ -85,6 +85,8 @@ def read_crossref(string: nil, **options) when "report_paper" bibliographic_metadata = meta.dig("crossref", "report_paper", "report_paper_metadata").to_h resource_type = "report" + when "peer_review" + bibliographic_metadata = meta.dig("crossref", "peer_review").to_h end resource_type = (resource_type || model).to_s.underscore.camelcase.presence diff --git a/lib/bolognese/utils.rb b/lib/bolognese/utils.rb index 3abefab2..b570ba51 100644 --- a/lib/bolognese/utils.rb +++ b/lib/bolognese/utils.rb @@ -133,7 +133,8 @@ module Utils "ReferenceEntry" => nil, "JournalVolume" => "PublicationVolume", "BookSet" => nil, - "PostedContent" => "ScholarlyArticle" + "PostedContent" => "ScholarlyArticle", + "PeerReview" => "Review" } CR_TO_BIB_TRANSLATIONS = { @@ -219,6 +220,7 @@ module Utils "ScholarlyArticle" => "Text", "Thesis" => "Text", "Service" => "Service", + "Review" => "Text", "SoftwareSourceCode" => "Software", "VideoObject" => "Audiovisual", "WebPage" => "Text", diff --git a/lib/bolognese/version.rb b/lib/bolognese/version.rb index 9789585e..fd20d36e 100644 --- a/lib/bolognese/version.rb +++ b/lib/bolognese/version.rb @@ -1,3 +1,3 @@ module Bolognese - VERSION = "1.8.7" + VERSION = "1.8.8" end diff --git a/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml new file mode 100644 index 00000000..7a37aedb --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml @@ -0,0 +1,96 @@ +--- +http_interactions: +- request: + method: get + uri: https://doi.org/ra/10.7554 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org) + Accept: + - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 + response: + status: + code: 200 + message: '' + headers: + Date: + - Sat, 22 Aug 2020 09:09:10 GMT + Content-Type: + - application/json;charset=UTF-8 + Connection: + - keep-alive + Set-Cookie: + - __cfduid=dc7cd5dde23bd772408198c155ba5278f1598087350; expires=Mon, 21-Sep-20 + 09:09:10 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure + Cf-Cache-Status: + - DYNAMIC + Cf-Request-Id: + - 04b706e111000097cca18f6200000001 + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Server: + - cloudflare + Cf-Ray: + - 5c6b7414eaca97cc-FRA + body: + encoding: ASCII-8BIT + string: |- + [ + { + "DOI": "10.7554", + "RA": "Crossref" + } + ] + http_version: + recorded_at: Sat, 22 Aug 2020 09:09:10 GMT +- request: + method: get + uri: https://api.crossref.org/works/10.7554/elife.55167.sa2/transform/application/vnd.crossref.unixsd+xml + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org) + Accept: + - text/xml + response: + status: + code: 200 + message: OK + headers: + Link: + - ; rel="canonical", ; + rel="license", ; title="Jeremy Magland"; + rel="author", ; title="Elizabeth Lovero"; + rel="author", ; title="Alexander J Morley"; + rel="author", ; title="Cole Lincoln + Hurwitz"; rel="author" + Access-Control-Allow-Origin: + - "*" + Access-Control-Allow-Headers: + - X-Requested-With + Content-Length: + - '5929' + Server: + - http-kit + Date: + - Sat, 22 Aug 2020 09:09:11 GMT + X-Rate-Limit-Limit: + - '50' + X-Rate-Limit-Interval: + - 1s + Connection: + - close + body: + encoding: ASCII-8BIT + string: !binary |- + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGNyb3NzcmVmX3Jlc3VsdCB4bWxucz0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIiB2ZXJzaW9uPSIzLjAiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIGh0dHA6Ly93d3cuY3Jvc3NyZWYub3JnL3NjaGVtYXMvY3Jvc3NyZWZfcXVlcnlfb3V0cHV0My4wLnhzZCI+DQogIDxxdWVyeV9yZXN1bHQ+DQogICAgPGhlYWQ+DQogICAgICA8ZG9pX2JhdGNoX2lkPm5vbmU8L2RvaV9iYXRjaF9pZD4NCiAgICA8L2hlYWQ+DQogICAgPGJvZHk+DQogICAgICA8cXVlcnkgc3RhdHVzPSJyZXNvbHZlZCI+DQogICAgICAgIDxkb2kgdHlwZT0icGVlcl9yZXZpZXciPjEwLjc1NTQvZUxpZmUuNTUxNjcuc2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GlkZW50aWZpZXItdHlwZT0iZG9pIiByZWxhdGlvbnNoaXAtdHlwZT0iaXNSZXZpZXdPZiI+MTAuNzU1NC9lTGlmZS41NTE2NzwvcmVsOmludGVyX3dvcmtfcmVsYXRpb24+DQogICAgICAgICAgICAgICAgPC9yZWw6cmVsYXRlZF9pdGVtPg0KICAgICAgICAgICAgICA8L3JlbDpwcm9ncmFtPg0KICAgICAgICAgICAgICA8ZG9pX2RhdGE+DQogICAgICAgICAgICAgICAgPGRvaT4xMC43NTU0L2VMaWZlLjU1MTY3LnNhMjwvZG9pPg0KICAgICAgICAgICAgICAgIDxyZXNvdXJjZT5odHRwczovL2VsaWZlc2NpZW5jZXMub3JnL2FydGljbGVzLzU1MTY3I3NhMjwvcmVzb3VyY2U+DQogICAgICAgICAgICAgIDwvZG9pX2RhdGE+DQogICAgICAgICAgICA8L3BlZXJfcmV2aWV3Pg0KICAgICAgICAgIDwvY3Jvc3NyZWY+DQogICAgICAgIDwvZG9pX3JlY29yZD4NCiAgICAgIDwvcXVlcnk+DQogICAgPC9ib2R5Pg0KICA8L3F1ZXJ5X3Jlc3VsdD4NCjwvY3Jvc3NyZWZfcmVzdWx0Pg== + http_version: + recorded_at: Sat, 22 Aug 2020 09:09:11 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/readers/crossref_reader_spec.rb b/spec/readers/crossref_reader_spec.rb index 085b89ef..9cc6b799 100644 --- a/spec/readers/crossref_reader_spec.rb +++ b/spec/readers/crossref_reader_spec.rb @@ -179,6 +179,28 @@ expect(subject.agency).to eq("crossref") end + it "peer review" do + input = "https://doi.org/10.7554/elife.55167.sa2" + subject = Bolognese::Metadata.new(input: input) + expect(subject.valid?).to be true + expect(subject.url).to eq("https://elifesciences.org/articles/55167#sa2") + expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"PeerReview", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"Review") + expect(subject.creators.count).to eq(8) + expect(subject.creators.last).to eq("affiliation" => [{"name"=>"Center for Computational Mathematics, Flatiron Institute, New York, United States"}], + "familyName" => "Barnett", + "givenName" => "Alex H", + "name" => "Barnett, Alex H", + "nameType" => "Personal") + expect(subject.titles).to eq([{"title"=>"Author response: SpikeForest, reproducible web-facing ground-truth validation of automated neural spike sorters"}]) + expect(subject.id).to eq("https://doi.org/10.7554/elife.55167.sa2") + expect(subject.identifiers).to be_empty + expect(subject.descriptions).to be_empty + expect(subject.dates).to include({"date"=>"2020-05-19", "dateType"=>"Issued"}) + expect(subject.publication_year).to eq("2020") + expect(subject.publisher).to eq("eLife Sciences Publications, Ltd") + expect(subject.agency).to eq("crossref") + end + it "DOI with SICI DOI" do input = "https://doi.org/10.1890/0012-9658(2006)87[2832:tiopma]2.0.co;2" subject = Bolognese::Metadata.new(input: input)