-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpyproject.toml
155 lines (140 loc) · 5.66 KB
/
pyproject.toml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
[project]
name = "apify"
version = "1.7.1"
description = "Apify SDK for Python"
readme = "README.md"
license = { text = "Apache Software License" }
authors = [{ name = "Apify Technologies s.r.o.", email = "[email protected]" }]
keywords = ["apify", "sdk", "actor", "scraping", "automation"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.8"
# We use inclusive ordered comparison clause for non-Apify packages intentionally in order to enhance the Apify SDK's
# compatibility with a wide range of external packages. This decision was discussed in detail in the following PR:
# https://github.com/apify/apify-sdk-python/pull/154
dependencies = [
"apify-client ~= 1.6.2",
"apify-shared ~= 1.1.1",
"aiofiles >= 22.1.0",
"aioshutil >= 1.0",
"colorama >= 0.4.6",
"cryptography >= 39.0.0",
"httpx >= 0.24.1",
"psutil >= 5.9.5",
"pyee >= 11.0.1",
"sortedcollections >= 2.0.1",
"typing-extensions >= 4.1.0",
"websockets >= 10.1",
]
[project.optional-dependencies]
dev = [
"build ~= 1.0.3",
"filelock ~= 3.12.4",
"mypy ~= 1.7.1",
"pre-commit ~= 3.4.0",
"pydoc-markdown ~= 4.8.2",
"databind == 4.4.2", # HACK the docs build broke with databind 4.5, hopefully this will be fixed in a future pydoc-markdown release
"pytest ~= 7.4.2",
"pytest-asyncio ~= 0.21.0",
"pytest-cov ~= 4.1.0",
"pytest-only ~= 2.0.0",
"pytest-timeout ~= 2.2.0",
"pytest-xdist ~= 3.3.1",
"respx ~= 0.20.1",
"ruff ~= 0.1.13",
"twine ~= 4.0.2",
"types-aiofiles ~= 23.2.0.0",
"types-colorama ~= 0.4.15.12",
"types-psutil ~= 5.9.5.17",
]
scrapy = [
"scrapy >= 2.11.0",
]
[project.urls]
"Homepage" = "https://docs.apify.com/sdk/python/"
"Documentation" = "https://docs.apify.com/sdk/python/"
"Source" = "https://github.com/apify/apify-sdk-python"
"Issue tracker" = "https://github.com/apify/apify-sdk-python/issues"
"Changelog" = "https://github.com/apify/apify-sdk-python/blob/master/CHANGELOG.md"
"Apify Homepage" = "https://apify.com"
[build-system]
requires = ["setuptools>=64.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
include = ["apify*"]
[tool.setuptools.package-data]
apify = ["py.typed"]
[tool.ruff]
line-length = 150
select = ["ALL"]
ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {filename}
"BLE001", # Do not catch blind exception
"C901", # `{name}` is too complex
"COM812", # This rule may cause conflicts when used with the formatter
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"EM", # flake8-errmsg
"G004", # Logging statement uses f-string
"ISC001", # This rule may cause conflicts when used with the formatter
"FIX", # flake8-fixme
"PGH003", # Use specific rule codes when ignoring type issues
"PLR0911", # Too many return statements
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PTH", # flake8-use-pathlib
"PYI034", # `__aenter__` methods in classes like `{name}` usually return `self` at runtime
"PYI036", # The second argument in `__aexit__` should be annotated with `object` or `BaseException | None`
"S102", # Use of `exec` detected
"S105", # Possible hardcoded password assigned to
"S106", # Possible hardcoded password assigned to argument: "{name}"
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
"S303", # Use of insecure MD2, MD4, MD5, or SHA1 hash function
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO @<author_name>: ...
"TRY003", # Avoid specifying long messages outside the exception class
# TODO: Remove this once the following issue is fixed
# https://github.com/apify/apify-sdk-python/issues/150
"SLF001", # Private member accessed: `{name}`
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F401", # Unused imports
]
"**/{scripts}/*" = [
"D", # Everything from the pydocstyle
"INP001", # File {filename} is part of an implicit namespace package, add an __init__.py
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"T20", # flake8-print
]
"**/{tests}/*" = [
"D", # Everything from the pydocstyle
"INP001", # File {filename} is part of an implicit namespace package, add an __init__.py
"PT011", # `pytest.raises({ExceptionType})` is too broad, set the `match` parameter or use a more specific exception
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"S101", # Use of assert detected
"T20", # flake8-print
"TID252", # Relative imports from parent modules are banned
"TRY301", # Abstract `raise` to an inner function
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
[tool.ruff.lint.isort]
known-local-folder = ["apify"]
[tool.ruff.lint.pydocstyle]
convention = "google"