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

Open Beginner friendly
#4,387 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@prabhleen2317 is already working on this.

Since Nov 16, 2026.

  • #4388 by @prabhleen2317 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing

Research direction

Start with the listed helpers in pyiceberg/utils/datetime.py and the existing tests in tests/utils/test_datetime.py; compare nearby tests to follow the project’s conventions. Add deterministic input and expected output cases for each listed function, then run the datetime test module and confirm the new cases pass.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
1.2k
Forks
664
Avg merge
2d 10h
Merged PRs (30d)
130

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iceberg-python

All issues in apache/iceberg-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.