chore(scripts): mark the shebang-carrying Python scripts executable
还没有人认领这个 Issue。
评估
调研方向
检查 scripts/ 下列出的八个包含 shebang 的文件,并将其模式与 scripts/ci/.py 和 scripts/bench_mlxlm.py 进行比较。在索引中应用可执行位,然后运行 git ls-files -s scripts/**/.py,以验证每个包含 shebang 的脚本都是 100755。检查三个不含 shebang 的文件,并记录它们是保持不可执行,还是被规范化。
由索引模型根据 Issue 内容生成。
描述
Summary
Eight Python scripts under scripts/ carry a #!/usr/bin/env python3 shebang but are not executable in the index, so the direct invocation some of them document for themselves fails with "permission denied".
Background
The scripts/ci/*.py files (and scripts/bench_mlxlm.py) are already mode 100755, so the executable convention is established. The affected files sit at 100644 despite their shebang. scripts/bench_embeddings.py:9 documents its own invocation as scripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which cannot run today.
Proposed Solution
Set the executable bit in the index with git update-index --chmod=+x (or chmod +x then commit) on the shebang-carrying files. Verify with git ls-files -s scripts/**/*.py.
Implementation Notes
- Non-executable despite a shebang:
scripts/bench_embeddings.py,scripts/benchmark_gemma3n_python.py,scripts/benchmark_llama3_python.py,scripts/benchmark_python.py,scripts/bridge_overhead_microbench_py.py,scripts/gather_qmm_shape_microbench.py,scripts/layer_shaped_microbench_py.py,scripts/requantize_mlp.py(confirmed100644for the sampled files). - Separately,
scripts/insert_apache_header.py,scripts/tools/internlm_rope_oracle.py, andscripts/tools/quantize_mtp_drafter.pyhave neither a shebang nor+x. Decide whether to normalize them or leave them aspython3 <file>only.
Acceptance Criteria
- Every
scripts/**/*.pywith a shebang is executable in the index - The three shebang-less files are either normalized or explicitly left alone with a note in the PR
Original Suggestion
Title: chore(scripts): make the shebang'd Python scripts executable
Ten Python scripts under scripts/ carry a #!/usr/bin/env python3 shebang but are not executable, so the invocation some of them document for themselves fails with "permission denied". Every scripts/ci/*.py (and scripts/bench_mlxlm.py) is +x, so the convention is established.
Evidence
Non-executable despite a shebang: scripts/bench_embeddings.py, scripts/benchmark_gemma3n_python.py, scripts/benchmark_llama3_python.py, scripts/benchmark_python.py, scripts/bridge_overhead_microbench_py.py, scripts/gather_qmm_shape_microbench.py, scripts/layer_shaped_microbench_py.py, scripts/requantize_mlp.py.
scripts/bench_embeddings.py:9 documents its own invocation as scripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which fails today.
Separately, scripts/insert_apache_header.py, scripts/tools/internlm_rope_oracle.py, and scripts/tools/quantize_mtp_drafter.py have neither a shebang nor +x — decide whether to bring them in line or leave them as python3 <file>-only.
Suggested fix
git update-index --chmod=+x on the shebang'd files (or chmod +x + commit). Purely mechanical; verify with git ls-files -s scripts/*.py.
Acceptance criteria
- Every
scripts/**/*.pywith a shebang is executable in the index - The three shebang-less files are either normalized or explicitly left alone with a note in the PR
- 主要语言
- Rust
- 星标
- 470
- 派生
- 54
- 平均合并
- 5 小时 39 分钟
- 30 天内合并 PR
- 292
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lablup/mlxcel 的其他 Issue
-
area:core priority:low status:ready type:chore
难度 2/5 1-3 小时 新手友好度 90/100
-
priority:low status:ready type:docs
难度 1/5 1 小时以内 新手友好度 95/100
-
docs(webpage): add a webpage/site README covering the pnpm/uv/zensical build and deploy contract 未关闭priority:low status:ready type:docs
难度 1/5 1-3 小时 新手友好度 86/100
-
docs: CONTRIBUTING says clippy is not gated at PR time, but ci.yml runs -D warnings clippy on PRs 未关闭priority:medium status:ready type:docs
难度 2/5 1-3 小时 新手友好度 88/100
-
priority:low status:ready type:docs
难度 2/5 1-3 小时 新手友好度 92/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
state:needs triage
难度 2/5 1-3 小时 新手友好度 70/100
zed-industries/zed#64680 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 70/100
RustPython/RustPython#8802 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
TheLarkInn/aipm#2390 ·