-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
160 lines (146 loc) · 5.19 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
[project]
name = "recursive_diff"
authors = [{name = "Guido Imperiale", email = "[email protected]"}]
license = {text = "Apache"}
description = "Recursively compare two Python data structures"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.8"
dependencies = [
"numpy >= 1.16",
"pandas >= 0.25",
"xarray >= 0.12",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/crusaderky/recursive_diff"
"Bug Tracker" = "https://github.com/crusaderky/recursive_diff/issues"
Changelog = "https://recursive-diff.readthedocs.io/en/latest/whats-new.html"
[project.readme]
text = "Recursively compare two Python data structures"
content-type = "text/x-rst"
[project.scripts]
ncdiff = "recursive_diff.ncdiff:main"
[tool.setuptools]
packages = ["recursive_diff"]
zip-safe = false # https://mypy.readthedocs.io/en/latest/installed_packages.html
include-package-data = true
[tool.setuptools_scm]
# Use hardcoded version when .git has been removed and this is not a package created
# by sdist. This is the case e.g. of a remote deployment with PyCharm.
fallback_version = "9999"
[tool.setuptools.package-data]
recursive_diff = ["py.typed"]
[build-system]
requires = [
"setuptools>=66",
"setuptools_scm[toml]",
]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config -v -r sxfE --color=yes"
xfail_strict = true
python_files = ["test_*.py"]
testpaths = ["recursive_diff/tests"]
filterwarnings = [
"error",
# numpy <1.26 only
'ignore:elementwise comparison failed:DeprecationWarning',
'ignore:elementwise comparison failed:FutureWarning',
'ignore:invalid value encountered in cast:RuntimeWarning',
# mindeps only
'ignore:numpy.ufunc size changed:RuntimeWarning',
"ignore:Using or importing the ABCs from 'collections':DeprecationWarning",
'ignore:other_ds.dims.create_scale\(ds, name\) is deprecated',
# Deprecations in proper_unstack
# FIXME https://github.com/crusaderky/xarray_extras/issues/33
'ignore:the `pandas.MultiIndex` object.* will no longer be implicitly promoted:FutureWarning',
'ignore:updating coordinate .* with a PandasMultiIndex:FutureWarning',
'ignore:Updating MultiIndexed coordinate .* would corrupt indices:FutureWarning',
# xarray vs. pandas upstream
'ignore:Converting non-nanosecond precision datetime:UserWarning',
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: nocover",
"pragma: no cover",
"TYPE_CHECKING",
"except ImportError",
"@overload",
'@(abc\.)?abstractmethod',
]
[tool.ruff]
exclude = [".eggs"]
target-version = "py38"
[tool.ruff.lint]
ignore = [
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"N806", # Variable should be lowercase
"N816", # Variable in global scope should not be mixedCase
"PT006", # Wrong type passed to first argument of `pytest.mark.parametrize`; expected `tuple`
"PLC0414", # Import alias does not rename original package
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison, consider replacing `123` with a constant variable
"PLW2901", # for loop variable overwritten by assignment target
"SIM108", # Use ternary operator instead of if-else block
"N999", # Invalid module name: 'TEMPLATE' TODO remove this line
]
select = [
"YTT", # flake8-2020
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"EXE", # flake8-executable
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"I", # isort
"NPY", # NumPy specific rules
"N", # pep8-naming
"E", # Pycodestyle
"W", # Pycodestyle
"PGH", # pygrep-hooks
"F", # Pyflakes
"PL", # pylint
"UP", # pyupgrade
"RUF", # unused-noqa
"EXE001", # Shebang is present but file is not executable
]
[tool.ruff.lint.isort]
known-first-party = ["TEMPLATE"]
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["*.tests.*"]
disallow_untyped_defs = false