-
Notifications
You must be signed in to change notification settings - Fork 41
/
pyproject.toml
150 lines (131 loc) · 3.04 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
[project]
name = "cf_xarray"
description = "A convenience wrapper for using CF attributes on xarray objects"
readme = "README.rst"
requires-python = ">=3.10"
license = {file = "LICENSE"}
keywords = ["xarray", "metadata", "CF conventions"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"xarray>=2022.03.0",
]
dynamic = ["version"]
[project.optional-dependencies]
all = ["matplotlib", "pint >=0.18, !=0.24.0", "shapely", "regex", "rich", "pooch"]
[project.urls]
homepage = "https://cf-xarray.readthedocs.io"
documentation = "https://cf-xarray.readthedocs.io"
repository = "https://github.com/xarray-contrib/cf-xarray.git"
changelog = "https://cf-xarray.readthedocs.io/en/latest/whats-new.html"
[build-system]
requires = [
# xarray is need for dynamic version string
"xarray>=2022.03.0",
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["cf_xarray", "cf_xarray.scripts"]
[tool.setuptools.exclude-package-data]
cf_xarray = ["tests/*"]
[tool.setuptools.dynamic]
version = {attr = "cf_xarray.__version__"}
[tool.setuptools_scm]
fallback_version = "999"
write_to = "cf_xarray/_version.py"
write_to_template= '__version__ = "{version}"'
tag_regex= "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
[tool.black]
target-version = ["py310"]
[tool.ruff]
target-version = "py310"
builtins = ["ellipsis"]
exclude = [
".eggs",
"doc",
]
[tool.ruff.lint]
# E402: module level import not at top of file
# E501: line too long - let ruff worry about that
ignore = [
"E402",
"E501",
"B018",
"B015",
]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I",
# Pyupgrade
"UP",
]
extend-select = [
"B", # flake8-bugbear
]
[tool.ruff.lint.isort]
known-first-party = ["cf_xarray"]
known-third-party = [
"dask",
"matplotlib",
"numpy",
"pandas",
"pint",
"pkg_resources",
"pytest",
"setuptools",
"sphinx_autosummary_accessors",
"xarray"
]
[tool.pytest]
python_files = "test_*.py"
testpaths = ["cf_xarray/tests"]
[tool.rstcheck]
report_level = "WARNING"
ignore_roles = [
"pr",
"issue",
]
ignore_directives = [
"ipython",
"autodata",
"autosummary",
]
[tool.nbqa.md]
mdformat = true
[tool.mypy]
exclude = "doc|flycheck"
files = "cf_xarray/"
show_error_codes = true
warn_unused_ignores = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[[tool.mypy.overrides]]
module=[
"cftime",
"pandas",
"pooch",
"pint",
"matplotlib",
"pytest",
"shapely",
"shapely.geometry",
"xarray.core.pycompat",
]
ignore_missing_imports = true
[tool.coverage.run]
omit = ["*/tests/*"]