PyRDM: A Python-based Library for Automating the Management and Online Publication of Scientific Software and Data

Christian T. Jacobs, Alexandros Avdis, Gerard Gorman, Matthew D. Piggott

Abstract

The recomputability and reproducibility of results from scientific software requires access to both the source code and all associated input and output data. However, the full collection of these resources often does not accompany the key findings published in journal articles, thereby making it difficult or impossible for the wider scientific community to verify the correctness of a result or to build further research on it. This paper presents a new Python-based library, PyRDM, whose functionality aims to automate the process of sharing the software and data via online, citable repositories such as Figshare. The library is integrated into the workflow of an open-source computational fluid dynamics package, Fluidity, to demonstrate an example of its usage.

Introduction

In computational science, a published paper is often merely the "tip of the iceberg." The underlying substance—source code, raw input data, and large output files—frequently remains on local storage, inaccessible to the broader community. This lack of transparency creates significant barriers to verification and cumulative research. The authors identify three primary hurdles: a lack of academic incentive for sharing software, the technical complexity of managing versions and Digital Object Identifiers (DOIs), and the "provenance gap"—the difficulty in guaranteeing that shared code exactly matches the version used to produce specific results.

PyRDM (Python Research Data Management) addresses these challenges by integrating data management directly into the scientific software workflow, making reproducibility a "push-button" process.

System Architecture and Methods

PyRDM is designed as a modular library centered around two primary functional components: the Figshare class and the Publisher class. The Figshare class handles low-level API communications to manage repositories and file uploads, while the Publisher class contains the high-level logic for scientific workflows, such as identifying relevant files and associating author metadata.

The system architecture of PyRDM showing the interaction between the user, the simulation software (Fluidity), and external repositories like Figshare and GitHub.

Key Technical Features

  • Git and GitHub Integration: To ensure exact versioning, PyRDM utilizes SHA-1 hashes from Git. If a specific software revision has not yet been published, the library automatically packages the source code as a .zip file and uploads it to a repository.
  • Efficient Data Handling: Scientific datasets, such as 3D meshes, can be massive. PyRDM employs MD5 checksums to identify changed files, ensuring that only new or modified data is uploaded, which saves significant bandwidth and time.
  • Automated Provenance: PyRDM creates a permanent "paper trail" by automatically linking the DOIs of the software version and input data to the metadata of the output results.

Implementation and Workflow Integration

To demonstrate practical utility, the authors integrated PyRDM into Fluidity, an open-source computational fluid dynamics (CFD) package. This integration allows researchers to manage publication settings directly within the simulation's configuration environment.

The Fluidity GUI (Diamond) showing the integrated 'publish' options enabled by PyRDM.

Users can enable a "publish" flag within an XML configuration file. This setup allows the software to automatically handle the publication of the specific code version, input meshes, and resulting field solutions upon the completion of a simulation run.

Validation and Results

The library was validated using a "top hat" advection problem simulation. This trial successfully generated three distinct, linked, and citable DOIs for the software version, the input configuration, and the output data. This automated pipeline ensures that any researcher accessing the output data can immediately find the exact code and inputs required to replicate the result.

Conclusion and Future Work

PyRDM demonstrates that by moving the publication step into the simulation setup, data management becomes a natural part of the scientific process rather than a burdensome afterthought. While currently focused on GitHub and Figshare, future development aims to expand support to other platforms like Zenodo and Bitbucket, and integrate institutional repositories via the DSpace framework. Additionally, the authors plan to incorporate ORCID for more robust researcher attribution, further incentivizing the sharing of software as a first-class scientific contribution.

Summary updated

BibTeX
@article{jacobs2014pyrdm,
  author = {Christian T. Jacobs and Alexandros Avdis and Gerard Gorman and Matthew D. Piggott},
  title = {{PyRDM: A Python-based Library for Automating the Management and Online Publication of Scientific Software and Data}},
  journal = {Journal of Open Research Software},
  year = {2014},
  doi = {10.5334/jors.bj},
}
Figure