From 2e0cf2bf7b5282d1f57f0d0ab069ac0774305ad2 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 21 Mar 2026 16:36:33 +0100 Subject: [PATCH] chore: configure git lfs --- .agents/rules/git-workflow.md | 2 +- .gitattributes | 14 ++++++++++++++ docs/CONTRIBUTING.md | 2 +- docs/DEVELOPMENT.md | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.agents/rules/git-workflow.md b/.agents/rules/git-workflow.md index 5398e6c..312e457 100644 --- a/.agents/rules/git-workflow.md +++ b/.agents/rules/git-workflow.md @@ -13,7 +13,7 @@ When performing Git operations and managing the repository layout, follow these - **Feature Branches**: Organize distinct work into logical feature branches when pushing to the remote server, maintaining an organized Git history. ## 3. Artifact Management & Exclusions -- **LFS Only**: Data files, trained models, and large datasets must **never** be committed directly to Git. Ensure they are tracked with Git Large File Storage (LFS). +- **LFS Only**: Data files, trained models, and large datasets must **never** be committed directly to Git. Ensure they are tracked with Git Large File Storage (LFS). **CRITICAL**: Every developer and AI agent must have `git-lfs` installed locally for the repository hooks to successfully pull these large files. Run `git lfs install` after cloning or setting up your environment. ## 4. Repository Layout Strictness Ensure generated code is meticulously placed in the correct directories: diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0fc68fc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,14 @@ +# Model weights +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text + +# Media +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.avi filter=lfs diff=lfs merge=lfs -text + +# Datasets +*.csv filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 3a54635..efd1399 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -24,7 +24,7 @@ Code readability is paramount, as code is read far more frequently than it is wr * **Git Practices:** Commits must be frequent and small. Each commit should relate to exactly one piece of functionality. * **Branching Strategy:** The `dev` branch serves as the integration branch for pushing and merging code. Only stable releases may be pushed to the `main` branch. -* **Artifact Management:** Data files, trained models, and large datasets must never be committed directly to Git. Git Large File Storage (LFS) must be used for tracking large files. +* **Artifact Management:** Data files, trained models, and large datasets must never be committed directly to Git. Git Large File Storage (LFS) must be used for tracking large files. **All developers must have `git-lfs` installed locally** (see `DEVELOPMENT.md` for setup). * **Repository Layout:** The repository must maintain the following core directories: `src/` for algorithms, `env/` for MuJoCo wrappers, `config/` for experiment configurations, `experiments/` for scripts, `docs/` for Doxygen or ReadTheDocs documentation, and `tests/` for unit tests. ## 4. Architecture & Tooling diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index ce4aa8d..a88997e 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -13,6 +13,13 @@ This project uses [uv](https://github.com/astral-sh/uv) to manage dependencies a - To update dependencies, run `uv lock --upgrade`. - To sync your environment with the lockfile, run `uv sync --frozen`. +## Git LFS (Critical) + +**All developers must have Git LFS installed locally.** This repository tracks model weights (`.pt`, `.safetensors`, etc.), recordings (`.mp4`), and datasets using Git LFS. + +- **Setup:** Run `git lfs install` after cloning this repository. If you are using the `.devcontainer` or `flake.nix`, LFS is typically available automatically. +- If you clone without LFS installed, run `git lfs pull` after installation to fetch the actual data files instead of the small pointer files. + ## Devcontainer Setup (Recommended) The devcontainer provides an identical experience to local development but with all system dependencies pre-configured. It automatically detects your hardware (GPU vs CPU) and syncs the appropriate dependencies.