# =============================================================================
# Git Attributes for TIDE Pipeline
# =============================================================================

# Auto detect text files and normalize line endings
* text=auto

# =============================================================================
# Source Code
# =============================================================================

*.py text diff=python
*.pyx text diff=python
*.pxd text diff=python
*.pxi text diff=python

# =============================================================================
# Documentation
# =============================================================================

*.md text diff=markdown
*.rst text
*.txt text
*.html text diff=html
*.css text diff=css
*.js text
*.json text

# =============================================================================
# Configuration
# =============================================================================

*.yml text
*.yaml text
*.toml text
*.ini text
*.cfg text
*.conf text
*.config text

# =============================================================================
# Shell Scripts
# =============================================================================

*.sh text eol=lf
*.bash text eol=lf
*.zsh text eol=lf
*.fish text eol=lf

# Windows batch files
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# =============================================================================
# Binary Files
# =============================================================================

# Images
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg text
*.webp binary

# Fonts
*.ttf binary
*.eot binary
*.woff binary
*.woff2 binary

# Archives
*.zip binary
*.tar binary
*.tar.gz binary
*.tgz binary
*.gz binary

# =============================================================================
# Data Files (Large Binary)
# =============================================================================

# NIfTI files
*.nii binary
*.nii.gz binary filter=lfs diff=lfs merge=lfs -text

# Tractography files
*.trk binary filter=lfs diff=lfs merge=lfs -text
*.tck binary filter=lfs diff=lfs merge=lfs -text

# Mesh files
*.msh binary filter=lfs diff=lfs merge=lfs -text

# SimNIBS files
*.stmpx binary

# HDF5 files
*.h5 binary filter=lfs diff=lfs merge=lfs -text
*.hdf5 binary filter=lfs diff=lfs merge=lfs -text

# MATLAB files
*.mat binary

# =============================================================================
# GitHub Linguist Overrides
# =============================================================================

# Exclude from language statistics
tests/* linguist-detectable=false
docs/* linguist-documentation
examples/* linguist-documentation

# Vendored files (if any)
# vendor/* linguist-vendored

# =============================================================================
# Diff Drivers
# =============================================================================

# Better diffs for Jupyter notebooks (requires nbstripout)
*.ipynb diff=jupyternotebook

# =============================================================================
# Export Ignore (for git archive)
# =============================================================================

.gitattributes export-ignore
.gitignore export-ignore
.github/ export-ignore
tests/ export-ignore
docs/ export-ignore
