Introduction

Reproducibility: Definitions, Advantages, and Barriers

It's code all the way down...

... and it's a mess

xkcd.com/2347

Many, Many Tools Wanting to Help

  • Conda
  • Anaconda
  • Miniconda
  • Mamba
  • Pixi
  • pip
  • virtualenv
  • Pipenv
  • pyenv
  • Poetry
  • requirements.txt
  • environment.yml
  • renv
  • uv
  • just

A Time-Capsule for the Future

Python


                  $ pip freeze > requirements.txt
                
What does the file contain?
Re-create this environment with:

                  $ pip install -r requirements.txt
                
Self-study: Carpentries Lesson

R

Initialize renv, and then “save” and “load” the state of your project library.

                  renv::init()
                  renv::snapshot()  # save
                  renv::restore()   # load
                
Self-study: Carpentries Lesson

Upload to GitHub

  • Add
    • VS Code: click '+' next to 'Changes' (or files)
    • RStudio: click 'Staged'
      • N.B.: also include .RProfile and activate.R
    • git: git add [filenames]
  • Commit
    • IDEs: Write "add dependencies", click 'Commit'
    • git: git commit -m "add dependencies"
  • Push
    • IDEs: Click 'Push'
    • git: git push

Software Documentation

How to make software easier to understand

For-

matting

  • Follow style guides without altering functionality
  • Increase readability and reduce chance for merge conflicts
  • Formatter can fix issues, if requested

Next Steps

How to make your code reusable

Reproducibility Check

Wrap-Up