Project structure
Project workflow for astrophysics analysis
A good project workflow keeps your data, code, notebooks, and results organized while making it easier to share and reproduce work. Install Git and a Python environment first; this page is about how you use them together.
Recommended layout
project/
├── notebooks/
├── scripts/
├── data/
├── results/
├── README.md
├── .gitignore
├── environment.yml # or pyproject.toml / uv.lock
└── .venv/
Good habits
- Use notebooks for exploration and figures
- Move reusable code into scripts or modules
- Record dependencies and environment setup in a reproducible format
- Commit often and push to GitHub before sharing
- Document assumptions, data sources, and processing steps
Typical cycle
- Create or activate the project environment
- Open the notebook or script in VS Code
- Run analysis and generate figures
- Move cleaned-up logic into a script or module
- Commit the updates and push them to GitHub