forked from Kaggle/kaggle-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
121 lines (102 loc) · 3.41 KB
/
pyproject.toml
File metadata and controls
121 lines (102 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[build-system]
requires = [
"hatchling",
]
build-backend = "hatchling.build"
[project]
name = "kaggle"
dynamic = [
"version",
]
description = "Access Kaggle resources anywhere"
authors = [
{ name = "Kaggle", email = "support@kaggle.com" },
]
license = { file = "LICENSE.txt" }
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
keywords = ["Kaggle", "API"]
requires-python = ">=3.11"
dependencies = [
"bleach",
"kagglesdk",
"python-slugify",
"requests",
"setuptools>=21.0.0", # unused if setup.py is removed
"six>=1.10", # should be unused but is still imported
"tqdm",
"urllib3>=1.15.1",
"protobuf",
"black>=24.10.0",
"mypy>=1.15.0",
# Pre-install `types-*` packages to speed up lint:typing command.
"types-requests",
"types-tqdm",
]
[project.scripts]
kaggle = "kaggle.cli:main"
[project.urls]
Homepage = "https://github.com/Kaggle/kaggle-api"
Issues = "https://github.com/Kaggle/kaggle-api/issues"
[tool.hatch.version]
path = "src/kaggle/__init__.py"
[tool.hatch.envs.default]
dependencies = [
"pytest",
]
[tool.hatch.build.targets.wheel]
packages = ["src/kaggle", "src/kagglesdk"]
[tool.hatch.envs.default.scripts]
install-unzip = """sudo apt-get install -y unzip || echo 'unzip could not be installed'"""
# TODO: install in Mac/Windows
install-black = """pip3 install black --break-system-packages || echo 'black could not be installed'"""
install-toml = """sudo apt-get install -y python3-toml || echo 'toml could not be installed'"""
install-sphinx = """pip3 install sphinx --break-system-packages || echo 'sphinx could not be installed'"""
install-myst = """pip3 install myst-parser --break-system-packages || echo 'myst-parser could not be installed'"""
install-deps = "hatch run install-unzip && hatch run install-black && hatch run install-toml && hatch run install-sphinx && hatch run install-myst"
integration-test = "pytest {args:integration_tests}"
compile = "./tools/GeneratePythonLibrary.sh"
install = "./tools/GeneratePythonLibrary.sh --install"
watch = "./tools/GeneratePythonLibrary.sh --watch"
test = "./tools/GeneratePythonLibrary.sh --test local"
[tool.docformatter]
recursive = true
[tool.black]
target-version = ["py311"]
line-length = 120
extend-exclude = 'kagglesdk'
[tool.mypy]
strict = false
show_error_codes = true
follow_imports = 'silent'
exclude = '''(?x)(
/src/
)'''
python_version = 3.11
# Start off with these
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
# Getting these passing should be easy
strict_equality = true
extra_checks = true
# Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
# These shouldn't be too much additional work, but may be tricky to
# get passing if you use a lot of untyped libraries
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
# These next few are various gradations of forcing use of type annotations
disallow_incomplete_defs = true
# TODO Enable these after GA.
#disallow_untyped_calls = true # 167 errors reported a/o April 30, 2025
#disallow_untyped_defs = true # 132
# This one isn't too hard to get passing, but return on investment is lower
no_implicit_reexport = true # 50
# This one can be tricky to get passing if you use a lot of untyped libraries
warn_return_any = true