tensorflow / tensorflow/datasets

[GSoC] Add Python 3 typing annotations to TFDS

Open
#1,517 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contributions welcome enhancement
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

Task: Add Python 3 typing annotations to TFDS repository. Now that Python 2 support is officially dropped, we can add better typing to TFDS.

Impact: Everyone using TFDS with a static type checker

Instructions:

  • Add typing annotations to our API: (Typing annotation guide: https://docs.python.org/3/library/typing.html)
  • Check that the typing annotations are valid with https://github.com/google/pytype
  • Only update only a few files at a time (send multiple PR).
  • As TFDS has many files, many people can work on this issue at the same time, just coordinate with each other.
  • Updating the core/ is what matter the most. Then scripts/, Other files are optional
  • Typing are ignored in test files, so no need to add typing annotations to *_test.py

Complexity: Easy

Contributor guide

Open the 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.

Research direction

Start by selecting a small group of non-test files under core/, which the issue identifies as the priority; scripts/ is secondary. Read the typing guide and validate the annotations with pytype. Done means the selected files are annotated and pytype accepts them; do not add annotations to *_test.py files.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.