googleapis / googleapis/google-cloud-python

Add nox_helpers.py to the monorepo root.

未关闭
#17,323 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p2 type: cleanup
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

### Summary of the feature request

Consolidate package level `noxfile.py` file contents into a single global file at the monorepo root level.

**Current State**: 30 packages handwritten or hybrid packages define their own noxfile.py.
**Similarity Profile**: Average similarity is 33.4%, but this is due to package names and line counts ranging from 186 to 1085.
**Why it's a prime candidate**: Although the files appear diverse, the actual logic for standard nox sessions (`lint`, `blacken`, `mypy`, `docs`, `docfx`) is heavily duplicated boilerplate generated from common Jinja templates (e.g., `gapic/templates/noxfile.py.j2`).

**Recommendation**:
Create a shared `nox_helpers.py` utility module in the project root containing standard session definitions.
Refactor local per-package noxfile.py files to import and call these shared utilities, passing only package-specific variables (like package path and test requirements).

This can reduce each local noxfile from ~565 lines to under 30 lines.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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