-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
170 lines (146 loc) · 3.93 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Packaging
# ---------
[build-system]
requires = ["setuptools>=67.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
# This is the default but we include it to be explicit.
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
# Include the root-package `py.typed` file so Mypy uses inline type annotations.
"django_pg_migration_tools" = ["django_pg_migration_tools/py.typed"]
# Project
# -------
[project]
name = "django_pg_migration_tools"
version = "0.1.18"
description = "Tools for making Django migrations safer and more scalable."
license.file = "LICENSE"
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
[project.urls]
# See https://daniel.feldroy.com/posts/2023-08-pypi-project-urls-cheatsheet for
# additional URLs that can be included here.
repository = "https://github.com/kraken-tech/django-pg-migration-tools"
changelog = "https://github.com/kraken-tech/django-pg-migration-tools/blob/main/CHANGELOG.md"
docs = "https://django-pg-migration-tools.readthedocs.io/"
[project.optional-dependencies]
# Used for running the test matrix via `nox` locally or by remote checks.
# Also reused in the `dev` dependencies list.
pytest-in-nox-base = [
"coverage>=7.6.1",
"dj-database-url>=2.1.0",
"django-stubs>=5.0.0",
"environs>=11.0.0",
"nox>=2024.4.15",
"pytest-django>=4.8.0",
"pytest>=8.2.0",
]
pytest-in-nox-psycopg3 = [
"django_pg_migration_tools[pytest-in-nox-base]",
"psycopg[binary]>=3.1.18",
]
pytest-in-nox-psycopg2 = [
"django_pg_migration_tools[pytest-in-nox-base]",
"psycopg2-binary>=2.9.9",
]
docs = [
"sphinx>=7.4.7",
"sphinx_rtd_theme>=2.0.0",
"sphinx_lint>=0.9.1",
"sphinx_design>=0.6.1",
]
dev = [
# Testing
"django_pg_migration_tools[pytest-in-nox-psycopg3]",
"django_pg_migration_tools[docs]",
"django>=4.2.0", # Django is needed for `make test`, but not for `nox`.
# Linting
"ruff>=0.5.2",
"mypy>=1.10.1",
"pre-commit>=3.7.1",
"types-psycopg2>=2.9.21.20241019",
# Packaging
"build>=1.2.1",
]
# Ruff
# ----
[tool.ruff]
lint.select = [
# pycodestyle
"E",
# pyflakes
"F",
# isort
"I",
]
lint.ignore = [
# Ruff's formatter will try to respect the `line-length` setting
# but doesn't guarantee it - so we ignore the possible line length
# errors that the checker might raise.
"E501",
]
[tool.ruff.lint.per-file-ignores]
# Allow unused imports in `__init__.py` files as these are convenience imports.
"**/__init__.py" = [ "F401" ]
[tool.ruff.lint.isort]
lines-after-imports = 2
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"project",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"project" = [
"django_pg_migration_tools",
"tests",
]
# Mypy
# ----
[tool.mypy]
files = "."
exclude = "build/"
plugins = ["mypy_django_plugin.main"]
# Use strict defaults
strict = true
warn_unreachable = true
warn_no_return = true
[[tool.mypy.overrides]]
# Don't require test functions to include types
module = "tests.*"
allow_untyped_defs = true
disable_error_code = "attr-defined"
[tool.django-stubs]
django_settings_module = "tests.example_app.settings"
# Pytest
# ------
[tool.pytest.ini_options]
# Ensure error warnings are converted into test errors.
filterwarnings = "error"
# Ensure that tests fail if an xfail test unexpectedly passes.
xfail_strict = true
DJANGO_SETTINGS_MODULE = "tests.example_app.settings"
# Coverage
# --------
[tool.coverage.report]
exclude_also = [
'@overload',
]