-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (134 loc) · 4.79 KB
/
Copy pathpyproject.toml
File metadata and controls
154 lines (134 loc) · 4.79 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[project]
name = "aws-durable-execution-sdk-python-monorepo"
version = "0.0.0"
requires-python = ">=3.11"
[tool.hatch.envs.default]
workspace.members = ["packages/*"]
[tool.hatch.envs.test]
workspace.members = ["packages/*"]
dependencies = [
"coverage[toml]",
"pytest",
"pytest-cov",
"opentelemetry-sdk>=1.20.0",
"aws_durable_execution_sdk_python_testing"
]
[tool.hatch.envs.test.scripts]
all = "pytest {args}"
cov = "pytest --cov-report=term-missing --cov {args}"
examples-integration = "pytest --runner-mode=cloud -m example packages/aws-durable-execution-sdk-python-examples/test/ -v {args}"
[tool.pytest.ini_options]
# Declare custom markers to avoid warnings with --strict-markers
addopts = "-v --strict-markers --import-mode=importlib"
testpaths = [
"packages/aws-durable-execution-sdk-python/tests",
"packages/aws-durable-execution-sdk-python-otel/tests",
"packages/aws-durable-execution-sdk-python-examples/test",
]
markers = [
# Used for test selection with -m example
"example: marks tests as example tests (deselect with '-m \"not example\"')",
# Used for configuration - passes handler and lambda_function_name to durable_runner fixture
"durable_execution: marks tests that use the durable_runner fixture (not used for test selection)",
]
[tool.hatch.envs.types]
workspace.members = ["packages/*"]
extra-dependencies = ["mypy>=1.0.0", "pytest", "boto3-stubs[lambda]"]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args}"
[tool.hatch.envs.dev-core]
workspace.members = ["packages/aws-durable-execution-sdk-python"]
dependencies = [
"pytest",
"pytest-cov",
"coverage[toml]",
"aws-durable-execution-sdk-python-testing",
"mypy>=1.0.0",
"boto3-stubs[lambda]",
]
[tool.hatch.envs.dev-core.scripts]
test = "pytest packages/aws-durable-execution-sdk-python/tests {args}"
cov = "pytest --cov-report=term-missing --cov-config=packages/aws-durable-execution-sdk-python/pyproject.toml --cov=packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python --cov-fail-under=98 packages/aws-durable-execution-sdk-python/tests {args}"
typecheck = "mypy --install-types --non-interactive packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python packages/aws-durable-execution-sdk-python/tests"
[tool.hatch.envs.dev-otel]
workspace.members = [
"packages/aws-durable-execution-sdk-python",
"packages/aws-durable-execution-sdk-python-otel",
]
dependencies = [
"pytest",
"pytest-cov",
"coverage[toml]",
"opentelemetry-sdk>=1.20.0",
"mypy>=1.0.0",
]
[tool.hatch.envs.dev-otel.scripts]
test = "pytest packages/aws-durable-execution-sdk-python-otel/tests {args}"
cov = "pytest --cov-report=term-missing --cov-config=packages/aws-durable-execution-sdk-python-otel/pyproject.toml --cov=packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel packages/aws-durable-execution-sdk-python-otel/tests {args}"
typecheck = "mypy --install-types --non-interactive packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel packages/aws-durable-execution-sdk-python-otel/tests"
[tool.hatch.envs.dev-examples]
workspace.members = [
"packages/aws-durable-execution-sdk-python",
"packages/aws-durable-execution-sdk-python-examples",
]
dependencies = [
"pytest",
"aws-durable-execution-sdk-python-testing",
]
[tool.hatch.envs.dev-examples.scripts]
test = "pytest packages/aws-durable-execution-sdk-python-examples/test {args}"
[tool.hatch.envs.test-pypi-otel]
dependencies = [
"aws-durable-execution-sdk-python",
"opentelemetry-sdk>=1.20.0",
"pytest",
"pytest-cov",
"coverage[toml]",
]
pre-install-commands = [
"pip install -e packages/aws-durable-execution-sdk-python-otel",
]
[tool.hatch.envs.test-pypi-otel.scripts]
test = "pytest packages/aws-durable-execution-sdk-python-otel/tests {args}"
[tool.hatch.envs.test-pypi-examples]
dependencies = [
"aws-durable-execution-sdk-python",
"aws-durable-execution-sdk-python-testing",
"pytest",
]
pre-install-commands = [
"pip install -e packages/aws-durable-execution-sdk-python-examples",
]
[tool.hatch.envs.test-pypi-examples.scripts]
test = "pytest packages/aws-durable-execution-sdk-python-examples/test {args}"
[tool.ruff]
line-length = 88
target-version = "py311"
exclude = [".github/scripts/*.sh", ".github/workflows"]
[tool.ruff.lint]
preview = true
select = ["TID252"] # Enforce absolute imports (ban relative imports)
[tool.ruff.lint.isort]
known-first-party = ["aws_durable_execution_sdk_python", "aws_durable_execution_sdk_python_otel"]
force-single-line = false
lines-after-imports = 2
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = [
"ARG001",
"ARG002",
"ARG005",
"S101",
"PLR2004",
"PLR6301",
"SIM117",
"TRY301",
]
"**/test/**" = [
"ARG001",
"ARG002",
"ARG005",
"S101",
"PLR2004",
"SIM117",
"TRY301",
]