Skip to content

chore: 仓库瘦身,清理未使用资产和历史大文件 #350

Description

@TATP-233

背景

当前仓库包含一些疑似未使用或过时的大体积资产。先开 issue 追踪仓库瘦身工作,只列 todo,不在本 issue 创建时改代码。

已观察到的事实

  • .git 当前约 158 MiB。
  • src/unilab/assets/robots/franka_emika_panda 当前约 35 MiB,Git 跟踪 71 个文件。
  • 仓库内搜索 franka_emika_panda|franka|panda 时,除该资产目录自身 XML/mesh 引用外,未发现代码、配置、脚本、文档引用。
  • 该目录相关历史提交:b2cb308 Move Franka Emika Panda robot model and scene files
  • 历史 blob 体积排序中,Panda 目录内多个 OBJ/PNG 进入大文件列表,例如:
    • 3.68 MiB src/unilab/assets/robots/franka_emika_panda/assets/link5_2.obj
    • 3.51 MiB src/unilab/assets/robots/franka_emika_panda/assets/link6_16.obj
    • 3.14 MiB src/unilab/assets/robots/franka_emika_panda/assets/link2.obj
    • 3.12 MiB src/unilab/assets/robots/franka_emika_panda/assets/link1.obj
    • 3.11 MiB src/unilab/assets/robots/franka_emika_panda/assets/link0_8.obj
    • 2.09 MiB src/unilab/assets/robots/franka_emika_panda/panda.png

Todo

  • 确认 src/unilab/assets/robots/franka_emika_panda 没有注册、配置、测试、文档或下游使用方依赖。
  • 从当前 tree 删除 src/unilab/assets/robots/franka_emika_panda
  • 从 Git 历史中移除 src/unilab/assets/robots/franka_emika_panda 相关 blob,包含 b2cb308 引入/移动后的历史记录。
  • .git 历史 blob 按体积排序,形成清单并逐项判断是否仍需要保留。
  • 优先审查当前历史中最大的文件:
    • src/unilab/assets/motions/g1/sprint1_subject4_from_csv.npz,约 24.01 MiB
    • src/unilab/assets/motions/g1/walk1_subject5_from_csv.npz,约 22.98 MiB
    • src/unilab/assets/motions/g1/run1_subject5_from_csv.npz,约 20.91 MiB
    • src/unilab/assets/robots/go2/assets/base_4.obj,约 7.42 MiB
    • src/unilab/assets/robots/go1/assets/trunk.stl,约 5.36 MiB
    • docs/assets/g1_readme.png,约 5.24 MiB
    • src/unilab/envs/manipulation/inhand_rot_allegro/grasps/grasp_50k.npy,约 4.39 MiB
    • 历史路径 unilab/envs/manipulation/inhand_rot_allegro/grasps/grasp_50k.npy,约 4.39 MiB
  • 删除确认无用或过时的大文件;仍需要的资产考虑压缩、外部下载、release artifact、Git LFS 或生成脚本。
  • 历史重写后执行仓库 gc,并记录瘦身前后的 clone size / .git size 对比。
  • 在 PR/维护窗口中明确说明历史重写影响:所有协作者需要重新同步分支或重新 clone。

验证建议

  • rg -n "franka_emika_panda|franka|panda" src tests scripts docs README.md pyproject.toml
  • git rev-list --objects --all | git cat-file --batch-check=... 重新导出大 blob 排序
  • 清理后运行与资产/配置相关的测试,避免破坏注册、配置或文档引用。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions