论文标题

$ \ texttt {davos} $:用于构造轻巧可重复的笔记本的Python“走私”

$\texttt{Davos}$: a Python "smuggler" for constructing lightweight reproducible notebooks

论文作者

Fitzpatrick, Paxton C., Manning, Jeremy R.

论文摘要

可重复性是现代科学研究的核心要求。对于计算研究,可重复性意味着即使在不同的系统上运行,代码也应产生相同的结果。确保可重复性的标准方法需要包装项目的依赖项及其主要代码库。现有的解决方案在指定这些依赖性的深度上有所不同,从虚拟环境到容器到虚拟机。这些现有解决方案中的每一个都需要安装或设置一个用于运行所需代码的系统,从而增加了共享或与可重复科学互动的复杂性和时间成本。在这里,我们提出了一个较轻的重量解决方案:$ \ texttt {davos} $ package。当与基于笔记本的Python项目结合使用时,$ \ texttt {davos} $提供了一种机制,可以直接在需要它们的代码中指定项目依赖项的正确版本,并在运行代码时自动在隔离环境中安装它们。 $ \ texttt {davos} $软件包进一步确保每次执行笔记本代码时都使用这些软件包和特定版本。这使研究人员能够在单个Jupyter笔记本文件中共享其代码的完整复制副本。

Reproducibility is a core requirement of modern scientific research. For computational research, reproducibility means that code should produce the same results, even when run on different systems. A standard approach to ensuring reproducibility entails packaging a project's dependencies along with its primary code base. Existing solutions vary in how deeply these dependencies are specified, ranging from virtual environments, to containers, to virtual machines. Each of these existing solutions requires installing or setting up a system for running the desired code, increasing the complexity and time cost of sharing or engaging with reproducible science. Here, we propose a lighter-weight solution: the $\texttt{Davos}$ package. When used in combination with a notebook-based Python project, $\texttt{Davos}$ provides a mechanism for specifying the correct versions of the project's dependencies directly within the code that requires them, and automatically installing them in an isolated environment when the code is run. The $\texttt{Davos}$ package further ensures that those packages and specific versions are used every time the notebook's code is executed. This enables researchers to share a complete reproducible copy of their code within a single Jupyter notebook file.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源