New version of commonmeta-py library for scholarly metadata
Yesterday I released version 0.13 of the commonmeta-py library on PyPi. The major new feature is a command-line interface for all metadata conversions, and the metadata validation with the Commonmeta JSON Schema has finally been fixed.
The command-line interface takes any supported persistent identifier or file as input, and returns the metadata in the desired format as output. For example a book chapter with a Crossref DOI formatted as BibTex:
poetry run commonmeta convert 10.1007/978-3-662-46370-3_13 -t bibtex
@inbook{10.1007/978-3-662-46370-3_13,
author = {Diercks, Ronald L. and Ludvigsen, Tom Clement},
booktitle = {Shoulder Stiffness},
copyright = {https://www.springernature.com/gp/researchers/text-and-data-mining},
doi = {10.1007/978-3-662-46370-3_13},
isbn = {9783662463703},
month = feb,
pages = {155--158},
publisher = {Springer Science and Business Media LLC},
title = {Clinical Symptoms and Physical Examinations},
url = {https://link.springer.com/10.1007/978-3-662-46370-3_13},
urldate = {2015},
year = {2015}
}
The JSON Schema validation optionally raises an error if metadata are missing or in the wrong format
poetry run commonmeta convert 10.1371/journal.pmed.0030277.g001 -t datacite --show-errors
Error: 'contributors' is a required property
In this example the Crossref DOI for a component (a figure from a PLOS paper) has no contributor, not needed for Crossref components but required by the Commonmeta JSON Schema and also for all DataCite DOIs (the format we try to convert to).
With this release commonmeta-py has reached feature parity with the commonmeta-ruby library, which I started working on seven years ago under the original name bolognese, but later added important features such as JSON Schema validation and Crossref XML generation.
With these new functionalities, I was able to switch DOI registration for the Rogue Scholar science blog archive to use the commonmeta-py library. At this time using a GitHub Action, but in the future directly built into the Rogue Scholar API. So far I have registered or updated a few dozen DOIs with commonmeta-py in production. With many more DOIs registered in the coming months, I hope to discover issues with the library that are only discovered with a large sample size. I would also like to start supporting DOI registration for science blogs that use DataCite DOIs (currently two blogs participating in Rogue Scholar). And before I can release version 1.0, the documentation has to be greatly improved.
In addition to Rogue Scholar DOI registrations, commonmeta-py is also used to convert metadata into other formats, overcoming some limitations of DOI content negotiation offered by Crossref and DataCite. Today I updated the user interface on the Rogue Scholar website to make it easier to pick the available metadata and content conversion formats for download via an Export menu:
And one of six popular citation styles (also used by Crossref Metadata Search and Zenodo) can be picked via a new Citation menu
The formatted citation is then displayed on the screen for easy copy/paste instead of downloading a text file as in the initial release.
There is one piece of sad news in these changes. Eleven years after quitting my job as a Medical Doctor to become a full-time software developer, I will no longer work with Ruby code on a daily basis – instead doing all software development in Python and Javascript. But I was expecting this to happen at some point, just as I will be using other languages and frameworks five years from now.
References
Fenner, M. (2024). Commonmeta-py (013.2) [Computer software]. Zenodo. https://doi.org/10.5281/ZENODO.8340374
Fenner, M. (2024). Commonmeta-ruby (v3.13) [Computer software]. Zenodo. https://doi.org/10.5281/ZENODO.10615938
Fenner, M. (2017). Bolognese: A Ruby library for conversion of DOI Metadata [Computer software]. DataCite. https://doi.org/10.5438/N138-Z3MK
Fenner, M. (2024, January 16). Improving Rogue Scholar metadata conversions. Front Matter. https://doi.org/10.53731/n4vfp-nwb08
Fenner, M. (2012, April 23). PLoS Article-Level Metrics: Interview with Martin Fenner. Front Matter. https://doi.org/10.53731/r294649-6f79289-8cw2j
Comments ()