tests: cover structural_impact.py pure helpers; thread repo_root and align path resolution
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 56/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- github-actions, python
- 领域
- ci-cd, testing-qa, tooling
调研方向
从 .agents/tools/structural_impact.py 开始,重点查看 _get_package、_dedup、_collect_source_files、_unknown_package_dirs、_rel、_changed_files_mode 和 _full_mode;然后检查 PR #567 以及现有的 agentic CI 工作流。为列出的用例添加 .agents/tools/tests/test_structural_impact.py,将其接入 CI,并通过测试套件验证显式的 repo_root 处理和对称路径解析。
由索引模型根据 Issue 内容生成。
描述
Priority Level
Medium
Task Summary
Add unit-test coverage for the pure helpers in .agents/tools/structural_impact.py and clean up two latent issues that get cheap to fix in the same pass: the module-level _REPO_ROOT global and the asymmetric .resolve() between changed-files paths and source-file paths.
Follow-up to PR #567 review feedback from @nabinchha.
Technical Details & Implementation Plan
-
Unit tests — add
.agents/tools/tests/test_structural_impact.pycovering:_get_package— engine / config / interface / external paths, including thedata-designervsdata-designer-enginesubstring-precedence ordering_dedup— collisions on shared label prefixes (regression guard for the bug fixed inbfc5db69)_collect_source_files— smoke test against a tmp dir with mockpackages/<name>/src/...layout_unknown_package_dirs— synthetic packages outside_KNOWN_PACKAGE_DIRS
-
CI wiring —
.agents/tools/lives outside the three package test suites, somake testwon't pick it up. Decide between (a) a new Makefile target, (b) a step inagentic-ci-pr-review.yml/agentic-ci-daily.yml, or (c) folding into an existing CI workflow. Lean toward (b) since the file's own change cadence is tied to the agentic-CI surface. -
Thread
repo_rootthrough helpers — replace the module-level_REPO_ROOTglobal +global _REPO_ROOTmutation inmain()with explicit parameter passing through_collect_source_files,_unknown_package_dirs,_rel,_changed_files_mode,_full_mode. Removes test-time fragility (no need to mutate a global to vary input) and decouples the otherwise-pure helpers from module state. -
Symmetric path resolution — once helpers take
repo_rootexplicitly, either drop.resolve()onchanged_paths(current_changed_files_mode:198) or also.resolve()paths inside_collect_source_files. Latent today because no symlinks live underpackages/, but the symmetric form removes a future-divergence trap.
Investigation / Context
PR #567 review thread: https://github.com/NVIDIA-NeMo/DataDesigner/pull/567 (review by @nabinchha and follow-up at https://github.com/NVIDIA-NeMo/DataDesigner/pull/567#issuecomment-4373073701)
Relevant prior fixes that justify the test coverage:
bfc5db69—_dedup30-char prefix-collision bug (pre-merge)55f0bdda—changed_node_idsID-stability bug (pre-merge)
Both bugs were caught during review; tests would have surfaced them earlier and would protect against the most likely future failure mode (graphify API drift at the loose graphifyy==0.4.23 pin).
Dependencies
None
- 主要语言
- Python
- 星标
- 2.4k
- 派生
- 234
- 平均合并
- 1 天 22 分钟
- 30 天内合并 PR
- 83
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA-NeMo/DataDesigner 的其他 Issue
-
Code validation repeats the first result for subsequent target columns可能已有人在做 @edjson 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 77/100
NVIDIA-NeMo/DataDesigner#1092 · 1 条评论 ·
维护者通常 1 天内回复
-
Expression column with dtype="int" loses precision for integers above `2**53`可能已有人在做 @v0ropaev 今天认领。 未关闭bug triaged
难度 2/5 1-3 小时 新手友好度 85/100
NVIDIA-NeMo/DataDesigner#1089 · 2 条评论 ·
维护者通常 1 天内回复
-
docs: required_columns description is incomplete for LLM and multimodal columns可能已有人在做 @rksharma-owg 于 12 天前认领。 未关闭bug triaged
难度 2/5 1-3 小时 新手友好度 65/100
NVIDIA-NeMo/DataDesigner#1002 · 4 条评论 ·
维护者通常 1 天内回复
-
enforce \from future import annotations` via ruff FA102 rule`可能已有人在做 @chethanuk 于 47 天前认领。 未关闭task
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA-NeMo/DataDesigner#760 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
NVIDIA-NeMo/DataDesigner#1097 ·
维护者通常 1 天内回复
查看 NVIDIA-NeMo/DataDesigner 的全部 Issue
相似的 Issue
-
difficulty:2 enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
MakazhanAlpamys/Soup#2309 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
google-deepmind/tapnet#173 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
Netcracker/qubership-ai-packages#203 ·
维护者通常 1 天内回复
-
PAC Wording
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复