Open Conchylicultor opened 4 years ago
Hi, I am Abhinav Prakash and I am working in this.
@Conchylicultor I was thinking of editing the my_dataset generator script, so that all new datasets will have Python3 typing annotations. For example,
def _generate_examples(self) -> [Dictionary]:
Please share your views and guide me on the same Thank you
@vijayphoenix, That's a good idea. To avoid boilerplate, you could add a core/types.py
with:
KeyType = Union[str, bytes, int]
KeyExample = Tuple[KeyType, Dict[str, Any]]
And then have: _generate_examples() -> tfds.types.KeyExample:
@Conchylicultor, I have added first PR for this issue which adds pytype
in 3 files. I will add multiple PRs and I will only include 3-4 files per PR so that it will be easy for reviewer to review.
Also, @abhinavsp0730 and @vijayphoenix , Please stay coordinated so that we don't overlap PRs. I am working on tfds/core outer files. If you are working then please work on tfds/core/(decode/download/features/proto/utils) files. Also, please review my PR and also give your comments since you two are working on same issue.
Hey! I am working on core(/decode/download)
@Conchylicultor and @ashutosh1919 can you check this PR #1571 and let me know if I am mistaking ?
Hi! I'm working on core/utils
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:
core/
is what matter the most. Thenscripts/
, Other files are optional*_test.py
Complexity: Easy