-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
136 lines (117 loc) · 3.24 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "glue-devtools"
repository = "https://github.com/dashmug/glue-devtools"
version = "0.1.0"
# Dependabot does not understand the `package-mode` setting.
# We ignore it for now and use --no-root with poetry install.
# package-mode = false
description = "Glue Development Tools"
authors = ["Noel Llevares <dashmug@gmail.com>"]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.10,<3.11"
# This "runtime" dependency group refers to dependencies that already
# exist in AWS Glue's runtime. We don't need to install these in the
# container.
#
# It is best to keep the dependencies here in sync with what's on Glue's
# documentation.
# https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-libraries.html#glue-modules-provided
[tool.poetry.group.runtime.dependencies]
aws-glue-libs = { git = "https://github.com/awslabs/aws-glue-libs.git", rev = "master" }
pyspark = "3.3.0"
[tool.poetry.group.dev.dependencies]
pytest-randomly = "^3.15.0"
pytest-cov = "^5.0.0"
pre-commit = "^3.7.1"
import-linter = "^2.0"
ruff = "^0.5.4"
mypy = "^1.11.0"
pytest = "^8.3.1"
[tool.poetry.group.deploy.dependencies]
aws-cdk-lib = "^2.149.0"
cdk-nag = "^2.28.163"
[tool.ruff]
line-length = 88
output-format = "full"
respect-gitignore = true
target-version = "py310"
exclude = ["snapshots", ".venv", ".ipynb_checkpoints"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Line too long
"E501",
# pydocstyle
"D",
# Missing type annotation for `self` in method
"ANN101",
# To Do comments
"TD002",
"TD003",
"FIX002",
# Conflicts with ruff format
"COM812",
"ISC001",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.mccabe]
max-complexity = 7
[tool.ruff.lint.per-file-ignores]
"**/test_*" = ["S101", "ANN", "PT", "PD"]
[tool.mypy]
packages = "glueetl"
python_version = "3.10"
show_error_codes = true
pretty = true
strict = true
ignore_missing_imports = true
implicit_reexport = true
explicit_package_bases = true
[[tool.mypy.overrides]]
module = "*.tests.*"
disallow_incomplete_defs = false
disallow_untyped_defs = false
disallow_untyped_calls = false
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::FutureWarning:.*pyspark.*",
]
[tool.coverage.run]
omit = ["**/test_*.py"]
[tool.coverage.report]
skip_empty = true
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.importlinter]
root_packages = ["cdk", "glueetl"]
include_external_packages = true
[[tool.importlinter.contracts]]
name = "Jobs and deployment code should not import from each other"
type = "independence"
modules = ["glueetl", "cdk"]
[[tool.importlinter.contracts]]
name = "Glue Job scripts should not use CDK"
type = "forbidden"
source_modules = ["glueetl"]
forbidden_modules = ["aws_cdk"]
[[tool.importlinter.contracts]]
name = "CDK code should follow layers architecture"
type = "layers"
layers = ["cdk.stacks", "cdk.constructs"]