https://github.com/bodleian/datacite_mds

https://github.com/bodleian/datacite_mds

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: bodleian
  • License: other
  • Language: Ruby
  • Default Branch: master
  • Size: 36.1 KB
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created over 10 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

build Coverage Status MIT license Gem Version Inline docs

What is it?

This gem provides Ruby client connectivity to Datacite's Metadata store (MDS). The MDS is a service for data publishers to mint DOIs and register associated metadata. It is aimed mainly at scientific and research data publishers. This gem allows for simple and seamless interaction with the MDS service.

Installation

Add this line to your application's Gemfile:

gem 'datacite_mds'

And then execute:

$ bundle

Or install it yourself as:

$ gem install datacite_mds

Usage

Require the gem

require 'datacite_mds'

Object creation

create an Mds object (explicit authorization)

mds = Datacite::Mds.new authorize: {usr: "joe bloggs", pwd: "password"}

create an Mds object (implicit authorization via DATACITEUSR, DATACITEPWD environment variables)

mds = Datacite::Mds.new 

create an Mds object for testing (implicit authorization)

mds = Datacite::Mds.new testing: true    

Metadata operations

upload metadata

res = mds.upload_metadata File.read('metadata.xml')
p res # => <Net::HTTPCreated 201 Created readbody=true>

delete metadata

res = mds.delete_metadata '10.5072/existing-doi'
p res # => <Net::HTTPOK 200 OK readbody=true> 

get metadata for existing DOI

res = mds.get_metadata '10.5072/existing-doi'
if res.instance_of? Net::HTTPOK
    p res.body # shows the xml metadata
end    

check if metadata is valid XML for for Datacite Schema (http://schema.datacite.org/meta/kernel-3.1/metadata.xsd)

unless Datacite::Mds.metadata_valid?(INVALID_METADATA)
    Datacite::Mds.validation_errors.each do |error|
        p "Validation error: #{error}"  
    end
end

DOI operations

resolve a DOI

res = mds.resolve '10.5072/existing-doi'
p res # => <Net::HTTPOK 200 OK readbody=true

get all DOIs for datacentre

res = mds.get_all_dois
if res.instance_of? Net::HTTPOK
    p res.body.split # show all DOIs
end

mint a DOI

Note: before minting a DOI, ensure you have uploaded metadata for that DOI, by using the #upload_metadata method.

res = mds.mint '10.5072/non-existing-doi', 'http://ora.ox.ac.uk/objects/uuid:<an-existing-uuid>'
p res # => <Net::HTTPCreated 201 Created readbody=true> 

update dataset for existing DOI

res = mds.mint '10.5072/existing-doi', 'http://ora.ox.ac.uk/objects/uuid:<new-uuid>'    
p res # => <Net::HTTPCreated 201 Created readbody=true> 

Tests

Minitest is used for testing. To run all tests, you must set the DATACITEUSR, DATACITEPWD environment variables and then:

$ rake test

Note: Some of the tests use DOIs and URLs issued to the Bodleian Libraries and can be accessed only by using the Bodleian datacentre authorisation credentials. It is recommended that you substitute these constant variables' values in the test file, with your own datacentre's DOIs and URLs.

License

The gem is available as open source under the terms of the MIT License, c/o The Chancellor Masters and Scholars of the University of Oxford.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Owner

  • Name: Bodleian Libraries
  • Login: bodleian
  • Kind: organization
  • Location: Oxford, UK

The Bodleian Libraries of the University of Oxford

GitHub Events

Total
  • Release event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 2
Last Year
  • Release event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 2

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 31
  • Total Committers: 2
  • Avg Commits per committer: 15.5
  • Development Distribution Score (DDS): 0.032
Top Committers
Name Email Commits
Fred Heath f****h@b****k 30
Michael Davis m****s@b****k 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • rubygems 15,959 total
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 3
rubygems.org: datacite_mds

The MDS is a service for data publishers to mint DOIs and register associated metadata. It is aimed mainly at scientific and research data publishers. This gem allows for simple and seamless interaction with this service.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 15,959 Total
Rankings
Dependent packages count: 15.8%
Dependent repos count: 21.7%
Average: 29.6%
Forks count: 31.6%
Downloads: 33.2%
Stargazers count: 45.6%
Maintainers (3)
Last synced: 10 months ago

Dependencies

datacite_mds.gemspec rubygems
  • bundler ~> 1.10 development
  • coveralls >= 0 development
  • minitest >= 0 development
  • rake ~> 10.0 development
  • travis >= 0 development
  • yard >= 0 development
  • nokogiri ~> 1.6