diff --git a/Gemfile.lock b/Gemfile.lock index 0a412d73..ad47835d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - bolognese (1.5.20) + bolognese (1.5.20) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) diff --git a/lib/bolognese/metadata.rb b/lib/bolognese/metadata.rb index 6bbd7869..4a7df5ad 100644 --- a/lib/bolognese/metadata.rb +++ b/lib/bolognese/metadata.rb @@ -36,6 +36,7 @@ def initialize(input: nil, from: nil, **options) # generate name for method to call dynamically hsh = @from.present? ? send("get_" + @from, id: id, sandbox: options[:sandbox]) : {} string = hsh.fetch("string", nil) + elsif input.present? && File.exist?(input) filename = File.basename(input) ext = File.extname(input) @@ -115,7 +116,6 @@ def initialize(input: nil, from: nil, **options) ).compact @regenerate = options[:regenerate] || read_options.present? - # generate name for method to call dynamically @meta = @from.present? ? send("read_" + @from, { string: string, sandbox: options[:sandbox], doi: options[:doi], id: id, ra: ra }.merge(read_options)) : {} end @@ -190,7 +190,7 @@ def url end def version_info - @version_info ||= meta.fetch("version_info", nil) + @version_info ||= meta.fetch("version_info", nil) || meta.fetch("version", nil) end def publication_year diff --git a/spec/fixtures/datacite_software_version.json b/spec/fixtures/datacite_software_version.json new file mode 100644 index 00000000..9ccd686e --- /dev/null +++ b/spec/fixtures/datacite_software_version.json @@ -0,0 +1,74 @@ +{ + "id": "https://doi.org/10.5281/zenodo.2598836", + "doi": "10.5281/ZENODO.2598836", + "url": "https://zenodo.org/record/2598836", + "types": { + "ris": "COMP", + "bibtex": "misc", + "citeproc": "article", + "schemaOrg": "SoftwareSourceCode", + "resourceTypeGeneral": "Software" + }, + "creators": [ + { + "name": "Lab For Exosphere And Near Space Environment Studies", + "affiliation": [] + } + ], + "titles": [ + { + "title": "lenses-lab/LYAO_RT-2018JA026426: Original Release" + } + ], + "publisher": "Zenodo", + "container": {}, + "contributors": [], + "dates": [ + { + "date": "2019-03-20", + "dateType": "Issued" + } + ], + "publicationYear": 2019, + "identifiers": [ + { + "identifier": "https://doi.org/10.5281/zenodo.2598836", + "identifierType": "DOI" + }, + { + "identifier": "https://zenodo.org/record/2598836", + "identifierType": "URL" + } + ], + "version": "1.0.0", + "rightsList": [ + { + "rights": "Open Access", + "rightsUri": "info:eu-repo/semantics/openAccess" + } + ], + "descriptions": [ + { + "description": "Original executables used by Gallant et al. for JGR publication 2018JA026426.", + "descriptionType": "Abstract" + } + ], + "relatedIdentifiers": [ + { + "relationType": "IsSupplementTo", + "relatedIdentifier": "https://github.com/lenses-lab/LYAO_RT-2018JA026426/tree/1.0.0", + "relatedIdentifierType": "URL" + }, + { + "relationType": "IsVersionOf", + "relatedIdentifier": "10.5281/zenodo.2598835", + "relatedIdentifierType": "DOI" + } + ], + "schemaVersion": "http://datacite.org/schema/kernel-4", + "providerId": "cern", + "clientId": "cern.zenodo", + "agency": "DataCite", + "state": "findable" +} + \ No newline at end of file diff --git a/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml index 1bd1e1da..0b5c6707 100644 --- a/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +++ b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml @@ -8,7 +8,7 @@ http_interactions: string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.2.1; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; 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: @@ -17,7 +17,7 @@ http_interactions: message: OK headers: Date: - - Wed, 03 Jul 2019 19:23:54 GMT + - Mon, 20 Apr 2020 06:53:04 GMT Content-Type: - application/json; charset=utf-8 Connection: @@ -31,19 +31,19 @@ http_interactions: Vary: - Accept-Encoding, Origin X-Request-Id: - - 990678ce-59e1-4525-845c-fda57ada2b3f + - df4462b7-62d9-4588-accd-cbc7a68cdda2 Etag: - - W/"f1a2db5b06dfe9bb550c6b755b8c4197" + - W/"fac99867d5fb132f8cf45c204c27b31e" X-Runtime: - - '0.021496' + - '0.408212' X-Powered-By: - - Phusion Passenger 6.0.2 + - Phusion Passenger 6.0.4 Server: - - nginx/1.15.8 + Phusion Passenger 6.0.2 + - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT string: !binary |- - eyJkYXRhIjp7ImlkIjoiMTAuNjA4NC9tOS5maWdzaGFyZS40OTA2MzY3LnYxIiwidHlwZSI6ImRvaXMiLCJhdHRyaWJ1dGVzIjp7ImRvaSI6IjEwLjYwODQvbTkuZmlnc2hhcmUuNDkwNjM2Ny52MSIsInByZWZpeCI6IjEwLjYwODQiLCJzdWZmaXgiOiJtOS5maWdzaGFyZS40OTA2MzY3LnYxIiwiaWRlbnRpZmllcnMiOlt7ImlkZW50aWZpZXIiOiJodHRwczovL2RvaS5vcmcvMTAuNjA4NC9tOS5maWdzaGFyZS40OTA2MzY3LnYxIiwiaWRlbnRpZmllclR5cGUiOiJET0kifV0sImNyZWF0b3JzIjpbeyJuYW1lIjoiQ2FiYW5hYywgR3VpbGxhdW1lIiwibmFtZVR5cGUiOiJQZXJzb25hbCIsImdpdmVuTmFtZSI6Ikd1aWxsYXVtZSIsImZhbWlseU5hbWUiOiJDYWJhbmFjIiwibmFtZUlkZW50aWZpZXJzIjpbeyJuYW1lSWRlbnRpZmllciI6Imh0dHBzOi8vb3JjaWQub3JnLzAwMDAtMDAwMy0zMDYwLTYyNDEiLCJuYW1lSWRlbnRpZmllclNjaGVtZSI6Ik9SQ0lEIn1dfV0sInRpdGxlcyI6W3sidGl0bGUiOiJTY2ltYWcgY2F0YWxvZ3VlIG9mIExpYkdlbiBhcyBvZiBKYW51YXJ5IDFzdCwgMjAxNCJ9XSwicHVibGlzaGVyIjoiRmlnc2hhcmUiLCJjb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6MCwiY2l0YXRpb25zT3ZlclRpbWUiOltdLCJwYXJ0Q291bnQiOjAsInBhcnRPZkNvdW50IjowLCJ2ZXJzaW9uQ291bnQiOjAsInZlcnNpb25PZkNvdW50IjowLCJjcmVhdGVkIjoiMjAxNy0wNC0yOFQxMzoxMTo0NS4wMDBaIiwicmVnaXN0ZXJlZCI6IjIwMTctMDQtMjhUMTM6MTE6NDYuMDAwWiIsInB1Ymxpc2hlZCI6IjIwMTciLCJ1cGRhdGVkIjoiMjAxOS0wOC0wMlQxNDozMToyOC4wMDBaIn0sInJlbGF0aW9uc2hpcHMiOnsiY2xpZW50Ijp7ImRhdGEiOnsiaWQiOiJmaWdzaGFyZS5hcnMiLCJ0eXBlIjoiY2xpZW50cyJ9fSwibWVkaWEiOnsiZGF0YSI6eyJpZCI6IjEwLjYwODQvbTkuZmlnc2hhcmUuNDkwNjM2Ny52MSIsInR5cGUiOiJtZWRpYSJ9fSwicmVmZXJlbmNlcyI6eyJkYXRhIjpbXX0sImNpdGF0aW9ucyI6eyJkYXRhIjpbXX0sInBhcnRzIjp7ImRhdGEiOltdfSwicGFydE9mIjp7ImRhdGEiOltdfSwidmVyc2lvbnMiOnsiZGF0YSI6W119LCJ2ZXJzaW9uT2YiOnsiZGF0YSI6W119fX19 http_version: - recorded_at: Wed, 03 Jul 2019 19:23:54 GMT + recorded_at: Mon, 20 Apr 2020 06:53:04 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml new file mode 100644 index 00000000..7597c0fd --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml @@ -0,0 +1,52 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.datacite.org/dois/10.5281/zenodo.2598836 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6; 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: OK + headers: + Date: + - Mon, 20 Apr 2020 05:55:38 GMT + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 200 OK + X-Anonymous-Consumer: + - 'true' + Cache-Control: + - max-age=0, private, must-revalidate + Vary: + - Accept-Encoding, Origin + X-Request-Id: + - d631b1ae-cacf-413c-894c-5dea5d12f7d8 + Etag: + - W/"0a3a05feab61da175242717737e6edc1" + X-Runtime: + - '0.271158' + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.14.0 + Phusion Passenger 6.0.4 + body: + encoding: ASCII-8BIT + string: '{"data":{"id":"10.5281/zenodo.2598836","type":"dois","attributes":{"doi":"10.5281/zenodo.2598836","prefix":"10.5281","suffix":"zenodo.2598836","identifiers":[{"identifier":"https://doi.org/10.5281/zenodo.2598836","identifierType":"DOI"},{"identifier":"https://zenodo.org/record/2598836","identifierType":"URL"}],"creators":[{"name":"Lab + For Exosphere And Near Space Environment Studies","affiliation":[]}],"titles":[{"title":"lenses-lab/LYAO_RT-2018JA026426: + Original Release"}],"publisher":"Zenodo","container":{},"publicationYear":2019,"subjects":[],"contributors":[],"dates":[{"date":"2019-03-20","dateType":"Issued"}],"language":null,"types":{"ris":"COMP","bibtex":"misc","citeproc":"article","schemaOrg":"SoftwareSourceCode","resourceTypeGeneral":"Software"},"relatedIdentifiers":[{"relationType":"IsSupplementTo","relatedIdentifier":"https://github.com/lenses-lab/LYAO_RT-2018JA026426/tree/1.0.0","relatedIdentifierType":"URL"},{"relationType":"IsVersionOf","relatedIdentifier":"10.5281/zenodo.2598835","relatedIdentifierType":"DOI"}],"sizes":[],"formats":[],"version":"1.0.0","rightsList":[{"rights":"Open + Access","rightsUri":"info:eu-repo/semantics/openAccess"}],"descriptions":[{"description":"Original + executables used by Gallant et al. for JGR publication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JpcHRpb24+CiAgPC9kZXNjcmlwdGlvbnM+CjwvcmVzb3VyY2U+","url":"https://zenodo.org/record/2598836","contentUrl":null,"metadataVersion":0,"schemaVersion":"http://datacite.org/schema/kernel-4","source":"mds","isActive":true,"state":"findable","reason":null,"viewCount":0,"viewsOverTime":[],"downloadCount":0,"downloadsOverTime":[],"referenceCount":0,"citationCount":0,"citationsOverTime":[],"partCount":0,"partOfCount":0,"versionCount":0,"versionOfCount":0,"created":"2019-03-20T02:32:02.000Z","registered":"2019-03-20T02:32:02.000Z","published":"2019","updated":"2019-08-02T22:04:29.000Z"},"relationships":{"client":{"data":{"id":"cern.zenodo","type":"clients"}},"media":{"data":{"id":"10.5281/zenodo.2598836","type":"media"}},"references":{"data":[]},"citations":{"data":[]},"parts":{"data":[]},"partOf":{"data":[]},"versions":{"data":[]},"versionOf":{"data":[]}}}}' + http_version: + recorded_at: Mon, 20 Apr 2020 05:55:38 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/writers/citeproc_writer_spec.rb b/spec/writers/citeproc_writer_spec.rb index cd721889..acd7954c 100644 --- a/spec/writers/citeproc_writer_spec.rb +++ b/spec/writers/citeproc_writer_spec.rb @@ -94,6 +94,24 @@ expect(json["title"]).to eq("Scimag catalogue of LibGen as of January 1st, 2014") end + it "software w/version" do + input = "https://doi.org/10.5281/zenodo.2598836" + subject = Bolognese::Metadata.new(input: input, from: "datacite") + json = JSON.parse(subject.citeproc) + expect(json["type"]).to eq("article") + expect(json["DOI"]).to eq("10.5281/zenodo.2598836") + expect(json["version"]).to eq("1.0.0") + end + + it "software w/version from datacite_json" do + input = fixture_path + "datacite_software_version.json" + subject = Bolognese::Metadata.new(input: input, from: "datacite_json") + json = JSON.parse(subject.citeproc) + expect(json["type"]).to eq("article") + expect(json["DOI"]).to eq("10.5281/ZENODO.2598836") + expect(json["version"]).to eq("1.0.0") + end + it "multiple abstracts" do input = "https://doi.org/10.12763/ona1045" subject = Bolognese::Metadata.new(input: input, from: "datacite")