Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

chore(scripts): mark the shebang-carrying Python scripts executable

未关闭 适合新手
#1,663 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
git, python
领域
tooling

调研方向

检查 scripts/ 下列出的八个包含 shebang 的文件,并将其模式与 scripts/ci/.py 和 scripts/bench_mlxlm.py 进行比较。在索引中应用可执行位,然后运行 git ls-files -s scripts/**/.py,以验证每个包含 shebang 的脚本都是 100755。检查三个不含 shebang 的文件,并记录它们是保持不可执行,还是被规范化。

由索引模型根据 Issue 内容生成。

描述

priority:low status:ready type:chore

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 (confirmed 100644 for the sampled files).
  • 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 normalize them or leave them as python3 <file> only.

Acceptance Criteria

  • Every scripts/**/*.py with 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/**/*.py with 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lablup/mlxcel 的其他 Issue

查看 lablup/mlxcel 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。