-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (120 loc) · 3.98 KB
/
pyproject.toml
File metadata and controls
135 lines (120 loc) · 3.98 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "apify_shared"
version = "2.2.1"
description = "Tools and constants shared across Apify projects."
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
]
keywords = [
"apify",
"automation",
"chrome",
"crawlee",
"crawler",
"headless",
"scraper",
"scraping",
]
dependencies = []
[project.urls]
"Apify Homepage" = "https://apify.com"
"Changelog" = "https://github.com/apify/apify-shared-python/blob/master/CHANGELOG.md"
"Discord" = "https://discord.com/invite/jyEM2PRvMU"
"Issue Tracker" = "https://github.com/apify/apify-shared-python/issues"
"Source Code" = "https://github.com/apify/apify-shared-python"
[dependency-groups]
dev = [
"dycw-pytest-only<3.0.0",
"poethepoet<1.0.0",
"pre-commit<5.0.0",
"pytest-asyncio<2.0.0",
"pytest-cov<8.0.0",
"pytest-timeout<3.0.0",
"pytest-xdist<4.0.0",
"pytest<9.0.0",
"ruff~=0.14.0",
"setuptools", # setuptools are used by pytest, but not explicitly required
"ty~=0.0.0",
]
[tool.hatch.build.targets.sdist]
only-include = [
"src/apify_shared",
"CHANGELOG.md",
"CONTRIBUTING.md",
"LICENSE",
"README.md",
"pyproject.toml",
]
[tool.ruff]
line-length = 120
include = ["src/**/*.py", "tests/**/*.py"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # This rule may cause conflicts when used with the formatter
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
"D203", # One blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D413", # Missing blank line after last section
"EM", # flake8-errmsg
"ISC001", # This rule may cause conflicts when used with the formatter
"S105", # Possible hardcoded password assigned to
"TRY003", # Avoid specifying long messages outside the exception class
]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F401", # Unused imports
]
"**/{tests}/*" = [
"D", # Everything from the pydocstyle
"INP001", # File {filename} is part of an implicit namespace package, add an __init__.py
"S101", # Use of assert detected
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
[tool.pytest.ini_options]
addopts = "-r a --verbose"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
timeout = 1800
[tool.ty.environment]
python-version = "3.10"
[tool.ty.src]
include = ["src", "tests", "scripts", "docs", "website"]
# Run tasks with: uv run poe <task>
[tool.poe.tasks]
clean = "rm -rf .coverage .pytest_cache .ruff_cache .ty_cache build dist htmlcov"
install-sync = "uv sync --all-extras"
install-dev = "uv sync --all-extras"
build = "uv build"
publish-to-pypi = "uv publish --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
type-check = "uv run ty check"
unit-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_shared tests/unit"
unit-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_shared --cov-report=html tests/unit"
check-code = ["lint", "type-check", "unit-tests"]
[tool.poe.tasks.lint]
shell = "uv run ruff format --check && uv run ruff check"
[tool.poe.tasks.format]
shell = "uv run ruff check --fix && uv run ruff format"