From 87432249d85f02bdc192317994998b8e2a1fa6a5 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Tue, 25 May 2021 17:56:11 +0200 Subject: [PATCH 1/4] Add type stub --- setup.py | 2 +- src/datasets/py.typed | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/datasets/py.typed diff --git a/setup.py b/setup.py index 0a87810e8d9..666ef42607e 100644 --- a/setup.py +++ b/setup.py @@ -216,7 +216,7 @@ license="Apache 2.0", package_dir={"": "src"}, packages=find_packages("src"), - package_data={"datasets": ["scripts/templates/*"], "datasets.utils.resources": ["*.json", "*.yaml"]}, + package_data={"datasets": ["scripts/templates/*", "py.typed"], "datasets.utils.resources": ["*.json", "*.yaml"]}, entry_points={"console_scripts": ["datasets-cli=datasets.commands.datasets_cli:main"]}, install_requires=REQUIRED_PKGS, extras_require=EXTRAS_REQUIRE, diff --git a/src/datasets/py.typed b/src/datasets/py.typed new file mode 100644 index 00000000000..e69de29bb2d From 4887186086c9b2bd029ad67f26575d0c68d81363 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Tue, 25 May 2021 18:32:47 +0200 Subject: [PATCH 2/4] Move py.typed to repo root --- src/datasets/py.typed => py.typed | 0 setup.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/datasets/py.typed => py.typed (100%) diff --git a/src/datasets/py.typed b/py.typed similarity index 100% rename from src/datasets/py.typed rename to py.typed diff --git a/setup.py b/setup.py index 666ef42607e..6694289bb1a 100644 --- a/setup.py +++ b/setup.py @@ -216,7 +216,7 @@ license="Apache 2.0", package_dir={"": "src"}, packages=find_packages("src"), - package_data={"datasets": ["scripts/templates/*", "py.typed"], "datasets.utils.resources": ["*.json", "*.yaml"]}, + package_data={"datasets": ["py.typed", "scripts/templates/*"], "datasets.utils.resources": ["*.json", "*.yaml"]}, entry_points={"console_scripts": ["datasets-cli=datasets.commands.datasets_cli:main"]}, install_requires=REQUIRED_PKGS, extras_require=EXTRAS_REQUIRE, From 6f7d8fd869c54b9d05048f6fc819e8428886e241 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Thu, 27 May 2021 18:10:43 +0200 Subject: [PATCH 3/4] Move py.typed to datasets src folder --- py.typed => src/datasets/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename py.typed => src/datasets/py.typed (100%) diff --git a/py.typed b/src/datasets/py.typed similarity index 100% rename from py.typed rename to src/datasets/py.typed From bec49e1700416366e6283c9c1d4bc60c6fb91a10 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Thu, 27 May 2021 18:13:19 +0200 Subject: [PATCH 4/4] Add missing statement in setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 6694289bb1a..e09a503c606 100644 --- a/setup.py +++ b/setup.py @@ -233,4 +233,5 @@ "Topic :: Scientific/Engineering :: Artificial Intelligence", ], keywords="datasets machine learning datasets metrics", + zip_safe=False, # Required for mypy to find the py.typed file )