Disable explicit mypy tests?

未关闭
#10,934 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
停滞
技术栈
github-actions, python
领域
ci-cd, testing

调研方向

首先定位 PR #10038 中引入的显式 mypy 测试,以及运行这些测试的 GitHub CI 作业。检查它们当前的失败情况、运行时间和类型检查覆盖率;完成的标准是禁用脆弱的显式测试,同时不掩盖其余的类型检查。

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

描述

CI
What is your issue?

The explicit mypy tests introduced in https://github.com/pydata/xarray/pull/10038 seem to be quite fragile, e.g., they are currently broken at head and I know have been broken at head previously at least once. In neither case was there a real regression.

I see at least three issues with them:

  1. They seem to be particularly prone to version skew issues where they fail on GitHub but pass locally due to slight differences in environments. I think the current failure is due to mis-matched NumPy versions. (This might be improved when we switch to pixi.)
  2. They are really slow. Testing ~40 specific errors takes ~9 minutes on a single GitHub CI worker, which is not a great use of CI resources and clearly not scalable. Currently we use two CI workers just to test typing for the pipe method!
  3. They are inherently very fragile, checking for exact messages printed by mypy. Pretty much any package update causes error messages to change, which means these tests break, whether or not there is a real underlying issue.
主要语言
Python
星标
4.2k
派生
1.5k
平均合并
2 天 21 小时
30 天内合并 PR
74

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

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

pydata/xarray 的其他 Issue

查看 pydata/xarray 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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