Skip to content

ewald-lab/Analysis_Repository_Template

Repository files navigation

🧪 Ewald Lab Data Analysis Template

This is a template for GitHub repositories for data analysis projects in the Ewald Lab. By sticking to some structure and styling conventions, we make our code more reproducible and reusable. At the repo root, we enforce code style and linting with Ruff via pre-commit hooks. See the Ewald Lab GitHub guidelines for more details.

If you are confused about any of the repository components or instructions, please ask someone to explain!

Setup Instructions

1. Make a new repository based on this template

  • Above the file list, click Use this template and select Create a new repository
  • Set the owner to ewald-lab
  • Name the repository following the YEAR_PERSON_TOPIC format, for example 2025_Ewald_CircadianRhythm
  • Set the repository visilibility to private - you can change this to public after discussing with other project members
  • Click Create repository from template

2. Fork the repository

Fork the repository and clone your fork. This makes it easier to manage contributions from multiple collaborators. For more details on how to sync your fork with the main branch, including making contributions, see the documentation here.

3. Set up development tools

Use uv to install the development environment in the repository root. Installation instructions here.

uv venv .venv
source .venv/bin/activate   # or .venv\Scripts\activate on Windows
uv pip install -r requirements-dev.txt

Now install pre-commit hooks:

pre-commit install --hook-type pre-commit --hook-type pre-push

4. Set up first analysis module

Each analysis module has its own Python environment managed by uv. To install and activate a new environment:

cd ./00.module_name
chmod ugo+x install_env.sh
./install_env.sh
source env-name/bin/activate

To install a new package with uv: uv pip install pkg-name. To add newly installed packages to the dependency file: uv pip freeze > requirements.txt.

5. Modify the README

Replace the template README introduction and setup instructions with:

  • 1-2 sentences background on the project
  • Specific hypotheses you are testing or engineering problems you are trying to solve
  • Brief description of each section of the analysis

About

Ewald Lab template for a data analysis repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages