(Part 10 of series Blueprint for a Modern Research Computing Environment)
Follow me :
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.
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:
environment.yml and requirements.txtAI 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
Part10.md into the chat).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.mdfile. 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.
~/project_1 set up with Git and GitHub (Part 5 and Part 6)env_project1 Conda environment (Part 3)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
environment.ymlThis 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.txtThis 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.
Separating settings from code is critical for reproducibility and security.
.env: Used for sensitive data (API keys, credentials). Read in Python using python-dotenv. Always add .env to .gitignore.config.yaml: Used for non-sensitive settings (model parameters, paths). Read in Python using PyYAML.argparse: Use this for scripts that require different runtime settings.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.
Docker packages your OS, system dependencies, Python, and packages into a single portable container.
docker build -t project_1 .docker run project_1Docker is recommended when sharing with different operating systems, deploying to the cloud, or requiring exact system-level reproducibility.
git tag for milestones (e.g., paper submission).CHANGELOG.md to track project evolution.What Youβve Done:
environment.yml and requirements.txtNext: Part 11 β Contributing to Open Science | Previous: Part 9 β Installing PyTorch and TensorFlow