Abhigyan Chakraborty

Building Reproducible Research Workflows

Phase 4: Open Science β€” Part 1

(Part 10 of series Blueprint for a Modern Research Computing Environment)

Follow me :

LinkedIn    Website    Website


Quick Summary

Writing code that works on your machine is only half the job. Reproducible research means someone else β€” or your future self six months from now β€” can take your project, set it up, and get the same results. This article adds the tools and practices that make your work shareable, maintainable, and reproducible, building on the project structure from Part 8.


Objective

This part builds on the project structure established previously and adds the specific tools and practices required to make research workflows reproducible.

By the end, you’ll have:


Content

πŸ’‘ Getting Unstuck (Expand for AI Troubleshooting Prompts)

AI tools (like Claude, Grok, Gemini, or ChatGPT) give the best troubleshooting advice when they have the exact text of the tutorial. To ensure the AI understands what you are trying to build, we will give it the actual file.

1. Download the tutorial file

2. Upload it to your AI

3. Ask for Help Copy and paste this exact prompt into the chat along with your file:

I have attached the markdown file for the tutorial I am following. Please read it so you understand the specific environment I am trying to build.

I need help with the following:

Step [X]: [paste exact step text from the blog]

Command I ran: [paste exact command]

What happened: [paste full output/error β€” if the terminal was truly blank, say so explicitly]

Please help me troubleshoot and fix this error. You can use your general knowledge to solve the problem, but your solution MUST align with the architecture and tools taught in the attached file. Do not suggest alternative setups that contradict the tutorial. Once fixed, tell me what to do next in the article.

To go deeper on a step before you run a command:

I have attached the Part10.md file. Look at Step [X] and explain exactly what the command does and why we are doing it before I run it.

Think of this series as the roadmap and your AI assistant as your learning companion.

Prerequisites

Step 1 β€” Revisiting Project Structure

We expand the standard project structure to include three files that facilitate reproducibility:

project_1/
β”œβ”€β”€ notebooks/
β”œβ”€β”€ scripts/
β”œβ”€β”€ results/
β”‚   β”œβ”€β”€ figures/
β”‚   └── outputs/
β”œβ”€β”€ environment.yml       ← Conda environment definition
β”œβ”€β”€ requirements.txt      ← pip dependency list
β”œβ”€β”€ config.yaml           ← project configuration
β”œβ”€β”€ .gitignore
└── README.md

Step 2 β€” Managing Dependencies

environment.yml

This Conda-specific file captures your entire environment (Python version, channels, packages). Generate it: conda env export > environment.yml. Recreate it: conda env create -f environment.yml.

requirements.txt

This pip-specific file lists packages and versions, providing a universal format for non-Conda users. Generate it: pip freeze > requirements.txt. Install it: pip install -r requirements.txt.

Note: Include both. Use Conda for your primary workflow and requirements.txt for broader compatibility.

Step 3 β€” Configuration Files

Separating settings from code is critical for reproducibility and security.

Step 4 β€” Documenting Your Project

Your README.md is the front door of your project. A complete research README should include:

Provide a .env.example file (a template without real credentials) to allow others to configure their local setup easily.

Step 5 β€” Docker: Full Environment Reproducibility

Docker packages your OS, system dependencies, Python, and packages into a single portable container.

Docker is recommended when sharing with different operating systems, deploying to the cloud, or requiring exact system-level reproducibility.

Step 6 β€” Best Practices for Long-Term Projects


What’s Next

What You’ve Done:

Next: Part 11 β€” Contributing to Open Science | Previous: Part 9 β€” Installing PyTorch and TensorFlow

All Blogs