Missing unit tests for human-readable date/time formatters in utils/datetime.py

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

维护者通常 1 天内回复

@prabhleen2317 已经在做这个了。

开始于 2026年11月16日。

  • #4388 来自 @prabhleen2317 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
testing

调研方向

从 pyiceberg/utils/datetime.py 中列出的辅助函数和 tests/utils/test_datetime.py 中现有的测试开始;对照附近的测试,遵循项目的约定。为每个列出的函数添加确定性的输入和预期输出用例,然后运行 datetime 测试模块,并确认新增用例通过。

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

描述

Feature Request / Improvement

Several pure helper functions in pyiceberg/utils/datetime.py have no unit
test coverage in tests/utils/test_datetime.py:

  • to_human_year
  • to_human_month
  • to_human_day
  • to_human_hour
  • to_human_time
  • to_human_timestamp
  • to_human_timestamptz
  • micros_to_days
  • days_to_date

These are deterministic input→output functions, so they are straightforward
to cover with unit tests. Adding tests guards against regressions in the
human-readable formatting used by the CLI and __repr__ output.

I'd like to work on this and submit a PR.

主要语言
Python
星标
1.2k
派生
664
平均合并
2 天 10 小时
30 天内合并 PR
130

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

apache/iceberg-python 的其他 Issue

查看 apache/iceberg-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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